meteor-up
meteor-up copied to clipboard
Failed to connect to 172.17.0.5 port 80 in Verifying Deployment stage
I am getting the below error in the verifying deployment stage of mup deploy:
Mup version: 1.4.4
Mup config
{
"servers": {
"one": {
"host": "1.2.3.4",
"username": "root",
"password": "password"
}
},
"proxy": {
"domains": "xxxx.com",
"ssl": {
"letsEncryptEmail": "[email protected]",
"forceSSL": true
}
},
"mongo": {
"version": "3.4.1",
"servers": {
"one": {}
}
},
"app": {
"name": "my-app",
"path": "../xxxx",
"volumes": {
"/images": "/images"
},
"servers": {
"one": {}
},
"buildOptions": {
"serverOnly": true
},
"env": {
"ROOT_URL": "https://host.com",
"MONGO_URL": "mongodb://mongodb:27017/my-app",
"VIRTUAL_HOST": "xxxx.com",
"HTTPS_METHOD": "redirect",
"HTTP_FORWARDED_COUNT": 1,
"LETSENCRYPT_HOST": "xxxx.com",
"LETSENCRYPT_EMAIL": "[email protected]"
},
"docker": {
"image": "programthis/meteor-gm",
"args": [
"--link=mongodb:mongodb"
]
},
"enableUploadProgressBar": true,
"type": "meteor"
}
}
Output of command
[159.203.61.14] - 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 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to 172.17.0.5 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.5 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.5 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.5 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.5 port 80: Connection refused
Which is then followed by:
[159.203.61.14] x Verifying Deployment: FAILED
------------------------------------STDERR------------------------------------
or-node-stubs/node_modules/events
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/http-browserify
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/Base64
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/https-browserify
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/os-browserify
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/path-browserify
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/process
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/punycode
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/querystring-es3
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/readable-stream
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/process-nextick-args
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/safe-buffer
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/string_decoder
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/util-deprecate
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/stream-browserify
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/timers-browserify
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/tty-browserify
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/url
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/url/node_modules/punycode
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/querystring
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/vm-browserify
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/indexof
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/balanced-match
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/brace-expansion
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/concat-map
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/fs.realpath
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/glob
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/inflight
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/once
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/wrappy
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/minimatch
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/path-is-absolute
[email protected] /bundle/bundle/programs/server/npm/node_modules/meteor-node-stubs/node_modules/rimraf
[email protected] /bundle/bundle/programs/server/npm/node_modules/mongo-object
[email protected] /bundle/bundle/programs/server/npm/node_modules/simpl-schema
[email protected] /bundle/bundle/programs/server/npm/node_modules/sweetalert2
{
"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 65.32s
=> Starting meteor app on port:80
=> Redeploying previous version of the app
------------------------------------STDOUT------------------------------------
=> Container status:
restarted: 0 times {"Bridge":"","SandboxID":"53c4aa70e6f28a91c379b1f24504d49e7bc5f3db9c87a0290822e5adc30dedba","HairpinMode":false,"LinkLocalIPv6Address":"","LinkLocalIPv6PrefixLen":0,"Ports":{"80/tcp":null},"SandboxKey":"/var/run/docker/netns/53c4aa70e6f2","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null,"EndpointID":"3ff5d46d8bdf9263c0a0aa453c9e62e7a3c63ea78ca450297efd3ab8060243d0","Gateway":"172.17.0.1","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"IPAddress":"172.17.0.5","IPPrefixLen":16,"IPv6Gateway":"","MacAddress":"02:42:ac:11:00:05","Networks":{"bridge":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"9094e5dea0457f2d8cc18a782a78b69a5a2282b9b1b7c10a4df8c7cf445f72a0","EndpointID":"3ff5d46d8bdf9263c0a0aa453c9e62e7a3c63ea78ca450297efd3ab8060243d0","Gateway":"172.17.0.1","IPAddress":"172.17.0.5","IPPrefixLen":16,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:11:00:05","DriverOpts":null}}} {"Status":"running","Running":true,"Paused":false,"Restarting":false,"OOMKilled":false,"Dead":false,"Pid":31481,"ExitCode":0,"Error":"","StartedAt":"2018-05-06T23:54:40.333255605Z","FinishedAt":"0001-01-01T00:00:00Z"}
=> Logs:
To see more logs type 'mup logs --tail=200'
------------------------------------------------------------------------------
Did you find the issue?
I am having the same issue here, it appeared recently but couldn't find the reason
@programthis Mup might not have waited long enough for the app to start. This is fixed by Prepare Bundle, which is only enabled by default for certain images. Setting app.docker.prepareBundle
to true
in your config should fix it.
@marcoschwartz could you please show the output after Verifying Deployment
when running mup deploy --verbose
?
@zodern Thanks for the tip. Weirdly, this issue seemed to go away on its own (even before updating to the more recent version).
@zodern thank you, solved the issue!
I've got this error on my staging server. I did a successful deploy, made a small fix to the code and redeployed resulting in this error.
I've tried again with app.docker.prepareBundle
set to true
, but got the same result. I think my docker supported this by default because my original log file shows Preparing Bundle
...
I'm using Meteor 1.8, using zodern/meteor:root
Here's the full deploy log:
$ mup deploy --verbose
Building App Bundle Locally
Started TaskList: Pushing Meteor App
[s.virtualinout.com] - Pushing Meteor App Bundle to the Server
[s.virtualinout.com] - Pushing Meteor App Bundle to the Server: SUCCESS
[s.virtualinout.com] - Prepare Bundle
root: Pulling from zodern/meteor
Digest: sha256:94388cd430fcad65bdeaeee831e409aee5ed62456cb8364c764d867a07564f77
Status: Image is up to date for zodern/meteor:root
Finished Extracting
Creating Dockerfile
Finished creating Dockerfile
Building image
Sending build context to Docker daemon 291.1MB
Step 1/12 : FROM zodern/meteor:root
# Executing 5 build triggers
---> Using cache
[...etc...]
Step 12/12 : RUN cd /built_app/programs/server && npm install --unsafe-perm
---> Running in aab07ccb4bdb
npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
> [email protected] install /built_app/programs/server/node_modules/fibers
> node build.js || nodejs build.js
make: Entering directory '/built_app/programs/server/node_modules/fibers/build'
CXX(target) Release/obj.target/fibers/src/fibers.o
CXX(target) Release/obj.target/fibers/src/coroutine.o
CC(target) Release/obj.target/fibers/src/libcoro/coro.o
SOLINK_MODULE(target) Release/obj.target/fibers.node
COPY Release/fibers.node
make: Leaving directory '/built_app/programs/server/node_modules/fibers/build'
Installed in `/built_app/programs/server/node_modules/fibers/bin/linux-x64-46/fibers.node`
> meteor-dev-bundle@ install /built_app/programs/server
> node npm-rebuild.js
> [email protected] install /built_app/programs/server/npm/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
[bcrypt] Success: "/built_app/programs/server/npm/node_modules/bcrypt/lib/binding/bcrypt_lib.node" is installed via remote
@babel/[email protected] /built_app/programs/server/npm/node_modules/@babel/runtime
[email protected]
[... etc ...]
+-- [email protected]
`-- [email protected]
Removing intermediate container aab07ccb4bdb
---> 5f3a3da51599
Successfully built 5f3a3da51599
Successfully tagged mup-virtualinout:build
Deleted Images:
deleted: sha256:149960970ccebfc0b64b2195fcc5e0ba935fe7630d53c4b82a8efa9e8905d939
deleted: sha256:c97f47e6e8ce796aa56c14ad21408beed959097ad11be4f19eea035ca354ad13
deleted: sha256:39ec32dd0aeedd92ba3ed76be593ef151269da557df19bc7b9bd47941a622946
deleted: sha256:91897732be8af13ba64767cbecf1b10859c403854723b643101846f2ab7ccba4
Total reclaimed space: 286.9MB
[s.virtualinout.com] - Prepare Bundle: SUCCESS
Started TaskList: Configuring App
[s.virtualinout.com] - Pushing the Startup Script
[s.virtualinout.com] - Pushing the Startup Script: SUCCESS
[s.virtualinout.com] - Sending Environment Variables
[s.virtualinout.com] - Sending Environment Variables: SUCCESS
Started TaskList: Start Meteor
[s.virtualinout.com] - Start Meteor
using image
removing last
Image mup-virtualinout:latest
Volume
Removing docker containers. Errors about nonexistent endpoints and containers are normal.
virtualinout
Error response from daemon: endpoint virtualinout not found
Error: No such container: virtualinout-frontend
Error response from daemon: endpoint virtualinout-frontend not found
Error: No such container: virtualinout-nginx-letsencrypt
Error response from daemon: endpoint virtualinout-nginx-letsencrypt not found
Error: No such container: virtualinout-nginx-proxy
Error response from daemon: endpoint virtualinout-nginx-proxy not found
Finished removing docker containers
a52a0c08631dc2389920f48c7dcea1b8f95ad9af0d43a9d83daef0f8d87a4f0a
Ran zodern/meteor:root
[s.virtualinout.com] - Start Meteor: SUCCESS
[s.virtualinout.com] - 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 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to 172.17.0.5 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.5 port 80: Connection refused
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
[... repeated till I kill it]
Here's the result of $ mup docker ps
mup docker ps
[s.virtualinout.com] docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fcc062ecf796 mup-virtualinout:latest "/bin/sh -c 'bash /h…" 11 minutes ago Up 52 seconds 80/tcp, 3000/tcp virtualinout
265a6b5c339a jrcs/letsencrypt-nginx-proxy-companion "/bin/bash /app/entr…" About an hour ago Up About an hour mup-nginx-proxy-letsencrypt
771935e3b24b jwilder/nginx-proxy "/app/docker-entrypo…" About an hour ago Up About an hour 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp mup-nginx-proxy
807e557b6887 mongo:3.4.1 "/entrypoint.sh mong…" 3 weeks ago Up 3 hours 127.0.0.1:27017->27017/tcp mongodb
After ssh'ing into the server, I can't connect to mongo:
ubuntu@ip-*:~$ docker exec -it mongodb mongo virtualinout
MongoDB shell version v3.4.1
connecting to: mongodb://127.0.0.1:27017/virtualinout
2018-11-20T09:51:57.886+0000 W NETWORK [main] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2018-11-20T09:51:58.136+0000 E QUERY [main] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:234:13
@(connect):1:6
exception: connect failed
ubuntu@ip-*:~$
I've tried mup stop
, mup reconfig
, mup restart`, but nothing helped?
Any ideas?
Weird, suddenly it's working again. Not sure what I did, but since my last post I tried:
- Rebooted the server, redeployed, same error, site down.
- Tried setting
stopAppDuringPrepareBundle
tofalse
, same problem. - Ran
mup status
, and it was around then that I noticed the server running again.
I spoke too soon. I tried another deploy and got the same problem.
Since I've recently upgraded to Meteor 1.8 I thought this could be a mongodb incompatibility issue. My mongo version wasn't fixed (no mongo.version
in my config). To get everything updated to the latest versions I terminated my EC2 instance and started everything from fresh. No more deployment issues.
There appears to be a few similar bugs reported here though: #1019, #988, #906?, #851
is this repo still being maintained?
@sebitoelcheater it is being maintained again. Are you encountering this problem?
+1
This issue has stumped me for a day now. It is strange because I have used mup
for other projects, and this is the first time I've encountered any issues. Typically I can leave the mongo env variables default and when I mup deploy
the database is deployed with the rest of the bundle. Now, it seems that's not the case and I have to manually configure the database on the server before deployment.
At any rate, I'm also experiencing the error in the title:
------------------------------------STDERR------------------------------------
ved % 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.2 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.2 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.2 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.2 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.2 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.2 port 80: Connection refused
=> Starting meteor app on port:80
/built_app/programs/server/node_modules/fibers/future.js:313
throw(ex);
Followed by:
Error: failed to connect to server [SERVER_IP:27017] on first connect [MongoNetworkError:connection 0 to 68.183.169.22:27017 timed out]
at Pool.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/server.js:564:11)
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:317: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:257:10)
at Object.onceWrapper (events.js:314:30)
at emitNone (events.js:105:13)
at Socket.emit (events.js:207:7)
at Socket._onTimeout (net.js:398:8)
at ontimeout (timers.js:469:11)
at tryOnTimeout (timers.js:304:5)
at Timer.listOnTimeout (timers.js:264:5)
=> Starting meteor app on port:80
My mup.js looks like this:
module.exports = {
servers: {
one: {
// TODO: set host address, username, and authentication method
host: 'server_ip',
username: 'root',
pem: '~/.ssh/pem'
// password: 'server-password'
// or neither for authenticate from ssh-agent
}
},
app: {
// TODO: change app name and path
name: 'app_name',
path: '../',
servers: {
one: {},
},
buildOptions: {
serverOnly: true,
},
env: {
// TODO: Change to your app's url
// If you are using ssl, it needs to start with https://
ROOT_URL: 'http://example.com',
MONGO_URL: 'mongodb://username:password@server_ip:27017/meteor',
// MONGO_OPLOG_URL: 'mongodb://mongodb/local'
},
docker: {
// change to 'abernix/meteord:base' if your app is using Meteor 1.4 - 1.5
image: 'abernix/meteord:node-8.4.0-base',
prepareBundle: true
},
// Show progress bar while uploading bundle to server
// You might need to disable it on CI servers
enableUploadProgressBar: true
}
};
Any feedback is appreciated.
Hi, I am having similar issue when running mup deploy
. what's your output of sudo docker container ps
after running mup deploy
?
I was able to resolve this issue and I wrote a gist to help others who may have the same issue. Hope it helps!
Thanks @99darwin, comparing your mup configuration with mine helped me fix the issue.
Everyone, change the docker.image
to 'abernix/meteord:node-8.4.0-base' and the error will be gone. There is a problem with 'abernix/meteord:base'.
I had the same problem but had to change the docker.image to 'abernix/meteord:node-8.16.1-base' instead
The thing that resolved this issue for me was to set deployCheckWaitTime: 300
in mup.js.
@johannel00 did you try any lower values? I am considering increasing the default for deployCheckWaitTime
to 120.
@zodern I'll try to lower it to 120 with the next deployment and get back to you. I've been working on a project for more than a year and haven't changed anything major recently. Since upgrading from Meteor 1.8 to 1.9,1.10 I've noticed that the average duration of my deployments slowly increasing. Probably due to Node 12 taking some extra time to build.
@zodern I had a deployment today using 120 instead of 300 and it completed successfully without any issues.