arunoda / meteor-up-legacy

Production Quality Meteor Deployments
MIT License
2.26k stars 398 forks source link

Error: Timed out while waiting for handshake? #1119

Open scheung38 opened 7 years ago

scheung38 commented 7 years ago

Mup.json

{
  "servers": [
    {
      "host": "172.17.0.2",
      "username": "root",
      "pem": "~/.ssh/id_rsa",
      "sshOptions": {
        "port": 12345
      },
      "env": {}
    }
  ],
  "setupMongo": true,
  "setupNode": true,
  "setupPhantom": true,
  "nodeVersion": "0.10.40",
  "appName": "spark2acs",
  "app": "..",
  "env": {
    "PORT": 3012,
    "ROOT_URL": "http://172.17.0.2/",
    "CLUSTER_WORKERS_COUNT": "auto",
    "MONGO_URL": "mongodb://@localhost:27017/meteor"
  },
  "deployCheckWaitTime": 600,
  "enableUploadProgressBar": true
}

Installing Docker
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: Timed out while waiting for handshake
    at null._onTimeout (/usr/local/lib/node_modules/mupx/node_modules/nodemiral/node_modules/ssh2/lib/client.js:138:17)
    at Timer.listOnTimeout (timers.js:92:15)
trevordowdle commented 7 years ago

Having same issue here

trevordowdle commented 7 years ago

If I remove

"sshOptions": { "port": 12345 }

I can get it to go through in MUPX - https://github.com/kadirahq/meteor-up

edu2969 commented 7 years ago

I tried deploy the same proyect in 2 diferents servers, the only difference between them its the IP, SSH and HTTP ports

Machine 1: configured with local ip 192.168.x.xxx, SSH 22, HTTP 80 Machine 2: configures with private IP, SSH 2221, HTTP 8081

But, in the machine 2, mupx setup give the error:

Installing Docker
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: Timed out while waiting for handshake
    at null._onTimeout (/usr/local/lib/node_modules/mupx/node_modules/nodemiral/node_modules/ssh2/lib/client.js:138:17)
    at Timer.listOnTimeout (timers.js:92:15)

The node, n, nodejs, npm, mupx, debian version are the same. Help?

edu2969 commented 7 years ago

Issue resolved. I was using public IP addres, then I replace for internal IP addres. So, replace your public IP

"host": "172.17.0.2"

by you IP getting throw ifconfig like

"host": "192.168.x.xxx"

Good luck!

mattlinares commented 7 years ago

@edu2969 Hi Edu, how exactly did you find that second IP to replace the first? Thanks..

edu2969 commented 7 years ago

@mattlinares, the internal IP idress is find using ifconfig command, considering your internet-interface that you are using. In my case, my server is connecting using ETHERNET port (tipically called eth0)

$ sudo ifconfig
eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
          inet addr:192.168.1.127  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: .................../64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6726717 errors:0 dropped:0 overruns:0 frame:0
          TX packets:275809 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2561775346 (2.3 GiB)  TX bytes:37218918 (35.4 MiB)

En the 2nd line appear the attribute inetaddr: 192.168.1.127, use it.

mattlinares commented 7 years ago

Thanks for this. My problem was actually that the server was down, so not connecting. The error is the same :/

I appreciate your comment though.