rsync: failed to connect to hgdownload.cse.ucsc.edu (128.114.119.163) - server

For reasons I don't understand, rsync does not work for me since today.
I tried to fix the problem by following steps described here : https://askubuntu.com/questions/628102/15-04-rsync-connection-refused
but it did not work...
I am working on a laptop with Ubuntu 16.04 as OS, and have a wired ethernet connection.
I made several queries on the UCSC server yesterday, so maybe their server blocks my connection ?
Example of a query I would like to do :
rsync -a -P rsync://hgdownload.cse.ucsc.edu/goldenPath/hg38/database/cytoBand.txt.gz ./
Here is the Error message :
rsync: failed to connect to hgdownload.cse.ucsc.edu (128.114.119.163): Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(128) [Receiver=3.1.1]
Tell me what you think and if there is any solution to make it work again.
Thank you in advance for your help.
Edit:
UCSC answered me : no problem on their side. The problem definitely come from me. Still looking for a solution.

It looks like the rsync daemon is not running on the remote host, or perhaps it is running on a non-standard port (default is 873).
It's also possible that connections are being blocked by a firewall. Were your earlier successful connections made from the same location, or are you now testing from elsewhere?
As a workaround you can access the files via HTTP using any browser or HTTP command line tools such as curl, wget et. al. Either of these should work:
$ curl http://hgdownload.cse.ucsc.edu/goldenPath/hg38/database/cytoBand.txt.gz -o cytoBand.txt.gz
$ wget http://hgdownload.cse.ucsc.edu/goldenPath/hg38/database/cytoBand.txt.gz

Since rsync is still not working (I tweet to UCSC to ask about it),
I decided to use the tools curl and wget that mhawke advised me, but using the ftp adresses instead of http (slower) :
curl ftp://hgdownload.cse.ucsc.edu/goldenPath/hg38/database/cytoBand.txt.gz -o cytoBand.txt.gz
wget http://hgdownload.cse.ucsc.edu/goldenPath/hg38/database/cytoBand.txt.gz
If anyone has a solution for the rsync problem, or any informations saying that the problem could come from the UCSC server, I would be thankful.
Cheers !
Edit:
I received an answer from UCSC : no problem about rsync on the side of the UCSC server. So the problem definitely comes from me. I tried on 3 different computers on different places, all running under Ubuntu 16.04. I am still looking for a solution.

Thanks to a mail answer from a guy working at UCSC:
I tried the same command line but on the mirror site : ftp://hgdownload-sd.cse.ucsc.edu.
which gave this command line :
rsync -a -P rsync://hgdownload-sd.cse.ucsc.edu/goldenPath/hg38/database/cytoBand.txt.gz ./
I tried it. It worked.
And here comes the best part: in my case I try the command line that did not work... and it works again:
rsync -a -P rsync://hgdownload.cse.ucsc.edu/goldenPath/hg38/database/cytoBand.txt.gz ./
So I did not had any explanations on where does the problem came from. But problem solved!

Related

Busybox wget strange behaviour

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

Giving matlab code sudo permissions? Unconnectable-connected ftp port

I'm trying to use this code to pull a bunch of data from the ModelNet data base located at vision.cs.princeton.edu I'm using the already written matlab code from the website itself; however, I'm encountering permissions errors whenever I run the code because wget (which the code uses) is located in a restricted directory in the server. Normally I would just use sudo; however, I can't seem to run sudo matlab as a command. My question is does anybody know a way to remotely run matlab code from a server and somehow give it permissions that sudo normally would give? Also, could someone try ftping to vision.cs.princeton.edu at port 80? For some reason I'm able to connect to that port, but the connection seems to be closed and I can't ping that address either I get 100% package loss.
Thanks
Use urlread instead of wget, this should fix your issues.

missing mysqld.sock and mysqld in /etc/init.d

I tried today to connect to MySQL server and saw that I did'nt have any mysqld.sock anymore, nowhere.
I tried several ways to get it back, but unsuccessfull. I tried to execut a
./mysqld.start in /etc/init.d, but it's also missing.
Should I reinstall mysql, or is there a way to get a socket back ?
try using following command
service mysql start
This will work.
#Nueva, if that doesn't work, reboot the system. I just had an Ubuntu build on EC2 lose its mysqld.sock file, and a simple reboot solved the problem.
Failing that, I've also heard that forcing the connection via tcp instead of localhost has worked for some people. I tried that, but got nothing.

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.

