zodern / meteor-up

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

Trying to deploy my app but its giving Unhandled 'error' event #49

Closed THPubs closed 8 years ago

THPubs commented 8 years ago

I tried to deploy a meteor 1.3 app with this version of mup and repeatedly got this error :

[46.101.252.105] - setup docker
events.js:154
      throw er; // Unhandled 'error' event
      ^

Error: Timed out while waiting for handshake
    at [object Object]._onTimeout (/home/pubudu/meteor-up/node_modules/ssh2/lib/client.js:138:17)
    at Timer.listOnTimeout (timers.js:92:15)

Any idea what's happening?

madushan1000 commented 8 years ago

Seems like a missing SSH key/password or something. Can you post your mup.js file here?

THPubs commented 8 years ago

Sure. Here's the mup.js. I can login with those credentials :-)

module.exports = {
  servers: {
    one: {
      host: '10.0.0.151',
      user: 'pubudu',
      password: 'password'
      // "sshOptions": {
      //   "port": 5722
      // }
      // pem: './mykey',
    },
  },

  meteor: {
    name: 'jltfrontend',
    path: '../jlt-frontend',
    servers: {
      one: {},
    },
    env: {
      ROOT_URL: 'http://jlt.leafycode.com',
      MONGO_URL: 'mongodb://localhost/jltdb'
    },
  },

  mongo: {
    oplog: true,
    port: 27017,
    servers: {
      one: {},
    },
  },
};
madushan1000 commented 8 years ago

can you try adding this under sshOptsions

{ 
  'StrictHostKeyChecking': 'no', 
  'UserKnownHostsFile': '/dev/null',
  'ConnectTimeout': '60'
}

also check if your VM has internet connection.

THPubs commented 8 years ago

I added it like this :

  password: 'password',
  sshOptions: {
    'StrictHostKeyChecking': 'no',
    'UserKnownHostsFile': '/dev/null',
    'ConnectTimeout': '60'
  }

and now I see this error :-(

[188.166.243.100] - setup docker
events.js:154
      throw er; // Unhandled 'error' event
      ^

Error: All configured authentication methods failed
    at tryNextAuth (/home/pubudu/meteor-up/node_modules/ssh2/lib/client.js:290:17)
    at SSH2Stream.onUSERAUTH_FAILURE (/home/pubudu/meteor-up/node_modules/ssh2/lib/client.js:469:5)
    at emitTwo (events.js:100:13)
    at SSH2Stream.emit (events.js:185:7)
    at parsePacket (/home/pubudu/meteor-up/node_modules/ssh2-streams/lib/ssh.js:3647:10)
    at SSH2Stream._transform (/home/pubudu/meteor-up/node_modules/ssh2-streams/lib/ssh.js:552:13)
    at SSH2Stream.Transform._read (_stream_transform.js:166:10)
    at SSH2Stream._read (/home/pubudu/meteor-up/node_modules/ssh2-streams/lib/ssh.js:213:15)
    at SSH2Stream.Transform._write (_stream_transform.js:154:12)
    at doWrite (_stream_writable.js:292:12)
    at writeOrBuffer (_stream_writable.js:278:5)
    at SSH2Stream.Writable.write (_stream_writable.js:207:11)
    at Socket.ondata (_stream_readable.js:529:20)
    at emitOne (events.js:90:13)
    at Socket.emit (events.js:182:7)
    at readableAddChunk (_stream_readable.js:147:16)
jononomo commented 8 years ago

I am having exactly the same problem. I am using release 1.3-beta-5.

madushan1000 commented 8 years ago

The

...
password: 'password'
...

should be

...
pass: 'password'
...

This should be fixed in the readme. I'll add a fix so it works for both pass and password. Thank you for the help

THPubs commented 8 years ago

Ahaa great it was the issue! Now it's fixed... Thanks bro! :-)

THPubs commented 8 years ago

I think the issue is now solved. Now we need to use password instead of pass. Im closing the issue :-)

gloffreda commented 8 years ago

I'm having the same issue:

