zodern / meteor-up

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

Verification Deployment failed: Failed to connect to 172.17.0.3 port 80: Connection refused & Container has no IP Address, likely from it restarting. #906

Open jkbaseer opened 6 years ago

jkbaseer commented 6 years ago

Hello Everyone, I see there are lot of tickets on this issue, i try to go one by one and try to solve but each seems to be providing different errors. greatly appreciate if you could help with this. Tried for 2days already. (You can consider me as a basic knowledge on this)

Mup version (mup --version): Mup version: 1.4.3

Mup config (Use mup validate --show --scrub to remove most of the sensitive information)

  "servers": {
    "one": {
      "host": "1.2.3.4",
      "username": "root",
      "password": "password"
    }
  },
  "app": {
    "name": "my-app",
    "path": "/ifs",
    "servers": {
      "one": {}
    },
    "buildOptions": {
      "serverOnly": true
    },
    "env": {
      "ROOT_URL": "http://subdomain.subdomain.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,
    "deployCheckWaitTime": 150,
    "type": "meteor"
  },
  "mongo": {
    "version": "3.4.1",
    "port": 27017,
    "servers": {
      "one": {}
    }
  }
}
...

Output of command (use the --verbose option. Remember to remove sensitive information)

paste output here...

Output of mup status (Only if using mup 1.4 or newer).

  - 1.1.1.1: Ubuntu 16.04

=> Docker Status
  - 1.1.1.14: 18.02.0-ce Running

