zodern / meteor-up

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

Mup verification fails on wrong port #1214

Closed ingodahn closed 3 years ago

ingodahn commented 3 years ago

After successful deployment with mup for some time and some updates (not in mup.js) mup validation fails after successful deployment. I am not using port 3000 but port 4000, however validation seems to use 172.17.0.3:3000. I am not aware of having set that IP either. I add that my node version is v12.20.0.

Mup version (mup --version): 1.5.3

Mup config

{
  "servers": {
    "one": {
      "host": "1.2.3.4",
      "username": "dahn",
      "password": "password"
    }
  },
  "mongo": {
    "port": 27017,
    "version": "3.4.1",
    "servers": {
      "one": {}
    },
    "dbName": "Registry"
  },
  "app": {
    "name": "my-app",
    "path": "..",
    "servers": {
      "one": {}
    },
    "buildOptions": {
      "serverOnly": true
    },
    "env": {
      "PORT": 4000,
      "ROOT_URL": "https://subdomain.host.com",
      "MONGO_URL": "mongodb://mongodb:27017/my-app"
    },
    "docker": {
      "image": "abernix/meteord:node-8.4.0-base",
      "stopAppDuringPrepareBundle": true,
      "imagePort": 3000,
      "args": [
        "--link=mongodb:mongodb"
      ]
    },
    "deployCheckWaitTime": 120,
    "enableUploadProgressBar": false,
    "type": "meteor"
  }
}

Output of command

mup deploy --verbose
Building App Bundle Locally
Browserslist: caniuse-lite is outdated. Please run next command `npm update`

Started TaskList: Pushing Meteor App
[1.2.3.4] - Pushing Meteor App Bundle to the Server
[1.2.3.4] - Pushing Meteor App Bundle to the Server: SUCCESS
[1.2.3.4] - Prepare Bundle
Updating base image
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
docker.io/abernix/meteord:node-8.4.0-base
Preparing for docker build
Creating Dockerfile
Finished creating Dockerfile
Building image
Sending build context to Docker daemon  120.7MB
Step 1/7 : FROM abernix/meteord:node-8.4.0-base
# Executing 1 build trigger
 ---> Using cache
 ---> 4145fc9de884
Step 2/7 : RUN mkdir /built_app || true
 ---> Using cache
 ---> d1b5fd53beb9
Step 3/7 : ARG PORT="4000"
 ---> Using cache
 ---> ce93a3426d50
Step 4/7 : ARG ROOT_URL="https://registry.dahn-research.eu"
 ---> Using cache
 ---> 0ab06ee2921d
Step 5/7 : ARG MONGO_URL="mongodb://mongodb:27017/Registry"
 ---> Using cache
 ---> 2abe60d5a2a4
Step 6/7 : COPY ./ /built_app
 ---> Using cache
 ---> 2fb614975e38
Step 7/7 : RUN cd /built_app/programs/server &&     npm install --unsafe-perm
 ---> Using cache
 ---> 796cc7c3e9d0
[Warning] One or more build-args [NODE_VERSION] were not consumed
Successfully built 796cc7c3e9d0
Successfully tagged mup-registry:build

real    0m9.322s
user    0m0.620s
sys 0m0.484s
Tagged latest
Total reclaimed space: 0B
[1.2.3.4] - Prepare Bundle: SUCCESS

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

Started TaskList: Start Meteor
[1.2.3.4] - Start Meteor
using image
removing last
Image mup-registry:latest
Volume
Removing docker containers. Errors about nonexistent endpoints and containers are normal.
Registry
Error response from daemon: endpoint Registry not found
Error: No such container: Registry-frontend
Error response from daemon: endpoint Registry-frontend not found
Error: No such container: Registry-nginx-letsencrypt
Error response from daemon: endpoint Registry-nginx-letsencrypt not found
Error: No such container: Registry-nginx-proxy
Error response from daemon: endpoint Registry-nginx-proxy not found
Finished removing docker containers
f94bc01100d0e1d6d14ac8dfa2136e9e7d1a3c805596193edf5b14c77834064b
Ran abernix/meteord:node-8.4.0-base
[1.2.3.4] - Start Meteor: SUCCESS
[1.2.3.4] - Verifying Deployment
IP: 172.17.0.3
  % 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 3000: Connection refused
CONTAINER IP EMPTY
IP: 
Container has no IP Address, likely from the app crashing.
IP: 172.17.0.3
  % 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 3000: Connection refused
CONTAINER IP EMPTY
IP: 
Container has no IP Address, likely from the app crashing.
IP: 172.17.0.3
  % 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 3000: Connection refused
CONTAINER IP EMPTY
IP: 
Container has no IP Address, likely from the app crashing.
CONTAINER IP EMPTY
IP: 
Container has no IP Address, likely from the app crashing.
CONTAINER IP EMPTY
IP: 
Container has no IP Address, likely from the app crashing.
IP: 172.17.0.3
  % 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 3000: Connection refused
