cURL error 28: Failed to connect to systemb port 80: Timed out for http://systemb/api/push_products [duplicate] - laravel

This question shows research effort; it is useful and clear
I have checked the cURL not working properly
When I run the command curl -I https://www.example.com/sitemap.xml
curl: (7) Failed to connect
Failed to connect on all port
this error only on one domain, all other domain working fine, curl: (7) Failed to connect to port 80, and 443
Thanks...

First Check your /etc/hosts file entries, may be the URL which You're requesting, is pointing to your localhost.
If the URL is not listed in your /etc/hosts file, then try to execute following command to understand the flow of Curl Execution for the particular URL:
curl --ipv4 -v "https://example.com/";

After many search, I found that Hosts settings not correct
Then I check nano /etc/hosts
The Domain point to wrong IP in hosts file
I change the wrong IP and its working Fine
This is new error Related to curl: (7) Failed to connect

curl: (7) Failed to connect
The above error message means that your web-server (at least the one specified with curl) is not running at all — no web-server is running on the specified port and the specified (or implied) port. (So, XML doesn't have anything to do with that.)

you can download the key with browser
then open terminal in downloads
then type sudo apt-key add <key_name>.asc

Mine is Red Hat Enterprise(RHEL) Virtual Machine and I was getting something like the following.
Error "curl: (7) Failed to connect to localhost port 80: Connection refused"
I stopped the firewall by running the following commands and it started working.
sudo systemctl stop firewalld
sudo systemctl disable firewalld

If the curl is to the outside world, like:
curl www.google.com
I have to restart my cntlm service:
systemctl restart cntlm
If it's within my network:
curl inside.server.local
Then a docker network is overlapping something with my CNTLM proxy, and I just remove all docker networks to fix it - you can also just remove the last network you just created, but I'm lazy.
docker network rm $(docker network ls -q)
And then I can work again.

Related

curl: (7) Failed to connect to localhost port 9200: Connection refused. Even after having configured /etc/elasticsearch/elasticsearch.yml

I am trying to check if elasticsearch is properly working on Ubuntu 14.04. So for that, I am running following commands:
$ sudo service elasticsearch start
$ curl -X GET 'http://localhost:9200'
Error:
curl: (7) Failed to connect to localhost port 9200: Connection refused
I am attaching screenshot of my /etc/elasticsearch/elasticsearch.yml file here and also attaching my-application.log
The problem is pretty evident from the log file
org.elasticsearch.ElasticsearchException: X-Pack is not supported and Machine Learning is not available for [linux-x86]; you can use the other X-Pack features (unsupported) by setting xpack.ml.enabled: false in elasticsearch.yml
Simply add this to your elasticsearch.yml config file and restart the service
xpack.ml.enabled: false

VNC viewer failing to make connection with "channel 3: open failed: connect failed: No route to host"

I ssh into a server with the following:
ssh -g -L5912:server:5912 user#host
It goes through, and I can access my files on the other server through the command line (meaning I can connect to the server, it is my vnc viewer that is failing!) but when I try to open my vnc viewer (RealVNC) and connect to localhost:12 i get the following error message in the vnc viewer application:
The connection closed unexpectedly.
Additionally in the original command line shell i get:
channel 3: open failed: connect failed: No route to host
I've tried switching to different ports and even checked out other posts on the same error message but the problem is i don't really understand them... ssh tunnels are still relatively new to me so i don't really know what im doing. Any help would be greatly appreciated. Thanks!
You're trying to setup a port forwarding, this may fail because of many reasons:
SSH port forwarding not enabled in the host
Check SSH server in the host if AllowTcpForwarding is enabled:
$ grep AllowTcpForwarding /etc/ssh/sshd_config
AllowTcpForwarding yes
Typically, it's commented out. Uncomment and restart the sshd.
No connection between the host and server over port 5912
SSH to the host and try:
$ telnet server 5912
Connected to server.
Escape character is '^]'.
Finally, does the server listen on 5912?
Similarly, as above, but from the server - go there and try telnet server 5912.
Best regards,
Jarek
In my case it was the port forwarding rule I had set in Putty.
Please make sure you enter the correct hostname when defining the rule in Putty. I changed
localhost:5903
with
myserver:5903
and it worked...

Bash Ubuntu on Windows 10, connect to host port 22: Connection Failure

I just installed the Bash Ubuntu on Windows 10 natively. When I try and acess a remote server I get ssh: connect to host HOSTNAME port 22: Connection refused
I have tried to find a solutions, but the solutions doesn't work.
This is what I have tried:
https://askubuntu.com/questions/59458/error-message-sudo-unable-to-resolve-host-user/733120#733120
When I could not acess /etx/hosts I tried this:
https://askubuntu.com/questions/326239/cannot-access-etc-hosts
After downloading gksudo to try and edit /etc/hosts I got this error message (gksudo:2601): Gtk-WARNING **: cannot open display:
Are u sure everything is correctly setup?
I just tried
ssh -T git#github.com
in my Bash on Ubuntu on Windows.
and it totally works Returning
Hi <usernamer>! You've successfully authenticated, but GitHub does not provide shell access.
Maybe you have some settings that prevent connections? for example in ~/.bashrc?
Maybe your server needs a different port? use ssh -p 2222 for that.

How to fix Docker's "Error pulling image...too many redirects" failures while pulling images from registry?

I am running Docker via CoreOS and Vagrant on OS X 10.10.
When I run docker pull ubuntu in CoreOS, I got following errors:
$ docker pull ubuntu
Pulling repository ubuntu
cc0067db4f11: Error pulling image (precise) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/, Get https://cdn-registry-1.docker.io/v1/images/cc0067db4f11198ef6fd0435f96a973e559b1cebfceb2bc8e4fe527b32045c2f/ancestry: dial tcp: lookup cdn-registry-1.dcc0067db4f11: Error pulling image (precise) from ubuntu, Get https://cdn-registry-1.docker.io/v1/images/cc0067db4f11198ef6fd0435f96a973e559b1cebfceb2bc8e4fe527b32045c2f/ancestry: dial tcp: lookup cdn-registry-1.docker.io on [10.0.2.3]:53: too many redirects
6006e6343fad: Error pulling image (quantal) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/, Get https://cdn-registry-1.docker.io/v1/images/6006e6343fadaaeb5dd98436a3cd17eac8c03cabca1ed4c8778d039e72ebcc9c/ancestry: dial tcp: lookup cdn-registry-1.d6006e6343fad: Error pulling image (quantal) from ubuntu, Get https://cdn-registry-1.docker.io/v1/images/6006e6343fadaaeb5dd98436a3cd17eac8c03cabca1ed4c8778d039e72ebcc9c/ancestry: dial tcp: lookup cdn-registry-1.docker.io on [10.0.2.3]:53: too many redirects
7656cbf56a8c: Error pulling image (13.04) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/, Get https://cdn-registry-1.docker.io/v1/images/7656cbf56a8c831de71ef43809b04fcf8125e7b039250835b6c5f6f280daf12e/ancestry: dial tcp: lookup cdn-registry-1.doc7656cbf56a8c: Error pulling image (13.04) from ubuntu, Get https://cdn-registry-1.docker.io/v1/images/7656cbf56a8c831de71ef43809b04fcf8125e7b039250835b6c5f6f280daf12e/ancestry: dial tcp: lookup cdn-registry-1.docker.io on [10.0.2.3]:53: too many redirects
3db9c44f4520: Error pulling image (lucid) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/, Get https://cdn-registry-1.docker.io/v1/images/3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710/ancestry: dial tcp: lookup cdn-registry-1.doc3db9c44f4520: Error pulling image (lucid) from ubuntu, Get https://cdn-registry-1.docker.io/v1/images/3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710/ancestry: dial tcp: lookup cdn-registry-1.docker.io on [10.0.2.3]:53: too many redirects
5cf8fd909c6c: Error pulling image (trusty) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/, Get https://cdn-registry-1.docker.io/v1/images/5cf8fd909c6ccc61199df6dbeb165767b83c23842ef49ca3ef3b81ece1bdce4f/ancestry: dial tcp: lookup cdn-registry-1.do5cf8fd909c6c: Error pulling image (trusty) from ubuntu, Get https://cdn-registry-1.docker.io/v1/images/5cf8fd909c6ccc61199df6dbeb165767b83c23842ef49ca3ef3b81ece1bdce4f/ancestry: dial tcp: lookup cdn-registry-1.docker.io on [10.0.2.3]:53: too many redirects
d2099a5ba6c5: Error pulling image (saucy) from ubuntu, endpoint: https://cdn-registry-1.docker.io/v1/, Get https://cdn-registry-1.docker.io/v1/images/d2099a5ba6c5a0f94f84162d69b4cb79b47c7ea1768550c6cee55a7ba2dc3647/ancestry: dial tcp: lookup cdn-registry-1.docd2099a5ba6c5: Error pulling image (saucy) from ubuntu, Get https://cdn-registry-1.docker.io/v1/images/d2099a5ba6c5a0f94f84162d69b4cb79b47c7ea1768550c6cee55a7ba2dc3647/ancestry: dial tcp: lookup cdn-registry-1.docker.io on [10.0.2.3]:53: too many redirects
2014/06/05 12:17:11 Could not find repository on any of the indexed registries.
I'd really appreciate if anyone could give me a useful advise on how to troubleshoot this problem.
Try this temporary workaround:
osx$ boot2docker up
osx$ boot2docker ssh
docker#boot2docker$ sudo echo "nameserver 8.8.8.8" > /etc/resolv.conf
docker#boot2docker$ sudo /etc/init.d/docker restart
It works until reboot.
I don't know about OS X, but on linux this could happen due to "bad" /etc/resolv.conf on the host. For example, ubuntu puts something like:
nameserver 127.0.1.1
and then handles the DNS requests through some service. The problem is, that this is accessible from inside of the image.
To fix this, I had to add some external nameservers, like:
nameserver 127.0.1.1
nameserver 8.8.8.8
nameserver 8.8.4.4
10.0.2.3 is virtualbox dns server, check Fine-tuning the VirtualBox NAT engine
You can as other suggested use 8.8.8.8 which is google dns server.
# /etc/resolve.conf
nameserver 8.8.8.8
And if you work in intranet, then replace it with your normal dns server, which you can add search as well like below
# /etc/resolve.conf
nameserver xxx.xxxx.xxx
search company.com
This will be good to access your private repo
I had a similar issue when trying to pull a container from docker repository with this command :
docker pull ubuntu
Note that I was using coreos inside virtualbox and I was using Nat as my Networking Configuration to have access to internet. When Switching network modes with virtualbox, I couldn't do any pull.
I solved the issue by restarting docker with systemctl by iniating this command :
sudo systemctl restart docker
And then my pull worked fine. I hope this solution helped you. And I got it from from google group issue addressed by one of CoreOS creators(Brandon Philips) through this link:
https://groups.google.com/forum/#!topic/coreos-dev/vWqSbPgNYro
On MacOSX, if you use Docker Machine you can try to:
docker-machine ls
docker-machine ssh YOUR_VM_NAME
and then from within the VM:
kill the /usr/local/bin/docker process and start it again by hand:
sudo /usr/local/bin/docker -d -D -g /var/lib/docker -H unix:// -H tcp://0.0.0.0:2376 --label provider=virtualbox --tlsverify --tlscacert=/var/lib/boot2docker/ca.pem --tlscert=/var/lib/boot2docker/server.pem --tlskey=/var/lib/boot2docker/server-key.pem -s aufs
Funnily enough, restarting like this
sudo /etc/init.d/docker restart
does not help.
On windows I was able to fix it by doing the following:
Go to virtual box application
Delete the VM that was created
Restart computer (optional, i think)
Start Kitematic
Go back to Virtual Box, hit show
Make sure ping google.com command works
Now I am able to download docker images from the hub.

"network error: connection refused", putty error

I am trying to run putty on Windows 7.
I need to run some SSH commands to upgrade Magento. Every time putty gives me this fatal error:
network error: connection refused
I have even tried to use it through winSCP. Note that putty is running fine on my client's side, but for me it's giving me that error every time.
I tried using port 22, 23 and a few others without success. I have also tried with Windows Firewall both enabled and disabled.
Thank you.
Install open-ssh or ssh in target Linux machine solved my problem .
Use below commands:
sudo apt install ssh
sudo systemctl status ssh
sudo systemctl enable ssh
The following are the list of possibilities of this error:
1) Common cause is - Your IP is blocked or not whitelisted in the server which can be done by editing the file at /etc/csf/csf.conf
2) Disable the windows firewall settings and check..
The above two things should work in most of the cases
3) This is very unusual and when the above two options fails it is very difficult to find the solution
In this case the traceroute to the server host or IP works usually but putty fails
port 22 looks normal and working but connection fails and restarting SSH (service ssh restart) also does not work
reboot or restart the server but still fails
Adding IP in firewalls or whitelisting the local IP may not workout
This case generally happens when the server is migrated or new server. IP of the old server might be whitelisted locally, but don't have port 22 open, or some other local filtering is occurring for this new IP but not the old server IP..
In this case you need to change the port to some 522 or 530 some unusual port will help in sorting it out.. The same port you have to use for the SFTP connection also .. where as FTP connections works normally..
or you have to whitelist the IP locally or open the TCP in and out to port 22 if you want to use the port 22..

Resources