=> Meteor Status
 - 1.1.1.1: restarting 
    Created at 2018-03-12T12:36:31.425853544Z
    Restarted 23 times
    ENV: 
     - ROOT_URL=http:// 1.1.1.1
     - MONGO_URL=mongodb://mongodb:27017/ideasforsocial
     - MONGO_OPLOG_URL=mongodb://mongodb/local
     - METEOR_SETTINGS={"public":{"title":"Ideas for social","tagline":"Ideas for social","logoUrl":"https://growthlab.com/guides/ultimate-guide-to-business-ideas/assets/img/illustrations/part1.png","logoHeight":"80","logoWidth":"250","faviconUrl":"/favicon.ico","locale":"en","twitterAccount":"foo","facebookPage":"http://facebook.com/foo","googleAnalyticsId":"123foo"},"defaultEmail":"######@gmail.com","mailUrl":"smtp://abc@mail.######.org:abc@smtp.mailgun.org:###/","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 1.1.1.1
  Restarted 0 times
  Running since 2018-03-11T16:30:50.051408768Z
  Version: 3.4.1
  Connections: 1
  Storage Engine: wiredTiger...
Joaojuby commented 6 years ago

It seems to me that the docker versions are using node 8.9.4 and the bundle requires 8.9.5 as of meteor 1.6.1 I might be wrong, but the reality is the app builds and works flawlessly in my OS (win 10) but when deployed with mup it keeps restarting due to some exception:

/built_app/programs/server/node_modules/fibers/future.js:280
                                                        throw(ex);
                                                        ^

Error: Cannot find module 'ee-first'

I went digging on the local build ( .meteor/local/build/) and in the README file there's this line:

This is a Meteor application bundle. It has only one external dependency: Node.js v8.9.4.

And when I run mup meteor node --version I get a different version based on the docker I'm using, but the latest I could get was 8.9.3

Is there a way to pass a command to docker (through mup or even by ssh on the machine) to install a specific node version? I'm curious if that is the actual problem on my case

zodern commented 6 years ago

Could you both please show the output from running mup deploy --verbose?

jkbaseer commented 6 years ago

Hi Zodern, Thanks and respecting that you took back to reply. Thankfully it solved.

Though the help of david > https://github.com/zodern/meteor-up/issues/886. We have solved,. What i did is requested him his mup,js file and chanaged as how he did :)

However as I can't do the verbose on the older problem, I am just sharing with the successful one if it can help you someway, if not we can close this ticket. ` JKsMBP1chSierra:.deploy jk$ mup deploy --verbose Building App Bundle Locally Node#moveTo was deprecated. Use Container#append.

Started TaskList: Pushing Meteor App [1.1.1.1.1] - Pushing Meteor App Bundle to the Server [1.1.1.1.1] - Pushing Meteor App Bundle to the Server: SUCCESS [1.1.1.1.1] - Prepare Bundle node-8.4.0-base: Pulling from abernix/meteord Digest: sha256:04f44cf999da383d11de77027ced8b70818222c9890a405ce10803af3ee5a642 Status: Image is up to date for abernix/meteord:node-8.4.0-base Finished Extracting Creating Dockerfile Finished creating Dockerfile Building image Sending build context to Docker daemon 247MB Step 1/8 : FROM abernix/meteord:node-8.4.0-base

Executing 1 build trigger

---> Using cache ---> e662b0efcf8e Step 2/8 : RUN mkdir /built_app || true ---> Using cache ---> 4d68421d72df Step 3/8 : COPY ./ /built_app ---> Using cache ---> c3506eb2169f Step 4/8 : ENV ROOT_URL=http://1.1.1.1.1:3000 ---> Using cache ---> 5f392ca0f99c Step 5/8 : ENV MONGO_URL=mongodb://mongodb:27017/ideasforsocial ---> Using cache ---> 4f8a4fa52af0 Step 6/8 : ENV MONGO_OPLOG_URL=mongodb://mongodb/local ---> Using cache ---> 542bbcda85e8 Step 7/8 : ENV PORT=3000 ---> Using cache ---> 3378a5e35701 Step 8/8 : RUN cd /built_app/programs/server && npm install --unsafe-perm ---> Using cache ---> 2a522103bef1 Successfully built 2a522103bef1 Successfully tagged mup-ideasforsocial:build Deleted Images: deleted: sha256:ba822fc8a4aeab438b4422ddfa328398a3ebb8af20a1a9a8997d8371fbf947a7 deleted: sha256:19d5ed8383e1211d9ab9a38e647f7a831619f5469180cc6f6e520556e0552c47 deleted: sha256:600fd5eb904999416495425d79215c9af91b3b2573c7c377176b17836dcd817a deleted: sha256:746de25e673fc031fab1a3cda465371b1f0bbe08631b68edd785bbf014b7b562 deleted: sha256:9a8018950eb1ca66cb6fa681fb8609ed7db5a100730ce7e3715ac25099ea67a8 deleted: sha256:d9705793c6ed81338f7f843c2c25d5a2ee858ad1f18b12f94522a30ea05c4e9f deleted: sha256:3262e3a32ab00e7eca2193f9a46493a102057f002f69a199c3e7304ecb60649a deleted: sha256:f77bb2d2d041d1d320664b6c8e668b03046d805a5d2df4433e29be2fc487c516

Total reclaimed space: 231.7MB [1.1.1.1.1] - Prepare Bundle: SUCCESS

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

Started TaskList: Start Meteor [1.1.1.1.1] - Start Meteor using image removing last Image mup-ideasforsocial:latest Volume Removing docker containers. Errors about nonexistent endpoints and containers are normal. ideasforsocial Error response from daemon: endpoint ideasforsocial not found Error: No such container: ideasforsocial-frontend Error response from daemon: endpoint ideasforsocial-frontend not found Error: No such container: ideasforsocial-nginx-letsencrypt Error response from daemon: endpoint ideasforsocial-nginx-letsencrypt not found Error: No such container: ideasforsocial-nginx-proxy Error response from daemon: endpoint ideasforsocial-nginx-proxy not found Finished removing docker containers 06a8f733e523b251ef30074171f1520751672c21f477e4005baad3672e364707 Ran abernix/meteord:node-8.4.0-base [1.1.1.1.1] - Start Meteor: SUCCESS [1.1.1.1.1] - Verifying Deployment % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0<!DOCTYPE html>

. . . 30907 0 30907 0 0 72995 0 --:--:-- --:--:-- --:--:-- 73239 [1.1.1.1] - Verifying Deployment: SUCCESS ` Thanks Buddy! Have a good week!
Joaojuby commented 6 years ago

I've spent a lot of time today trying to get this to work, so here's everything I've found plus the mup deploy --verbose result.

mup deploy --verbose

Building App Bundle Locally

Started TaskList: Pushing Meteor App
[13.79.228.79] - Pushing Meteor App Bundle to the Server
[13.79.228.79] - Pushing Meteor App Bundle to the Server: SUCCESS
[13.79.228.79] - Prepare Bundle
node-8.4.0-base: Pulling from abernix/meteord
Digest: sha256:04f44cf999da383d11de77027ced8b70818222c9890a405ce10803af3ee5a642
Status: Image is up to date for abernix/meteord:node-8.4.0-base
Finished Extracting
Creating Dockerfile
Finished creating Dockerfile
Building image
Sending build context to Docker daemon  53.18MB
Step 1/7 : FROM abernix/meteord:node-8.4.0-base
# Executing 1 build trigger
 ---> Using cache
 ---> d99e0a46b44c
Step 2/7 : RUN mkdir /built_app || true
 ---> Using cache
 ---> 3acb12231bbd
Step 3/7 : COPY ./ /built_app
 ---> 8404a8e12202
Step 4/7 : ENV ROOT_URL=http://kin-api.northeurope.cloudapp.azure.com
 ---> Running in fdc5c370c422
Removing intermediate container fdc5c370c422
 ---> b65cc8a18615
Step 5/7 : ENV MONGO_URL=mongodb://mongodb:27017/kin
 ---> Running in 4c4c90705a3f
Removing intermediate container 4c4c90705a3f
 ---> e131f9b2b9f8
Step 6/7 : ENV MONGO_OPLOG_URL=mongodb://mongodb/local
 ---> Running in c6daf2ce4276
Removing intermediate container c6daf2ce4276
 ---> b5b633b0634b
Step 7/7 : RUN cd  /built_app/programs/server &&     npm install --unsafe-perm
 ---> Running in e2e59619df57

> fibers@2.0.0 install /built_app/programs/server/node_modules/fibers
> node build.js || nodejs build.js

`linux-x64-57` exists; testing
Binary is fine; exiting

> meteor-dev-bundle@ install /built_app/programs/server
> node npm-rebuild.js

{
  "npm": "5.3.0",
  "ares": "1.10.1-DEV",
  "cldr": "31.0.1",
  "http_parser": "2.7.0",
  "icu": "59.1",
  "modules": "57",
  "nghttp2": "1.22.0",
  "node": "8.4.0",
  "openssl": "1.0.2l",
  "tz": "2017b",
  "unicode": "9.0",
  "uv": "1.13.1",
  "v8": "6.0.286.52",
  "zlib": "1.2.11"
}
added 136 packages in 8.888s
Removing intermediate container e2e59619df57
 ---> b0b4caeb83b4
Successfully built b0b4caeb83b4
Successfully tagged mup-kin:build
Deleted Images:
deleted: sha256:f78e4ba2ff1cb6aaf4575cbdd9ddb4fdb51d5f72cc1170d803d28bc7bc36ba3c
deleted: sha256:59e810bbce25df9c103ad68dc25c4cbfcfe24501b47dec02a9eaf74c2f37d772
deleted: sha256:170b099e31e985416ac7f5fc509d478fbfe838e2c8353ebdb941fe653d8cd0e6
deleted: sha256:ec79a74fe4b53ec5921dd83252b7625643714ffb16e56886362a420af58a70cf
deleted: sha256:f21a48161bb1a167d543187150c8197d5325240ca5e7ebd8c8f3b4287e5a61f2
deleted: sha256:832cccc0c003f2adb62acca88a2eb0b48b7e8f2a9a1cb95608752d1d49dbddf6
deleted: sha256:47b73079990194a323f077708c1bfbbd2cefc03d75ea7f3bd6bd4e676e679037
deleted: sha256:55b4e17a54b5b9caf43886e6a3476b0fcc968c0ae3b55600e5121b24e2d74e1b

Total reclaimed space: 51.02MB
[13.79.228.79] - Prepare Bundle: SUCCESS

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

Started TaskList: Start Meteor
[13.79.228.79] - Start Meteor
using image
removing last
Image mup-kin:latest
Volume
Removing docker containers. Errors about nonexistent endpoints and containers are normal.
Error: No such container: kin
Error response from daemon: endpoint kin not found
Error: No such container: kin-frontend
Error response from daemon: endpoint kin-frontend not found
Error: No such container: kin-nginx-letsencrypt
Error response from daemon: endpoint kin-nginx-letsencrypt not found
Error: No such container: kin-nginx-proxy
Error response from daemon: endpoint kin-nginx-proxy not found
Finished removing docker containers
5cd0238823f0b1dd0ddf6492a5fc6c40024b281a3fe5dfa7efeb29f1ac0a7a80
Ran abernix/meteord:node-8.4.0-base
[13.79.228.79] - Start Meteor: SUCCESS
[13.79.228.79] - Verifying Deployment
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.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to 172.17.0.3
port 80: Connection refused
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to 172.17.0.3
port 80: Connection refused
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.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to 172.17.0.3
port 80: Connection refused
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to 172.17.0.3
port 80: Connection refused
Container has no IP Address, likely from it restarting.
Too much time spent restarting.
=> Container status:
restarted: 8 times {"Bridge":"","SandboxID":"eb76656023359e44535637ade69ab9008ca515d34a78ab88c8d303fae7c1d795","HairpinM
ode":false,"LinkLocalIPv6Address":"","LinkLocalIPv6PrefixLen":0,"Ports":{},"SandboxKey":"/var/run/docker/netns/eb7665602
335","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null,"EndpointID":"","Gateway":"","GlobalIPv6Address":"","Glob
alIPv6PrefixLen":0,"IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","MacAddress":"","Networks":{"bridge":{"IPAMConfig":nu
ll,"Links":null,"Aliases":null,"NetworkID":"f25f4c80458a592636b91c57bfcff846925b98ca50b34d371fb76957aeee2257","EndpointI
D":"","Gateway":"","IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAd
dress":"","DriverOpts":null}}} {"Status":"restarting","Running":true,"Paused":false,"Restarting":true,"OOMKilled":false,
"Dead":false,"Pid":0,"ExitCode":1,"Error":"","StartedAt":"2018-03-13T19:50:08.794895176Z","FinishedAt":"2018-03-13T19:50
:10.367915238Z"}
=> Logs:
in the root directory of your application.
/built_app/programs/server/node_modules/fibers/future.js:280
                                                throw(ex);
                                                ^

Error: Cannot find module 'ee-first'
    at Function.Module._resolveFilename (module.js:489:15)
    at Function.Module._load (module.js:439:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/connect/no
de_modules/finalhandler/node_modules/on-finished/index.js:23:13)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/connect/no
de_modules/finalhandler/index.js:17:18)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/connect/li
b/proto.js:12:20)
    at Module._compile (module.js:573:30)
=> Starting meteor app on port:80
Note: you are using a pure-JavaScript implementation of bcrypt.
While this implementation will work correctly, it is known to be
approximately three times slower than the native implementation.
In order to use the native implementation instead, run

  meteor npm install --save bcrypt

in the root directory of your application.
/built_app/programs/server/node_modules/fibers/future.js:280
                                                throw(ex);
                                                ^

Error: Cannot find module 'ee-first'
    at Function.Module._resolveFilename (module.js:489:15)
    at Function.Module._load (module.js:439:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/connect/no
de_modules/finalhandler/node_modules/on-finished/index.js:23:13)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/connect/no
de_modules/finalhandler/index.js:17:18)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/connect/li
b/proto.js:12:20)
    at Module._compile (module.js:573:30)
=> Starting meteor app on port:80
Note: you are using a pure-JavaScript implementation of bcrypt.
While this implementation will work correctly, it is known to be
approximately three times slower than the native implementation.
In order to use the native implementation instead, run

  meteor npm install --save bcrypt

in the root directory of your application.
/built_app/programs/server/node_modules/fibers/future.js:280
                                                throw(ex);
                                                ^

Error: Cannot find module 'ee-first'
    at Function.Module._resolveFilename (module.js:489:15)
    at Function.Module._load (module.js:439:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/connect/no
de_modules/finalhandler/node_modules/on-finished/index.js:23:13)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/connect/no
de_modules/finalhandler/index.js:17:18)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/connect/li
b/proto.js:12:20)
    at Module._compile (module.js:573:30)

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

=> Redeploying previous version of the app

[13.79.228.79] x Verifying Deployment: FAILED

              ------------------------------------STDERR------------------------------------
              e_modules/finalhandler/index.js:17:18)
            at Module._compile (module.js:573:30)
            at Object.Module._extensions..js (module.js:584:10)
            at Module.load (module.js:507:32)
            at tryModuleLoad (module.js:470:12)
            at Function.Module._load (module.js:462:3)
            at Module.require (module.js:517:17)
            at require (internal/module.js:11:18)
            at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/co
nnect/lib/proto.js:12:20)
            at Module._compile (module.js:573:30)
        => Starting meteor app on port:80
        Note: you are using a pure-JavaScript implementation of bcrypt.
        While this implementation will work correctly, it is known to be
        approximately three times slower than the native implementation.
        In order to use the native implementation instead, run

          meteor npm install --save bcrypt

        in the root directory of your application.
        /built_app/programs/server/node_modules/fibers/future.js:280
                                                        throw(ex);
                                                        ^

        Error: Cannot find module 'ee-first'
            at Function.Module._resolveFilename (module.js:489:15)
            at Function.Module._load (module.js:439:25)
            at Module.require (module.js:517:17)
            at require (internal/module.js:11:18)
            at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/co
nnect/node_modules/finalhandler/node_modules/on-finished/index.js:23:13)
            at Module._compile (module.js:573:30)
            at Object.Module._extensions..js (module.js:584:10)
            at Module.load (module.js:507:32)
            at tryModuleLoad (module.js:470:12)
            at Function.Module._load (module.js:462:3)
            at Module.require (module.js:517:17)
            at require (internal/module.js:11:18)
            at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/co
nnect/node_modules/finalhandler/index.js:17:18)
            at Module._compile (module.js:573:30)
            at Object.Module._extensions..js (module.js:584:10)
            at Module.load (module.js:507:32)
            at tryModuleLoad (module.js:470:12)
            at Function.Module._load (module.js:462:3)
            at Module.require (module.js:517:17)
            at require (internal/module.js:11:18)
            at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/co
nnect/lib/proto.js:12:20)
            at Module._compile (module.js:573:30)
        => Starting meteor app on port:80
        Note: you are using a pure-JavaScript implementation of bcrypt.
        While this implementation will work correctly, it is known to be
        approximately three times slower than the native implementation.
        In order to use the native implementation instead, run

          meteor npm install --save bcrypt

        in the root directory of your application.
        /built_app/programs/server/node_modules/fibers/future.js:280
                                                        throw(ex);
                                                        ^

        Error: Cannot find module 'ee-first'
            at Function.Module._resolveFilename (module.js:489:15)
            at Function.Module._load (module.js:439:25)
            at Module.require (module.js:517:17)
            at require (internal/module.js:11:18)
            at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/co
nnect/node_modules/finalhandler/node_modules/on-finished/index.js:23:13)
            at Module._compile (module.js:573:30)
            at Object.Module._extensions..js (module.js:584:10)
            at Module.load (module.js:507:32)
            at tryModuleLoad (module.js:470:12)
            at Function.Module._load (module.js:462:3)
            at Module.require (module.js:517:17)
            at require (internal/module.js:11:18)
            at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/co
nnect/node_modules/finalhandler/index.js:17:18)
            at Module._compile (module.js:573:30)
            at Object.Module._extensions..js (module.js:584:10)
            at Module.load (module.js:507:32)
            at tryModuleLoad (module.js:470:12)
            at Function.Module._load (module.js:462:3)
            at Module.require (module.js:517:17)
            at require (internal/module.js:11:18)
            at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/co
nnect/lib/proto.js:12:20)
            at Module._compile (module.js:573:30)

        => 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":"eb76656023359e44535637ade69ab9008ca515d34a78ab88c8d303fae7c1d795","
HairpinMode":false,"LinkLocalIPv6Address":"","LinkLocalIPv6PrefixLen":0,"Ports":{},"SandboxKey":"/var/run/docker/netns/e
b7665602335","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null,"EndpointID":"","Gateway":"","GlobalIPv6Address":
"","GlobalIPv6PrefixLen":0,"IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","MacAddress":"","Networks":{"bridge":{"IPAMCo
nfig":null,"Links":null,"Aliases":null,"NetworkID":"f25f4c80458a592636b91c57bfcff846925b98ca50b34d371fb76957aeee2257","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-13T19:50:08.794895176Z","FinishedAt":"2018-03-
13T19:50:10.367915238Z"}
        => Logs:

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

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

To clarify, I had stopped and removed the docker instances before this attempt to give you a reproducible environment. The VM is hosted on Azure and the machine I'm using is running windows 10 (which forces me to use mup.cmd but it's extremely reliable as of late)

The meteor project was created with the --bare flag. If I deploy at that moment, everything is fine. The moment I add the simple:restivus package it starts to fail the verification.

What I could find is that it is related with the simple-json package, but I have no problems when running locally. Tried to serve an almost empty html page hoping it would pass the verification but it wasn't the case. In fact I can't even reach the host through the dns although when I run docker ps -a we get this:

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                        NAMES
0a88493dbeec        mup-kin:latest      "/bin/sh -c 'bash $M…"   7 minutes ago       Up 7 minutes        0.0.0.0:80->80/tcp           kin
20e2e542021a        mongo:3.4.1         "/entrypoint.sh mong…"   11 minutes ago      Up 11 minutes       127.0.0.1:27017->27017/tcp   mongodb

All I needed was to set up a web service and wanted to leverage the mongodb integration from meteor but all high level packages depend directly on simple-json so I'm running out of ideas here. Can't exactly tell if this is a mup issue but at least when working locally there's no issues.

zodern commented 6 years ago

Running meteor npm --save ee-first should fix it.

Meteor should be including ee-first with the bundle. Could you please create a repository on GitHub with a simple app you can reproduce the error with?

Joaojuby commented 6 years ago

Thanks for the reminder, I didn't even thought that I could just add the missing module. I've hit another missing module so I'll keep iterating on installing them manually and compile a list.

I'll gladly create the repo after this however

Edit: forgot to say the missing module that came after is still from the same package, so I'm getting more doubts on wether this is mup related at all, if this just happens with this package or not.

Joaojuby commented 6 years ago

@zodern Like you asked, here's a repo with exactly the same code and dependencies I was experiencing https://github.com/Joaojuby/meteor-web-api

It would be simple to replicate anyways, meteor create my-app --bare followed by meteor add nimble:restivus and after that you can run it, you can use it locally but I couldn't deploy it for reasons already mentioned.

I also compiled the "list" of missing dependencies, in the end it was just 'ee-first' and 'range-parser', both from simple:json-routes