验证部署:使用MUP为我的流星应用程序失败

时间:2018-03-03 23:49:09

标签: angularjs ubuntu meteor ionic-framework mup

我在自己的VPS上部署我的应用时出现问题。

知道我尝试在UBUNTU的不同版本上多次尝试:

  • Ubuntu 14.04(64位)
  • Ubuntu 16.04(64位)
  • Ubuntu 17.10(64位)

命令:

mup init

然后我填写并编辑了我的mup.js文件:

module.exports = {
 servers: {
  one: {
      host: 'XX.XX.XX.XX',
      username: 'root',
      password: 'PASSWORD',
  }
 },
 meteor: {
  name: 'Ti3',
  path: '../myapp',
  servers: {
   one: {}
  },
  buildOptions: {
   serverOnly: true
  },
  env: {
   ROOT_URL: 'https://m.example.com',
   MONGO_URL: 'mongodb://localhost/meteor'
  },
  docker:{
   image: 'abernix/meteord:base'
  },
  deployCheckWaitTime: 96,
  enableUploadProgressBar: false
 },
 mongo: {
  oplog: true,
  port: 27017,
  version: '3.4.1',
  servers: {
   one: {}
  }
 }
};

然后:

mup setup

结果很好:

Started TaskList: Setup Docker
[XX.XX.XX.XX] - Setup Docker
[XX.XX.XX.XX] - Setup Docker: SUCCESS

Started TaskList: Setup Meteor
[XX.XX.XX.XX] - Setup Environment
[XX.XX.XX.XX] - Setup Environment: SUCCESS

Started TaskList: Setup Mongo
[XX.XX.XX.XX] - Setup Environment
[XX.XX.XX.XX] - Setup Environment: SUCCESS
[XX.XX.XX.XX] - Copying mongodb.conf
[XX.XX.XX.XX] - Copying mongodb.conf: SUCCESS

Started TaskList: Start Mongo
[XX.XX.XX.XX] - Start Mongo
[XX.XX.XX.XX] - Start Mongo: SUCCESS

Next, you should run:
    mup deploy

最后:

mup deploy --settings=settings.json

结果:

Started TaskList: Pushing Meteor App
[XX.XX.XX.XX] - Pushing Meteor App Bundle to the Server
[XX.XX.XX.XX] - Pushing Meteor App Bundle to the Server: SUCCESS
[XX.XX.XX.XX] - Prepare Bundle
[XX.XX.XX.XX] - Prepare Bundle: SUCCESS

Started TaskList: Configuring App
[XX.XX.XX.XX] - Pushing the Startup Script
[XX.XX.XX.XX] - Pushing the Startup Script: SUCCESS
[XX.XX.XX.XX] - Sending Environment Variables
[XX.XX.XX.XX] - Sending Environment Variables: SUCCESS

Started TaskList: Start Meteor
[XX.XX.XX.XX] - Start Meteor
[XX.XX.XX.XX] - Start Meteor: SUCCESS
[XX.XX.XX.XX] - Verifying Deployment

[XX.XX.XX.XX] x Verifying Deployment: FAILED

              ------------------------------------STDERR------------------------------------
              Module._load (module.js:300:12)
            at Module.require (module.js:353:17)
            at require (internal/module.js:12:17)
        => Starting meteor app on port:80
        /built_app/programs/server/node_modules/fibers/future.js:280
                                                        throw(ex);
                                                        ^

        Error: Cannot find module './driver/base'
            at Function.Module._resolveFilename (module.js:325:15)
            at Function.Module._load (module.js:276:25)
            at Module.require (module.js:353:17)
            at require (internal/module.js:12:17)
            at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/ddp-server/node_modules/sockjs/nod
e_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver.js:9:14)
            at Module._compile (module.js:409:26)
            at Object.Module._extensions..js (module.js:416:10)
            at Module.load (module.js:343:32)
            at Function.Module._load (module.js:300:12)
            at Module.require (module.js:353:17)
            at require (internal/module.js:12:17)
        => Starting meteor app on port:80
        /built_app/programs/server/node_modules/fibers/future.js:280
                                                        throw(ex);
                                                        ^

        Error: Cannot find module './driver/base'
            at Function.Module._resolveFilename (module.js:325:15)
            at Function.Module._load (module.js:276:25)
            at Module.require (module.js:353:17)
            at require (internal/module.js:12:17)
            at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/ddp-server/node_modules/sockjs/nod