MongoDb connection refused

This is my first attempt to consume MongoDB. I've got Mongo running:
ps -ef | grep [m]ongo
mongodb 11023 1 0 Jun24 ? 00:00:03 /usr/lib/mongodb/mongod --config /etc/mongodb.conf
And the error comes as the result of doing
Datastore.save( stuff ); // (pseudo code)
The error:
Jun 27, 2011 3:20:29 PM com.mongodb.DBTCPConnector fetchMaxBsonObjectSize
WARNING: Exception determining maxBSON size using0
java.io.IOException: couldn't connect to [russ-elite-book/127.0.1.1:27017] bc:java.net.ConnectException: Connection refused
at com.mongodb.DBPort._open(DBPort.java:206)
at com.mongodb.DBPort.go(DBPort.java:94)
at com.mongodb.DBPort.go(DBPort.java:75)
at com.mongodb.DBPort.findOne(DBPort.java:129)
at com.mongodb.DBPort.runCommand(DBPort.java:138)
...
Note that I'm using 127.0.0.1:27017 for my connection, which works to the Mongo shell. Also, I get the admin page in the browser using http://localhost:28017.
Profuse thanks for any and all ideas!
I ran into the same issue because I upgraded my mongo using brew. To fix this issue. Look for the conf file(which might not be located in the bin directory where you start your mongodb from)
/usr/local/Cellar/mongodb-2.2.whatever/mongod.conf, and comment out the "bind_ip" property.
(I think it slightly bad form to answer one's own question, but in fact, the answer turns out to be none of those suggested. Nevertheless, my profuse thanks to all of them. When answering a question, one needs to be able to assume it's based on correctly installed and working software. I did not have that.)
I installed MongoDB using the Ubuntu Software Center. It worked from the shell and from the browser as noted elsewhere in this question. However, it did not work from Java (nor from Django either).
The problem, despite what it said in the Java stack trace, was simply "connection refused."
The solution is to install it from proper Mongo sources and not to trust the Ubuntu repository.
(Yes, this also frequently happens to other products obtain from there too, like Eclipse, but you know it's such a nice service that you want to trust it.)
If you want to read how I installed what then worked, check out http://www.javahotchocolate.com/tutorials/mongodb.html.
I had the same problem, but my solution was different. I was using "localhost" as the host name and changing it to "127.0.0.1" fixed it.
Most likely the Java driver cannot connect to the address specified.
Make sure that you can connect to that address 127.0.1.1:27017 using the shell and run "db.isMaster()".
Maybe it is an issue of 127.0.1.1 vs 127.0.0.1.
It turns out that it is an issue with the Java MongDB driver.
There are two solutions:
Using version 2.8 or higher of the Java driver.
Edit the configuration files and if it contains the line bind_ip = 127.0.0.1 or bind_ip = localhost, comment it out.
Eating humble pie...
As I showed in my comment to Russ Bateman's own answer, it seemed like an issue with the Ubuntu package at first. The real reason is that the config file that comes with it does define a value for bind_ip...
I ran into the same issue because I installed my mongo using apt-get. Here's how to fix it:
Find your mongod.conf file. In Ubuntu 14.04, it's /etc/mongod.conf
Open mongod.conf file and command the line bindIp = 127.0.0.1
Restart mongod
It appears that this is a security issue or an invalid url. If you used the default configuration, you should be able to access the http://yourmachine:28017. See if you can navigate to the admin page from this url. If you are able to navigate to the admin url, just replace the port number with 27017 in your app. It should work.
It's hard to say without seeing your .conf file contents. One thing I would recommend is running the mongo shell and seeing if you can connect, query, and write from it. This will help isolate server vs. a java client issue. Additionally it may give you a different form of the error which may be a hint.
Are you setting --port in your .conf file?
For me, it was a completely different solution. I am using Spring MVC framework, and all I had to do is to confirm that the configuration XML files are saying the same thing in the /target folder as well as the non-target folders. Once that was adjusted, everything worked. The problem was that everything worked when run from a STS, but when deployed, I had the mentioned error.