Meteor Up: Production Quality Meteor Deployments

“ Checkout Kadira! It's the best way to monitor performance of your app. Visit: https://kadira.io/mup

Building Started: . events.js:154 throw er; // Unhandled 'error' event ^

Error: spawn meteor ENOENT at exports._errnoException (util.js:890:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32) at onErrorNT (internal/child_process.js:348:16) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) at Function.Module.runMain (module.js:449:11) at startup (node.js:146:18) at node.js:404:3

and here is my mup.json

{
  "servers": [
    {
      "host": "host.com",
      "username": "username",
      "password": "password"   
    }
  ],

  "setupMongo": true,
  "setupNode": true,
  "nodeVersion": "0.10.40",
  "setupPhantom": true,
  "enableUploadProgressBar": true,

  "appName": "flashsite",
  "app": ".",

  "env": {
    "ROOT_URL": "http://host.com",
    "PORT": 3001
  },

  "deployCheckWaitTime": 15
}
madushan1000 commented 8 years ago

Do you have meteor binary in your path?

gloffreda commented 8 years ago

Hi Madushan Yes I do. But something strange is in my whole system. I'm doing a fresh install and will try again. I'll update here as soon as finish the install. Thanks

Rathius commented 8 years ago

I'm seeing this when I try to deploy to AWS

Building Started: /Development/cville200 events.js:154 throw er; // Unhandled 'error' event ^

Error: spawn meteor ENOENT at exports._errnoException (util.js:890:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32) at onErrorNT (internal/child_process.js:348:16) at _combinedTickCallback (node.js:383:13) at process._tickCallback (node.js:407:11) at Function.Module.runMain (module.js:449:11) at startup (node.js:142:18) at node.js:939:3

Here's my mup.json file

{
 // Server authentication info
  "servers": [
    {
      "host": "the IP address",
      "username": "ubuntu",
      //"password": "password",
      // or pem file (ssh based authentication)
     "pem": "location of my .pem file"
    }
  ],

  "setupMongo": true,

  "setupNode": true,

  "nodeVersion": "0.10.36",

  "setupPhantom": true,

  "enableUploadProgressBar": true,

  "appName": "cville200Web",

  "app": ".",

  "env": {
    "ROOT_URL": "the root URL"
  },

  "deployCheckWaitTime": 15
}
madushan1000 commented 8 years ago

Do you have meteor binary in the PATH of your build machine?

Rathius commented 8 years ago

well I assumed it was since I can run meteor create from any folder on my machine, but I'll double-check to make sure.

Rathius commented 8 years ago

I ran "which meteor" from the command prompt in my home directory and this was what it returned. /usr/local/bin/meteor So by that I'm assuming that it is in my PATH. Any other suggestions?

Rathius commented 8 years ago

oh wait, by build machine are you referring to my computer or the remote server?

madushan1000 commented 8 years ago

wherever you are running mup.

Rathius commented 8 years ago

That's what I thought but wanted to make sure.

I'm trying to deploy to AWS. I did it once earlier this year but I can't find the mup.json file for that deployment.

edu2969 commented 7 years ago

I was using public IP addres, then I replace for internal IP addres. So, replacing mi public IP

"host": "172.xxx.xxx.xxx"

by internal IP, getting throw ifconfig like

"host": "192.168.x.xxx"

Resolve the issue. Im using Meteor 1.4.3.2 in Debian 8, with Node 4.6.2 y NPM 2.15.11

Good luck!

erperejildo commented 7 years ago

If I use pass instead password I get this issue:

1 Validation Error:

  • "servers.one.pass" is an unknown property
zodern commented 7 years ago

@erperejildo you should use password instead of pass

SachaG commented 6 years ago

In case this helps anyone: I was getting this error but then realized my own local network tool (Little Snitch) was blocking the connection.

SpaceG commented 4 years ago

Hello Everybody. @madushan1000 madushan1000 @SashaG

I try to Deploy Telescope app to the DigitalOcean Ubuntu Server. But, I'm always stuck here at the the Deploy with mup.js

Here is my mup.js file :