CONTAINER IP EMPTY
IP: 
Container has no IP Address, likely from the app crashing.
CONTAINER IP EMPTY
IP: 
Container has no IP Address, likely from the app crashing.
CONTAINER IP EMPTY
IP: 
Container has no IP Address, likely from the app crashing.
CONTAINER IP EMPTY
IP: 
Container has no IP Address, likely from the app crashing.
CONTAINER IP EMPTY
IP: 
Container has no IP Address, likely from the app crashing.
=> Container status:
Container spent too much time restarting.
restarted: 7 times {"Bridge":"","SandboxID":"f7dc554b2e18951655fafca99cc3871c4cb7ffb1858974fd7723591e593805b7","HairpinMode":false,"LinkLocalIPv6Address":"","LinkLocalIPv6PrefixLen":0,"Ports":{},"SandboxKey":"/var/run/docker/netns/f7dc554b2e18","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null,"EndpointID":"","Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","MacAddress":"","Networks":{"bridge":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"3246165170d62435b55e012e905601c4672dd117e180efd6a23477a04b651c8b","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":"2020-12-31T04:50:37.331304476Z","FinishedAt":"2020-12-31T04:50:37.970263433Z"}
=> Logs:
=> Starting meteor app on port:3000
Meteor requires Node v12.0.0 or later.
=> Starting meteor app on port:3000
Meteor requires Node v12.0.0 or later.
=> Starting meteor app on port:3000
Meteor requires Node v12.0.0 or later.
=> Starting meteor app on port:3000
Meteor requires Node v12.0.0 or later.
=> Starting meteor app on port:3000
Meteor requires Node v12.0.0 or later.
=> Starting meteor app on port:3000
Meteor requires Node v12.0.0 or later.
=> Starting meteor app on port:3000
Meteor requires Node v12.0.0 or later.

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

=> Redeploying previous version of the app

[1.2.3.4] x Verifying Deployment: FAILED

          ------------------------------------STDERR------------------------------------
            % 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 3000: 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 3000: 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 3000: 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 3000: Connection refused
    Container spent too much time restarting.
    => Logs:
    => Starting meteor app on port:3000
    Meteor requires Node v12.0.0 or later.
    => Starting meteor app on port:3000
    Meteor requires Node v12.0.0 or later.
    => Starting meteor app on port:3000
    Meteor requires Node v12.0.0 or later.
    => Starting meteor app on port:3000
    Meteor requires Node v12.0.0 or later.
    => Starting meteor app on port:3000
    Meteor requires Node v12.0.0 or later.
    => Starting meteor app on port:3000
    Meteor requires Node v12.0.0 or later.
    => Starting meteor app on port:3000
    Meteor requires Node v12.0.0 or later.

    => Redeploying previous version of the app

          ------------------------------------STDOUT------------------------------------
          IP: 172.17.0.3
    CONTAINER IP EMPTY
    IP: 
    Container has no IP Address, likely from the app crashing.
    IP: 172.17.0.3
    CONTAINER IP EMPTY
    IP: 
    Container has no IP Address, likely from the app crashing.
    IP: 172.17.0.3
    CONTAINER IP EMPTY
    IP: 
    Container has no IP Address, likely from the app crashing.
    CONTAINER IP EMPTY
    IP: 
    Container has no IP Address, likely from the app crashing.
    CONTAINER IP EMPTY
    IP: 
    Container has no IP Address, likely from the app crashing.
    IP: 172.17.0.3
    CONTAINER IP EMPTY
    IP: 
    Container has no IP Address, likely from the app crashing.
    CONTAINER IP EMPTY
    IP: 
    Container has no IP Address, likely from the app crashing.
    CONTAINER IP EMPTY
    IP: 
    Container has no IP Address, likely from the app crashing.
    CONTAINER IP EMPTY
    IP: 
    Container has no IP Address, likely from the app crashing.
    CONTAINER IP EMPTY
    IP: 
    Container has no IP Address, likely from the app crashing.
    => Container status:
    restarted: 7 times {"Bridge":"","SandboxID":"f7dc554b2e18951655fafca99cc3871c4cb7ffb1858974fd7723591e593805b7","HairpinMode":false,"LinkLocalIPv6Address":"","LinkLocalIPv6PrefixLen":0,"Ports":{},"SandboxKey":"/var/run/docker/netns/f7dc554b2e18","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null,"EndpointID":"","Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","MacAddress":"","Networks":{"bridge":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"3246165170d62435b55e012e905601c4672dd117e180efd6a23477a04b651c8b","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":"2020-12-31T04:50:37.331304476Z","FinishedAt":"2020-12-31T04:50:37.970263433Z"}
ghost commented 3 years ago

Hi there,

its not about the local node version but the one u added on the server, see in your mup.js file,

abernix/meteord:node-8.4.0-base

you should instead try abernix/meteord:node-12-base e.g.

Regards

ingodahn commented 3 years ago

Thanks, that helped.