3

mup 部署时我面临以下问题。

[18.220.xxx.xxx] x Verifying Deployment: FAILED

    -----------------------------------STDERR-----------------------------------
    meteor app on port:80

    /built_app/programs/server/node_modules/fibers/future.js:313
                                                    throw(ex);
                                                    ^
    MongoError: failed to connect to server [mongodb:27017] on first connect [MongoError: getaddrinfo ENOTFOUND mongodb mongodb:27017]
        at Pool.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/server.js:336:35)
        at emitOne (events.js:115:13)
        at Pool.emit (events.js:210:7)
        at Connection.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:280:12)
        at Object.onceWrapper (events.js:318:30)
        at emitTwo (events.js:125:13)
        at Connection.emit (events.js:213:7)
        at Socket.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:187:49)
        at Object.onceWrapper (events.js:316:30)
        at emitOne (events.js:115:13)

    => Redeploying previous version of the app

    -----------------------------------STDOUT-----------------------------------

    To see more logs type 'mup logs --tail=100'

    ---------------------------------------------------------------------------

而且当我试图列出所有容器时,mongo 没有占用任何端口。该怎么办?

sudo docker ps
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS                            PORTS                  NAMES
789025a88f4a        mongo:3.4.1               "/entrypoint.sh mo..."   28 minutes ago      Restarting (100) 11 minutes ago                          mongodb
739b9606ab63        mup-rightnxtprod:latest   "/bin/sh -c 'bash ..."   24 hours ago        Restarting (1) 11 minutes ago     0.0.0.0:3003->80/tcp   rightnxtProd
f4201c547e37        mup-rightnxttest:latest   "/bin/sh -c 'bash ..."   2 days ago          Restarting (1) 11 minutes ago     0.0.0.0:3000->80/tcp   rightnxttest

docker run 的结果是:

docker exec -it mongodb mongo
Error response from daemon: Container 789025a88f4a506112fc16c13aa33b71922c267bdfe650bc667109d5fdae076e is not running

mup.js 环境变量

env: {      
      ROOT_URL: 'http://example.com',      
      MONGO_URL: 'mongodb://127.0.0.1:27017/example',      
      PORT: 3003,   
 },

提前致谢!

4

0 回答 0