2017-10-16 36 views
0

我想用MUP构建一个Meteor应用程序到NGINX驱动的服务器。半年前,我做了它,一切都很好,但现在我得到这个错误:“未处理”错误“事件”或如何在NGINX上使用mup部署meteor应用程序?

events.js:141 
    throw er; // Unhandled 'error' event 
Error: connect ECONNREFUSED 188.166.60.237:22 
at Object.exports._errnoException (util.js:907:11) 
at exports._exceptionWithHostPort (util.js:930:20) 
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1081:14) 

这里是我的MUP.js:

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

    app: { 
    // TODO: change app name and path 
    name: 'realmotion', 
    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:// 
     PORT:'8080', 
     ROOT_URL: 'https://realmotion.io', 
     MONGO_URL: 'mongodb://localhost/meteor' 
    }, 

    // ssl: { // (optional) 
    // // Enables let's encrypt (optional) 
    // autogenerate: { 
    //  email: '[email protected]', 
    //  // 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: 'kadirahq/meteord' 
    }, 

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

    mongo: { 
    version: '3.2.12', 
    port: 27017, 
    servers: { 
     one: {} 
    } 
    } 
}; 
+1

你可以手动运行'ssh -v @'并共享输出吗? –

+0

服务器的IP地址是否已更改? – Mikkel

+0

@DerekBrown here: 'root @ server-main:〜#ssh -v @<188。***。***。237> -bash:意外标记附近的语法错误'newline' –

回答

0

只是为了记录这个为他人在未来 - 这个错误是由于SSH端口被防火墙阻止而引起的。确保您的部署主机可以通过SSH访问。

如何做到这一点将取决于您的特定系统; Ubuntu(取决于版本)将需要ufwiptables的推荐,RHEL系列将需要firewallctliptables。只需查找特定系统的防火墙文档即可。

相关问题