question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: connect ECONNREFUSED 192.168.100.12:22

See original GitHub issue

I have a Meteor App based on Angular 1.3 + Meteor 1.5.2.2. I am using Ubuntu 17. I am trying to deploy my Meteor App on local machine first before going for live server. But I am facing this issue when running mup setup command

martinihenry@martinihenry:~/mytestapp-prod/.deploy$ mup setup

Started TaskList: Setup Docker
[192.168.100.12] - Setup Docker
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED 192.168.100.12:22
    at Object.exports._errnoException (util.js:907:11)
    at exports._exceptionWithHostPort (util.js:930:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1078:14)

Here is my mup.json:

module.exports = {
  servers: {
    one: {
      // TODO: set host address, username, and authentication method
      host: '192.168.100.12',
      username: 'root',
      // pem: './path/to/pem'
      // password: 'server-password'
      // or neither for authenticate from ssh-agent
    }
  },

  app: {
    // TODO: change app name and path
    name: 'mytestapp-prod',
    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: '192.168.100.12:3000',
      MONGO_URL: 'mongodb://localhost/meteor',
    },

    // ssl: { // (optional)
    //   // Enables let's encrypt (optional)
    //   autogenerate: {
    //     email: 'email.address@domain.com',
    //     // comma separated list of domains
    //     domains: 'website.com,www.website.com'
    //   }
    // },

    docker: {
      // change to 'kadirahq/meteord' if your app is using Meteor 1.3 or older
      image: 'abernix/meteord:base',
    },

    // Show progress bar while uploading bundle to server
    // You might need to disable it on CI servers
    enableUploadProgressBar: true
  },

  mongo: {
    version: '3.4.1',
    servers: {
      one: {}
    }
  }
};

What could be wrong here?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
lc3t35commented, Apr 8, 2018

Workaround :

1) remove proxy from config and deploy
2) mup deploy --settings settings-staging.json
3) add proxy in config file and setup proxy only
mup proxy setup
Started TaskList: Setup proxy
[@] - Setup Environment
[@] - Setup Environment: SUCCESS
[@] - Pushing the Startup Script
[@] - Pushing the Startup Script: SUCCESS
[@] - Pushing Nginx Config
[@] - Pushing Nginx Config: SUCCESS
[@] - Cleaning Up SSL Certificates
[@] - Cleaning Up SSL Certificates: SUCCESS

Started TaskList: Start proxy
[@] - Start proxy
[@] - Start proxy: SUCCESS
5) mup reconfig --settings settings-staging.json
Started TaskList: Configuring App
[@] - Pushing the Startup Script
[@] - Pushing the Startup Script: SUCCESS
[@] - Sending Environment Variables
[@] - Sending Environment Variables: SUCCESS

Started TaskList: Start Meteor
[@] - Start Meteor
[@] - Start Meteor: SUCCESS
[@] - Verifying Deployment
[@] - Verifying Deployment: SUCCESS

For information mup proxy status fails too

mup status
=> Servers
  - @: Ubuntu 16.04

=> Docker Status
 - @: 17.05.0-ce Running

=> Meteor Status
 - @: running 
    Created at 2018-03-14T23:14:42.482710285Z
    Restarted 0 times
    ENV: 
     - ROOT_URL=https:// ....
....
 - NODE_VERSION=8.4.0
    Exposed Ports:
     - 80/tcp
    App available through reverse proxy
     - Available in app's docker container: true
Error: connect ECONNREFUSED @:22
    at Object.exports._errnoException (util.js:1050:11)
    at exports._exceptionWithHostPort (util.js:1073:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1093:14)
1reaction
lc3t35commented, Mar 14, 2018

Same for me but only with proxy option, pass if I comment proxy (which does not setup proxy)

mup setup --settings settings-staging.json 

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

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

Started TaskList: Setup proxy
[@] - Setup Environment
[@] - Setup Environment: SUCCESS
[@] - Pushing the Startup Script
[@] - Pushing the Startup Script: SUCCESS
[@] - Pushing Nginx Config
[@] - Pushing Nginx Config: SUCCESS
[@] - Cleaning Up SSL Certificates
events.js:163
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED @:22
    at Object.exports._errnoException (util.js:1050:11)
    at exports._exceptionWithHostPort (util.js:1073:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1093:14)

If I remove proxy option

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

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

Started TaskList: Setup Mongo
[@] - Setup Environment
[@] - Setup Environment: SUCCESS
[@] - Copying mongodb.conf
[@] - Copying mongodb.conf: SUCCESS

Started TaskList: Start Mongo
[@] - Start Mongo
[@] - Start Mongo: SUCCESS

Next, you should run:
    mup deploy

Here is proxy option in mup.js

//  proxy: {
//    domains: 'x.y.z',
//    ssl: {
//      letsEncryptEmail: 'a@b.c',
//    }
//  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Connect ECONNREFUSED at err connect - Stack Overflow
The error ECONNREFUSED is exactly what it sounds like: The connection was refused by the system you're attempting to connect why because ...
Read more >
Error: connect ECONNREFUSED 192.168.xx.xx:80 #22 - GitHub
If I ping the DHC or use the php-devoloAPI I get a proper reaction. Login credentials as well as the uuid, .. are...
Read more >
Meteor Up - Error: connect ECONNREFUSED 192.168.100.12
I have a Meteor App based on Angular 1.3 + Meteor 1.5.2.2. I am using Ubuntu 17. I am trying to deploy my...
Read more >
Error: connect ECONNREFUSED 192.168.7.2:3306
7.2 to listen on the relevant interface. 192.168. 7.2 is running Windows) to tell it to bind to that interface, then re-start mysqld....
Read more >
How can I fix ECONNREFUSED error when the server is running
ECONNREFUSED means no process is listening at the given address and port. We need 3 things: the content of the configuration file /etc/mongod....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found