module.exports = {
    servers: {
      one: {
        host: 'xxx.xx.xx.xx',
        username: 'root',
        password: 'xxxx',
        pem: '~/.ssh/id_rsa'
      }
    },

    meteor: {
      name: 'Telescope',
      path: '.',
      servers: {
       one: {}
      },

      buildOptions: {
        serverOnly: true
      },

      env: {
        ROOT_URL: 'http://app.xxxxx.co',
        MONGO_URL: 'mongodb+srv://xxx:xxx@testcluster-dtnie.mongodb.net/test'
      },
      dockerImage: 'abernix/meteord:base',
      deployCheckWaitTime: 60

    },

  };

But it give me Terminal Commandline Output :

root@ubuntu-s-56vcpu-2gb-ams33-01:~# mup setup
loaded config from /root/mup.js

1 Validation Error
  - "docker" is an unknown property

Read the docs and view example configs at
    http://meteor-up.com/docs

Started TaskList: Setup Docker
[167.71.14.98] - Setup Docker
[167.71.14.98] - Setup Docker: SUCCESS

Started TaskList: Setup Meteor
[167.71.14.98] - Setup Environment
[167.71.14.98] - Setup Environment: SUCCESS

Next, you should run:
    mup deploy
root@ubuntu-s-56vcpu-2gb-ams33-01:~# mup deploy
loaded config from /root/mup.js

1 Validation Error
  - "docker" is an unknown property

Read the docs and view example configs at
    http://meteor-up.com/docs

Building App Bundle Locally
/ is not a meteor app

Can you tell me, what's wrong, why it tell me it's not a meteor app? it's a meteor app, how sasha tells : https://github.com/SachaG/Telescope and I'm also look at some other : https://github.com/brunoamaral/Telescope

Can you tell me, if the mup.js is setup correctly? Thanks

SachaG commented 4 years ago

I would strongly recommend using Vulcan.js (the Forum example app here: https://github.com/VulcanJS/Vulcan-Starter/tree/master/packages/example-forum) instead of Telescope, since Telescope hasn't been updated in years.

SpaceG commented 4 years ago

Hello @SachaG

Ok, that's mean, i can install vulcan.js and install packages. there also the same one like telescope app? when i work with these packages?... maybe can you example me, how to set up, or which packages i need to get telescope = (Apollo) ? in the [https://github.com/VulcanJS/Vulcan-Starter/blob/master/packages/example-forum/package.js] (https://github.com/VulcanJS/Vulcan-Starter/blob/master/packages/example-forum/package.js) . Now, I'm afraid. lol.. Telescope was so awesome. but it came at the false Time. Now, i need urgent. like a telescopeapp. That's a Bumer...It's possible to get the result like telescopeapp?

Thanks a lot for letting me know that, vulcan.js is more than a GraphQl..

SpaceG commented 4 years ago

Hello @SachaG

I were stalking again for TelescopeApp :) found this : https://www.slideshare.net/JustinReynolds9/vulcanjs-austin-presentation-159281933 this guy, there is the same nova. like in the TelescopeApp.

Where to get it? and how to get fit. fast :) ^^ Looks awesome.. and my head beginning to bling bling.. 👍

Found another theme of yours : https://github.com/VulcanJS/Fuji-Theme but, don't need a Video Uploader. Just Linking like in the Telescope App. This theme Fuji will upload Videos?...

This is everything new for me, now. Thought VulcanJS is a Javascript Framework for animating datas or something like things. looks like.

Never thought is a Framework. ?! Now, after years, i find out it's a Framework to Building apps etc. LIke to work more with components.. just like, i want a login, just don't code for hours etc.

Hope i will get the same result like the Guy above in the Slideshow. Need it urgent. Is the "Nova" a Theme?

SpaceG commented 4 years ago

Me again @SachaG a lot of death links everywhere. and the starter project looks really bad. i don't know. ?!.- sad, you killet Telescope. - It means, i nead to build the app like telescope app it self.? .. i don't get it, very mess arround the docs and death links everywhere. remove this all..