Perseo fe docker实例无法启动 [英] Perseo fe docker instance fail to start
问题描述
我面临以下问题:
我试图将FIWARE-Perseo作为docker实例部署到我的Centos 7服务器。尽管perseocore实例可以正常运行,但对于perseo前端而言却并非如此。它已创建,但无法启动。从日志中可以清楚地看出问题出在mongodb上:
I am facing with the following issue: I am trying to deploy FIWARE-Perseo to my Centos 7 server as docker instances. Although the perseocore instance runs without a problem, it doesn't happen the same with the perseo front end. It is created but fails to start. From the logs it is clear that the problem is associated to the mongodb:
将PERSEO_CORE_URL更改为环境值: http:// localhost:8080
将PERSEO_ORION_URL更改为环境值:
http:// myip:1026 / v1 / updateContext 将PERSEO_LOG_LEVEL更改为
环境值:调试时间= 2018-06-01T14:36:02.691Z | lvl = INFO |
corr = n / a | trans = n / a | op = start | comp = perseo-fe | msg =开始不建议使用perseo
服务器/副本集/ mongos选项,所有选项
在选项对象
的顶层受支持[poolSize,ssl,sslValidate,sslCA,sslCert, sslKey,sslPass,sslCRL,自动重新连接,无延迟,保持活动,connectTimeoutMS,家庭,socketTimeoutMS,reconnectTries,reconnectInterval,ha,haInterval,副本集,secondaryAcceptableLatencyMS,acceptableLatencyMS,connectWithNoPrimary,authSource,w,wTimeout, bufferMaxEntries,readPreference,pkFactory,promiseLibrary,readConcern,maxStalenessSeconds,loggerLevel,logger,promoteValues,promoteBuffers,promoteLongs,domainsEnabled,keepAliveInitialDelay,checkServerIdentity,validateOptions,appname,auth]
表示服务器/选项已全部重设/选项
在选项对象
的最高级别受支持[poolSize,ssl,sslValidate,sslCA,sslCert,sslKey,sslPass,sslCRL,autoReconnect,noDelay,keepAlive,connectTimeoutMS,fam ily,socketTimeoutMS,reconnectTries,reconnectInterval,ha,haInterval,副本集,secondaryAcceptableLatencyMS,acceptableLatencyMS,connectWithNoPrimary,authSource,w,wtimeout,j,forceServerObjectId,serializeFunctions,ignoreUndefined,raw,bufferMaxEntries,readPreferenceConcerary,pkFactory,prom记录器,promoteValues,promoteBuffers,promoteLongs,domainsEnabled,keepAliveInitialDelay,checkServerIdentity,validateOptions,appname,auth]
time = 2018-06-01T14:36:02.789Z | lvl = ERROR | corr = n / a | trans = n / a |
op = checkDB | comp = perseo-fe | msg = connect在第一次连接时无法连接到服务器
[localhost:27017] [MongoError:连接ECONNREFUSED
127.0.0.1:27017] time = 2018-06-01T14:36:02.790Z | lvl = ERROR | corr = n / a | trans = n / a | op = start | comp = perseo-fe | msg =首次连接时无法连接到
服务器[localhost:27017] [MongoError:连接
ECONNREFUSED 127.0.0.1:27017] time = 2018-06-01T14:36:02.792Z | lvl = INFO
| corr = n / a | trans = n / a | op = perseo | comp = perseo-fe | msg =开始
保留时间= 2018-06-01T14:36:02.792Z | lvl = FATAL | corr = n / a |
trans = n / a | op = perseo | comp = perseo-fe | msg =在首次连接[MongoError:connect
ECONNREFUSED 127.0.0.1:27017]时无法连接到
服务器[localhost:27017]
Changing PERSEO_CORE_URL to environment value: http://localhost:8080 Changing PERSEO_ORION_URL to environment value: http://myip:1026/v1/updateContext Changing PERSEO_LOG_LEVEL to environment value: debug time=2018-06-01T14:36:02.691Z | lvl=INFO | corr=n/a | trans=n/a | op=start | comp=perseo-fe | msg=starting perseo the server/replset/mongos options are deprecated, all their options are supported at the top level of the options object [poolSize,ssl,sslValidate,sslCA,sslCert,sslKey,sslPass,sslCRL,autoReconnect,noDelay,keepAlive,connectTimeoutMS,family,socketTimeoutMS,reconnectTries,reconnectInterval,ha,haInterval,replicaSet,secondaryAcceptableLatencyMS,acceptableLatencyMS,connectWithNoPrimary,authSource,w,wtimeout,j,forceServerObjectId,serializeFunctions,ignoreUndefined,raw,bufferMaxEntries,readPreference,pkFactory,promiseLibrary,readConcern,maxStalenessSeconds,loggerLevel,logger,promoteValues,promoteBuffers,promoteLongs,domainsEnabled,keepAliveInitialDelay,checkServerIdentity,validateOptions,appname,auth] the server/replset/mongos options are deprecated, all their options are supported at the top level of the options object [poolSize,ssl,sslValidate,sslCA,sslCert,sslKey,sslPass,sslCRL,autoReconnect,noDelay,keepAlive,connectTimeoutMS,family,socketTimeoutMS,reconnectTries,reconnectInterval,ha,haInterval,replicaSet,secondaryAcceptableLatencyMS,acceptableLatencyMS,connectWithNoPrimary,authSource,w,wtimeout,j,forceServerObjectId,serializeFunctions,ignoreUndefined,raw,bufferMaxEntries,readPreference,pkFactory,promiseLibrary,readConcern,maxStalenessSeconds,loggerLevel,logger,promoteValues,promoteBuffers,promoteLongs,domainsEnabled,keepAliveInitialDelay,checkServerIdentity,validateOptions,appname,auth] time=2018-06-01T14:36:02.789Z | lvl=ERROR | corr=n/a | trans=n/a | op=checkDB | comp=perseo-fe | msg=connect failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017] time=2018-06-01T14:36:02.790Z | lvl=ERROR | corr=n/a | trans=n/a | op=start | comp=perseo-fe | msg=failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017] time=2018-06-01T14:36:02.792Z | lvl=INFO | corr=n/a | trans=n/a | op=perseo | comp=perseo-fe | msg=starting perseo time=2018-06-01T14:36:02.792Z | lvl=FATAL | corr=n/a | trans=n/a | op=perseo | comp=perseo-fe | msg=failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
在Orion和MongoDB已作为docker实例运行的系统中,我使用了以下链接中的说明:
与Perseo Core和Orion Context Broker一起运行
非常感谢您为我提供的任何帮助。
I have used the instructions from the following link, in a system where Orion and MongoDB were already running as docker instances: Running together with Perseo Core and Orion Context Broker Thank you very much in advance for any help you can provide me.
推荐答案
请确保您使用 PERSEO_MONGO_ENDPOINT
代替 PERSEO_MONGO_HOST
。
无论如何,以下代码是 docker-compose.yml
文件的示例,可用于与orion一起部署perseo:
Anyway, the following code is an example of a docker-compose.yml
file you can use to deploy perseo with orion:
version: "3"
services:
mongo:
image: mongo:3.2
networks:
- main
volumes:
- ./mongodata:/data/db
orion:
image: fiware/orion
depends_on:
- mongo
links:
- mongo
ports:
- "1026:1026"
networks:
main:
aliases:
- orion.docker
command: -dbhost mongo
perseo-core:
image: telefonicaiot/perseo-core:1.1.0
networks:
main:
aliases:
- perseo-core
command: -perseo_fe_url perseo-fe:9090
perseo-fe:
image: telefonicaiot/perseo-fe:1.5.0
ports:
- 9090:9090
networks:
main:
aliases:
- perseo-fe
depends_on:
- perseo-core
environment:
- PERSEO_MONGO_ENDPOINT=mongo
- PERSEO_CORE_URL=http://perseo-core:8080
- PERSEO_LOG_LEVEL=debug
- PERSEO_ORION_URL=http://orion.docker:1026/v1/updateContext
- PERSEO_SMTP_HOST=smtp.gmail.com
- PERSEO_SMTP_PORT=465
- PERSEO_SMTP_SECURE=true
- PERSEO_SMTP_AUTH_USER=XXXXX@XXXXX.com
- PERSEO_SMTP_AUTH_PASS=XXXXX
networks:
main:
external: true
这篇关于Perseo fe docker实例无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!