heroku ECONNREFUSED: connect ECONNREFUSED for all run command
Asked Answered
R

2

9

I'm receiving ECONNREFUSED for heroku run any_command_here. Heroku login is successful. Other heroku commands are successful as well (apps,releases, sharing). App is running. I can even access heroku logs. Ubuntu version is 14.04.

Rearmost answered 13/1, 2016 at 13:43 Comment(9)
I think your question might be better suited for ServerFaultIndelicacy
@Aperçu. Unfortunately there is no message to help. It just prints ▸ ECONNREFUSED: connect ECONNREFUSED +server_ip:5000 and that all. I can see that I've been added to this app. My ssh key is added to heroku account. I can see logs for this app, but I can't evaluate run command =( I removed ubuntu heroku toolbelt and reinstall it as Standalone, but this didn't help.Rearmost
Is it possible you have a firewall or proxy server blocking a connection?Molecular
@JamesWard Can you be a little bit more specific? I've checked this sudo ufw status it returns Status: inactiveRearmost
You can see that the heroku-run plugin in the CLI is probably attaching to a non-standard port: github.com/heroku/heroku-run/blob/master/commands/run.js#L103 You probably have a firewall or something between you and that server that is blocking access. You could file an issue on that project.Molecular
BTW: You can see an example URL in the Heroku Platform API docs: devcenter.heroku.com/articles/platform-api-reference#dynoMolecular
Just wondering, does "server_ip" (as in "+server_ip:5000") begin with "192.168"? If so, then it's probably an external firewall (between your computer and the internet; aka inside your network).Wellman
@Coder256 . Thanks for pointing thing about server ip. It was external firewall. Not on my local machine, but in office network. You can write answer and I will accept it.Rearmost
Did you find any solution for running commands (without :detach) even when behind a firewall?Diligent
W
3

There may be an external firewall - a firewall between your computer and the internet (inside your network). Chances are that if the server_ip begins with 192.168, then that is the case.

Wellman answered 22/1, 2016 at 21:57 Comment(2)
how can i solve this problem? how can i disable such firewall? my address is 127.0.0.1Consolatory
You can't disable the firewall, but see this answer.Rudolfrudolfo
H
13

Try running

heroku run:detached your command here

and it will fly, if the issue was the firewall.

Histaminase answered 22/6, 2017 at 9:6 Comment(2)
Allows commands to execute, but stdout of these commands won't be attached to your terminal, so you can't open an interactive shell with heroku run bash.Rudolfrudolfo
devcenter.heroku.com/articles/using-the-cli#using-an-http-proxyWept
W
3

There may be an external firewall - a firewall between your computer and the internet (inside your network). Chances are that if the server_ip begins with 192.168, then that is the case.

Wellman answered 22/1, 2016 at 21:57 Comment(2)
how can i solve this problem? how can i disable such firewall? my address is 127.0.0.1Consolatory
You can't disable the firewall, but see this answer.Rudolfrudolfo

© 2022 - 2024 — McMap. All rights reserved.