gpt4 book ai didi

mongodb - Perseo fe docker 实例启动失败

转载 作者:可可西里 更新时间:2023-11-01 10:38:59 46 4
gpt4 key购买 nike

我面临以下问题:我正在尝试将 FIWARE-Perseo 作为 docker 实例部署到我的 Centos 7 服务器。尽管 perseocore 实例运行没有问题,但它与 perseo 前端的情况不同。它已创建但无法启动。从日志中可以清楚地看出问题与 mongodb 有关:

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 实例运行: Running together with Perseo Core and Orion Context Broker非常感谢您能为我提供的任何帮助。

最佳答案

请确保您使用 PERSEO_MONGO_ENDPOINT 而不是 PERSEO_MONGO_HOST

无论如何,以下代码是一个 docker-compose.yml 文件的示例,您可以使用它来部署带有 orion 的 perseo:

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

关于mongodb - Perseo fe docker 实例启动失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50645999/

46 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com