e_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver.js:9:14)
            at Module._compile (module.js:409:26)
            at Object.Module._extensions..js (module.js:416:10)
            at Module.load (module.js:343:32)
            at Function.Module._load (module.js:300:12)
            at Module.require (module.js:353:17)
            at require (internal/module.js:12:17)
        => Starting meteor app on port:80
        /built_app/programs/server/node_modules/fibers/future.js:280
                                                        throw(ex);
                                                        ^

        Error: Cannot find module './driver/base'
            at Function.Module._resolveFilename (module.js:325:15)
            at Function.Module._load (module.js:276:25)
            at Module.require (module.js:353:17)
            at require (internal/module.js:12:17)
            at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/ddp-server/node_modules/sockjs/nod
e_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver.js:9:14)
            at Module._compile (module.js:409:26)
            at Object.Module._extensions..js (module.js:416:10)
            at Module.load (module.js:343:32)
            at Function.Module._load (module.js:300:12)
            at Module.require (module.js:353:17)
            at require (internal/module.js:12:17)
        => Starting meteor app on port:80
        /built_app/programs/server/node_modules/fibers/future.js:280
                                                        throw(ex);
                                                        ^

        Error: Cannot find module './driver/base'
            at Function.Module._resolveFilename (module.js:325:15)
            at Function.Module._load (module.js:276:25)
            at Module.require (module.js:353:17)
            at require (internal/module.js:12:17)
            at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/ddp-server/node_modules/sockjs/nod
e_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver.js:9:14)
            at Module._compile (module.js:409:26)
            at Object.Module._extensions..js (module.js:416:10)
            at Module.load (module.js:343:32)
            at Function.Module._load (module.js:300:12)
            at Module.require (module.js:353:17)
            at require (internal/module.js:12:17)
        => Starting meteor app on port:80
        /built_app/programs/server/node_modules/fibers/future.js:280
                                                        throw(ex);
                                                        ^

        Error: Cannot find module './driver/base'
            at Function.Module._resolveFilename (module.js:325:15)
            at Function.Module._load (module.js:276:25)
            at Module.require (module.js:353:17)
            at require (internal/module.js:12:17)
            at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/ddp-server/node_modules/sockjs/nod
e_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver.js:9:14)
            at Module._compile (module.js:409:26)
            at Object.Module._extensions..js (module.js:416:10)
            at Module.load (module.js:343:32)
            at Function.Module._load (module.js:300:12)
            at Module.require (module.js:353:17)
            at require (internal/module.js:12:17)

              ------------------------------------STDOUT------------------------------------
              Container has no IP Address, likely from it restarting.
        Container has no IP Address, likely from it restarting.
        Container has no IP Address, likely from it restarting.
        Container has no IP Address, likely from it restarting.
        Container has no IP Address, likely from it restarting.
        Container has no IP Address, likely from it restarting.
        Container has no IP Address, likely from it restarting.
        Container has no IP Address, likely from it restarting.
        Container has no IP Address, likely from it restarting.
        Container has no IP Address, likely from it restarting.
        => Container status:
        restarted: 8 times {"Bridge":"","SandboxID":"00bb7547050558848ad7653c9abc34a93c7da49a1dc1b89112d7ee92e7e39f01","
HairpinMode":false,"LinkLocalIPv6Address":"","LinkLocalIPv6PrefixLen":0,"Ports":{},"SandboxKey":"/var/run/docker/netns/0
0bb75470505","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null,"EndpointID":"","Gateway":"","GlobalIPv6Address":
"","GlobalIPv6PrefixLen":0,"IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","MacAddress":"","Networks":{"bridge":{"IPAMCo
nfig":null,"Links":null,"Aliases":null,"NetworkID":"499449ebea418f87e1471b837748344d48771428cfec20d0e6f597a8cffc6b61","E
ndpointID":"","Gateway":"","IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":
0,"MacAddress":"","DriverOpts":null}}} {"Status":"restarting","Running":true,"Paused":false,"Restarting":true,"OOMKilled
":false,"Dead":false,"Pid":0,"ExitCode":1,"Error":"","StartedAt":"2018-03-03T23:33:52.871342871Z","FinishedAt":"2018-03-
03T23:33:55.0535249Z"}
        => Logs:

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


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

我现在试图解决这个问题很多天,没有任何成功。

我在Windows下开发:

  • 节点V8.9.0
  • NPM V5.5.1

我的应用在本地运行良好而没有任何问题。

需要帮助来解决这个问题,如果你有,可以建议另一个解决方案。

我尝试了什么?

  • 我删除了文件夹node_module并重新安装了它们:meteor npm install

结果相同!

提前感谢。

1 个答案:

答案 0 :(得分:1)

这解释了要使用的正确的socker图像。 https://hub.docker.com/r/abernix/meteord,根据流星和节点版本使用相应的meteord docker。

你应该试试这个

docker: {
      image: 'abernix/meteord:node-8.9.1-base'
    },