Error: connect EINVAL hubot - coffeescript

I'm trying to do a msg.httpto a localhost url, but I am getting back the following error:
Error: connect EINVAL 0.0.xx.xx:80 - Local (0.0.0.0:0)
Does anyone know a fix for this?
Edit:
I can of course access the url in the browser.
I've tried (unsuccessfully) to try faking a redirect (using Ubuntu's /etc/hosts file))

Playing around with the hosts file fixed it!

Related

Couldn't connect to mongo DB server (Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error)

I've tried to connect to Mongo for Freecodecamp Back End Development and APIs course. I tried several methods like checking dbPath and removing .sock file, but it keeps showing. Therefore, I investigated more and tried to change the permission but I still couldn't and Im out of idea now. Please checkout how I tried to solve this issue.
Cannot connect to Mongo
Check mongo status. Found 3584 error
Check dbPath
Remove .sock file
5.It reappears when I start mongo
So I checked permission and tried to change it
tried mongod
Please let me know if there's any other way that I can resolve this issue. Thank you for your time.

Yarn: Error: connect ECONNREFUSED 127.0.0.1:443

When I install ELM via yarn, I get
-- ERROR -----------------------------------------------------------------------
Something went wrong while fetching the following URL:
https://github.com/elm/compiler/releases/download/0.19.1/binary-for-windows-64-bit.gz
It is saying:
Error: connect ECONNREFUSED 127.0.0.1:443
NOTE: You can avoid npm entirely by downloading directly from:
https://github.com/elm/compiler/releases/download/0.19.1/binary-for-windows-64-bit.gz
When I manually browse to https://github.com/elm/compiler/releases/download/0.19.1/binary-for-windows-64-bit.gz. I get
However other people can access the link and it downloads the file.
EDIT:
HOSTS File:
127.0.0.1 view-localhost # view localhost server
127.0.0.1 mydevsnapcap.com www.mydevsnapcap.com app.mydevsnapcap.com internal.mydevsnapcap.com
0.0.0.1 mssplus.mcafee.com
Edit
This use to work a few days ago.
More tests:
I cannot access it from my phone and pc using my fibre connection, but I can access it on both my phone and mobile using my mobile connection.
It turns out that it was my ISP that was for some reason blocking the link. I switch to using the google dns and all is good in the hood: https://developers.google.com/speed/public-dns/docs/using
Something in your computer or on your network is resolving the domain github.com to 127.0.0.1, i.e. localhost. Hence, everytime you attempt this access, it tries to reach a service running on the very same computer you're making the request from.
Check your DNS settings.
Check that there are no entries for github.com in the hosts file (on Windows C:\Windows\System32\drivers\etc\hosts, everywhere else /etc/hosts).
If you're running something like Pi-Hole on your network, check, that it doesn't catch github.com

Error in cloning from github

I am trying to clone a repository from github but havn't been able to successfully do so. Please help.I am getting
gaurav#gaurav-Lenovo-IdeaPad-Y500:~$ git clone https://github.com/gauravp94/eden.git
Cloning into 'eden'...
fatal: unable to access 'https://github.com/gauravp94/eden.git/': Failed connect to github.com:1080; Connection timed out
I am running internet thorough my college proxy on Ubuntu 13.10.
Thanks.
Your clone command is valid and working, so basically you seem to have either network problem, dns problem, routing problem or you just tried in moment github was doing something:
Failed connect to github.com:1080; Connection timed out
It works for me, so try again.
The url
https://github.com/gauravp94/eden.git/
is not accessible. Please try opening this url in browser IE. Check if you have access to this url.

wget giving error when downloading certain files

I am facing a problem in downloading some documents programmatically.
For example this link
https://www-950.ibm.com/events/wwe/grp/grp019.nsf/vLookupPDFs/Introduction_to_Storwize_V7000_Unified_T3/$file/Introduction_to_Storwize_V7000_Unified_T3.pdf
can be downloaded from browser, but when I try to get it from wget it doesn't work.
I have tried
wget https://www-950.ibm.com/events/wwe/grp/grp004.nsf/vLookupPDFs/3-Mobile%20Platform%20--%20Truty%20--%20March%208%202012/\$file/3-Mobile%20Platform%20--%20Truty%20--%20March%208%202012.pdf
It gave me this output
--2012-04-18 17:09:42--
https://www-950.ibm.com/events/wwe/grp/grp004.nsf/vLookupPDFs/3-Mobile%20Platform%20--%20Truty%20--%20March%208%202012/$file/3-Mobile%20Platform%20--%20Truty%20--%20March%208%202012.pdf
Resolving www-950.ibm.com... 216.208.176.98
Connecting to www-950.ibm.com|216.208.176.98|:443... connected.
Unable to establish SSL connection.
Can any one help me solve this problem. Thanks in advance.
Add the --no-check-certificate to your original wget command.
Plus you need to ensure that you are using a proxy.
On Linux:
export http_proxy=http://myproxyserver.com:8080
On Windows:
set http_proxy=http://myproxyserver.com:8080
I also found that on windows, because this is a https request, that in order to make it work, I also had to set https_proxy. So
set https_proxy=http://myproxyserver.com:8080
Obviously, change the proxy settings to suite your particular situation.

zend_Http_Client doesn't connect when uploaded to web server

my zend app is working fine on my local server but when i upload all the file to my main webserver, the following code throws this error:
Exception information: Message: Unable to Connect to tcp://stage.mydomain.com:80. Error #0: php_network_getaddresses: getaddrinfo failed: Name or service not
i'm using an this zend function:
$this->_http = new Zend_Http_Client();
$this->_http->setUri('http://staging.mydomain.com/jserver');
$this->_http->setMethod(Zend_Http_Client::POST);
$this->_http->setRawData(json_encode($this->_apirequest));
echo $this->_http->request()->getBody();
this works on my local when i change the URI to my.local/jserver
oh yeh, maybe this could be the problem... to access the staging.mydomain.com i have to change my hosts file for windows.. so the browser redirects to that ip.
not sure.
you are right. remote server knows nothing about your hosts file. try to use ip, not the domain name