zodern / meteor-up

Production Quality Meteor Deployment to Anywhere
http://meteor-up.com/
MIT License
1.27k stars 280 forks source link

Mup Deploy verifying deployment failed #923

Closed anderskitson closed 6 years ago

anderskitson commented 6 years ago

Mup fails at the last step of deployment. I am using VulcanJs.

Mup version 1.4.3 Mup config

{
  "servers": {
    "one": {
      "host": "1.2.3.4",
      "username": "root",
      "password": "password"
    }
  },
  "app": {
    "name": "my-app",
    "path": "../",
    "servers": {
      "one": {}
    },
    "buildOptions": {
      "serverOnly": true
    },
    "env": {
      "ROOT_URL": "http://host.com",
      "MONGO_URL": "mongodb://mongodb:27017/my-app",
      "MONGO_OPLOG_URL": "mongodb://mongodb/local"
    },
    "docker": {
      "image": "abernix/meteord:base",
      "args": [
        "--link=mongodb:mongodb"
      ]
    },
    "enableUploadProgressBar": true,
    "type": "meteor"
  },
  "mongo": {
    "version": "3.4.1",
    "servers": {
      "one": {}
    }
  }
}

Output of mup deploy --verbose

x Verifying Deployment: FAILED

              ------------------------------------STDERR------------------------------------
              Too much time spent restarting.
            at require (internal/module.js:12:17)
            at Object.<anonymous> (/built_app/main.js:4:1)
            at Module._compile (module.js:409:26)
            at Object.Module._extensions..js (module.js:416:10)
        => Starting meteor app on port:80
        /built_app/programs/server/boot.js:49
            const { pause } = require("./debug.js");
                  ^

        SyntaxError: Unexpected token {
            at exports.runInThisContext (vm.js:53:16)
            at Module._compile (module.js:373:25)
            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)
            at Object.<anonymous> (/built_app/main.js:4:1)
            at Module._compile (module.js:409:26)
            at Object.Module._extensions..js (module.js:416:10)
        => Starting meteor app on port:80
        /built_app/programs/server/boot.js:49
            const { pause } = require("./debug.js");
                  ^

        SyntaxError: Unexpected token {
            at exports.runInThisContext (vm.js:53:16)
            at Module._compile (module.js:373:25)
            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)
            at Object.<anonymous> (/built_app/main.js:4:1)
            at Module._compile (module.js:409:26)
            at Object.Module._extensions..js (module.js:416:10)
        => Starting meteor app on port:80
        /built_app/programs/server/boot.js:49
            const { pause } = require("./debug.js");
                  ^

        SyntaxError: Unexpected token {
            at exports.runInThisContext (vm.js:53:16)
            at Module._compile (module.js:373:25)
            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)
            at Object.<anonymous> (/built_app/main.js:4:1)
            at Module._compile (module.js:409:26)
            at Object.Module._extensions..js (module.js:416:10)
        => Starting meteor app on port:80
        /built_app/programs/server/boot.js:49
            const { pause } = require("./debug.js");
                  ^

        SyntaxError: Unexpected token {
            at exports.runInThisContext (vm.js:53:16)
            at Module._compile (module.js:373:25)
            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)
            at Object.<anonymous> (/built_app/main.js:4:1)
            at Module._compile (module.js:409:26)
            at Object.Module._extensions..js (module.js:416:10)
        => Starting meteor app on port:80
        /built_app/programs/server/boot.js:49
            const { pause } = require("./debug.js");
                  ^

        SyntaxError: Unexpected token {
            at exports.runInThisContext (vm.js:53:16)
            at Module._compile (module.js:373:25)
            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)
            at Object.<anonymous> (/built_app/main.js:4:1)
            at Module._compile (module.js:409:26)
            at Object.Module._extensions..js (module.js:416:10)
        => Starting meteor app on port:80
        /built_app/programs/server/boot.js:49
            const { pause } = require("./debug.js");
                  ^

        SyntaxError: Unexpected token {
            at exports.runInThisContext (vm.js:53:16)
            at Module._compile (module.js:373:25)
            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)
            at Object.<anonymous> (/built_app/main.js:4:1)
            at Module._compile (module.js:409:26)
            at Object.Module._extensions..js (module.js:416:10)

        => Redeploying previous version of the app

              ------------------------------------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":"ca22f29363894f01dc3c3889461b6ed6c61358db00dc069773043c4b3124b6b5","HairpinMode":false,"LinkLocalIPv6Address":"","LinkLocalIPv6PrefixLen":0,"Ports":{},"SandboxKey":"/var/run/docker/netns/ca22f2936389","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null,"EndpointID":"","Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","MacAddress":"","Networks":{"bridge":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"aa98924dce09c1ea5d560d2037eeef209c570900f98cba7c65fbfb3d50604ec8","EndpointID":"","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-04-01T15:12:39.402964797Z","FinishedAt":"2018-04-01T15:12:39.563107428Z"}
        => Logs:

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

Output of mup status

=> Servers
  - 159.89.117.175: Ubuntu 16.04

=> Docker Status
 - 159.89.117.175: 18.03.0-ce Running

=> Meteor Status
 - 159.89.117.175: restarting
    Created at 2018-04-01T15:12:51.859937336Z
    Restarted 10 times
    ENV:
     - ROOT_URL=http://wispy.co
     - MONGO_URL=mongodb://mongodb:27017/wispy
     - MONGO_OPLOG_URL=mongodb://mongodb/local
     - METEOR_SETTINGS={"public":{"title":"Your site title","tagline":"Your site tagline","logoUrl":"http://placekitten.com/250/80","logoHeight":"80","logoWidth":"250","faviconUrl":"/favicon.ico","language":"en","locale":"en","twitterAccount":"foo","facebookPage":"http://facebook.com/foo","googleAnalytics":{"apiKey":"foo123"}},"defaultEmail":"hello@world.com","mailUrl":"smtp://username%40yourdomain.mailgun.org:yourpassword123@smtp.mailgun.org:587/","oAuth":{"twitter":{"consumerKey":"foo","secret":"bar"},"facebook":{"appId":"foo","secret":"bar"}}}
     - PORT=80
     - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
     - METEORD_DIR=/opt/meteord
     - NODE_VERSION=4.8.7
    App available through reverse proxy
     - Available in app's docker container: false

=> Mongo Status
  running on server 159.89.117.175
  Restarted 0 times
  Running since 2018-04-01T05:42:03.22612264Z
  Version: 3.4.1
  Connections: 1
  Storage Engine: wiredTiger
adapan-bak commented 6 years ago

Any fix for this issue? Ran into the same problem.

zodern commented 6 years ago

If you have the same error as in the first comment (SyntaxError: Unexpected token {), you need to change the docker image in your config: http://meteor-up.com/docs#meteor-support.

adapan-bak commented 6 years ago

@zodern I'm using abernix/meteord:node-8.4.0-base for the image in the mup.js file since I'm running Meteor 1.6.1.1. So I guess it's not the same issue for me.

zodern commented 6 years ago

@AdrianApan what does mup deploy --verbose show?

adapan-bak commented 6 years ago

Apparently the mongodb docker instance was spazzing out and causing this issue for me. It kept restarting itself (62 times). Anyway after a mup setup things got back to normal. Also, I'm now using abernix/meteord:node-8.9.4-base for the image in mup.js.