Im running a wget command via bash script that i have and it keeps getting connection timed out response, I don't want the wget to retry and just run once. how can I stop that:
HTTP request sent, awaiting response... Read error (Connection timed out) in headers.
Retrying.
Use the -t number
--tries=number flag set to 1
You might want to consider switching to curl.
Related
Having problems when using the "sudo" command to make requests through a proxy server:
If i don't use sudo, the request goes through the proxy 10.139.212.25:8080
wget http://www.proxypronto com/
Connecting to 10.139.212.25:8080... connected.
Proxy request sent, awaiting response... 403 Forbidden (Blocked by Trustwave Secure Web Gateway)
2015-12-01 13:11:47 ERROR 403: Forbidden (Blocked by Trustwave Secure Web Gateway).
If I use sudo, the request does not go through the proxy 10.139.212.25:8080
sudo wget http://www.proxypronto com/
Resolving www.proxypronto com ... 96.31.64.186
Connecting to www.proxypronto com |96.31.64.186|:80... failed: Connection refused.
How can I make the requests to go through the proxy when using "sudo"?
Firstly, try the following comand:
sudo http_proxy=$http_proxy wget "http://stackoverflow.com"
At first glance, you need to add enviroment variables to sudoers config:
sudo visudo
add these lines
Defaults env_keep += "ftp_proxy http_proxy https_proxy no_proxy"
or, use separate lines:
Defaults env_keep +="http_proxy"
Defaults env_keep +="https_proxy"
Defaults env_keep +="HTTP_PROXY"
Defaults env_keep +="HTTPS_PROXY"
I need some help with a really strange problem.
I use wget (busybox) to obtain the the IP address of some remote clients, to use it on a DNS (a sort of "homemade ddns"). Those clients run a script that every 5 mins calls
wget -O /dev/null "https://my_dns.org/poll.php?user=User_N&pwd=password_N"
Everything was fine, until I updated my http server to remove TLS1.0/TLS1.1
After updating: running the above command on the clients' console it still works OK, while running it automatically (launching it from a script in /etc/init.d) I get this error:
Connecting to my_dns.org (www.xxx.yyy.zzz:443)
wget: error getting response: Connection reset by peer
...Any idea about why does this happen, and how to fix...?
(The shell on the clients runs as root...)
Thank you in advance for your help
Regards
We have been trying to setup concourse 5.0.0 (we already set up 4.2.2) in our AWS. We have created two instances one is for web and another is for worker. We are able to see the site up and running but we are not able to run our pipeline. we checked the logs and noticed that worker throwing the below error.
Workerr.beacon.forward-conn.failed-to-dial","data":{"addr":"127.0.0.1:7777","error":"dial tcp 127.0.0.1:7777: connect: connection refused","network":"tcp","session":"9.1.4"}}
We are assuming worker is struggling to connect to web instance and wondering if this could be due to missing gdn configuration. Concourse 5.0.0 release included both concourse and gdn binaries. we want to try --garden-config file to see if that fixes the problem.
can somebody suggest how do we write garden config file ?
I had this same problem and solved it using #umamaheswararao-meka's answer. (Using ubuntu 18.04 on EC2)
Also had a problem with containers not being able to resolve domain names (https://github.com/docker/libnetwork/issues/2187). Here is the error message:
resource script '/opt/resource/check []' failed: exit status 1
stderr:
failed to ping registry: 2 error(s) occurred:
* ping https: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
* ping http: Get http://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
What I did:
sudo apt-get install resolvconf -y
# These are cloudflare's DNS servers
sudo echo "nameserver 1.1.1.1" >> /etc/resolvconf/resolv.conf.d/tail
sudo echo "nameserver 1.0.0.1" >> /etc/resolvconf/resolv.conf.d/tail
sudo resolvconf -u
cat /etc/resolv.conf # just to make sure changes are in place
# restart concourse service
Containers make use of resolv.conf and as the file is generated dynamically on ubuntu 18.04 this was the easiest way of making containers inherit this configuration.
Also relevant snippets from man resolvconf
-u Just run the update scripts (if updating is enabled).
/etc/resolvconf/resolv.conf.d/tail
File to be appended to the dynamically generated resolver configuration file. To append
nothing, make this an empty file. This file is a good place to put a resolver options
line if one is needed, e.g.,
it was the issue with gdn(garden binary) which was not configured. we had to include CONCOURSE_BIND_IP=xx.xx.x.x ( IP where your gdn is located) and CONCOURSE_BIND_PORT=7777( gdn's port) in wroker.env file. Which solved the problem for us.
Background
To learn network programming, I tried to write raw socket by Golang, did not use net module.
Procedure
Server binds socket(syscall.Bind) and listens(syscall.Listen).
client tries to connect(syscall.Connect) and server accepts(syscall.Accepts)
server responses "Hello" to socket by syscall.Write.
client reads socket by syscall.Read
then, code is here ->
https://gist.github.com/ryfjwr/21e01fb5e133861b41e981e14ced8672
Problem
above Procedure, while executing step 3, server exists because of broken pipe.
at first, run server
$ go run tcp-server.go
then, run client
$ go run tcp-client.go
then gets broken pipe error.
$ go run tcp-server.go
Write Error
broken pipe
exit
Question
Why Broken pipe occurs? Any other reserch thing?
I investigated same situation, When you have written to a connection that has already been closed by the peer., but, I triggerd sleep, before client exits.
source: c++ - Socket: send() function returned 'Broken Pipe' error - Stack Overflow
I am using Ubuntu 12.04 and i want to deploy in ec2 instance but the following error throws and unable to perform deploy process
krs#ubuntu:~/a/anonymous-ui-deploy$ cap staging deploy:setup
triggering load callbacks
2013-07-24 11:19:15 executing `staging'
triggering start callbacks for `deploy:setup'
2013-07-24 11:19:15 executing `multistage:ensure'
2013-07-24 11:19:15 executing `deploy:setup'
executing "mkdir -p /home/ec2-user/apps/ano_stag /home/ec2-user/apps/ano_stag/releases /home/ec2-user/apps/ano_stag/shared /home/ec2-user/apps/ano_stag/shared/system /home/ec2-user/apps/ano_stag/shared/log /home/ec2-user/apps/ano_stag/shared/pids"
servers: ["ec2-xx-xx-xxx-xx.compute-1.amazonaws.com"]
connection failed for: ec2-user#ec2-xx-xx-xxx-xx.compute-1.amazonaws.com (Errno::ETIMEDOUT: Connection timed out - connect(2))
Please do let me know the answer for this problem to resolve. Thanks in advance
Looks like there is a problem in connection with your servers, one of which is not allowing the other one to talk to.
Make sure you are able to connect to the destination server from the source server.
If not, then ensure the security group of the destination server has an inbound rule to allow ssh access - please see this link for more information.
Ensure that the destination server does not contain a firewall which blocks an incoming connection.
Verify the syslog on both the server and confirm that everything is good.