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.
Related
I recently installed Manjaro and followed this tutorial: https://snapcraft.io/install/wekan/manjaro to install wekan. Everything went slicker than snot. I registered an account no issues, open the weken webgui at port 8080 without issue, create new lists and cards fine, but when I go to open the cards I create the connection to 127.0.0.1 is refused. Although it doesn't specify a port, I assume this is a call to the mongodb at the default port 27017, but I also opened up 28017 in the firewall.
Although mongo definitely seems to have been installed since I can see it is running, I can't find a mongod*.conf file on the system to verify the default ports.
This is the first time I used “snap” to install anything, and because it all went so seamlessly I have no clue where to start looking to find the issue. Is there a utility in snap where I can find out exactly what was installed to support wekan (webserver, database, etc.) that I can start checking into as potentials sources of issue. Thks.
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!
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.
I am new to Mongodb. When I run the following command:
sudo service mongodb start
It shows me "mongodb start/running, process 3566". But when I try to stop by giving the below command:
sudo service mongodb stop
It shows stop: Unknown instance:. Do anybody have any idea how to slove this issue.
And if I give sudo service mongodb restart, I'm getting the below message:
stop: Unknown instance:
mongodb start/running, process 3644
PS: If I'm using just mongod, I could start the server and could connect the mongo shell by giving mongo.
Please suggest me how to fix the issue and how to connect mongo shell after giving service mongodb start. Thanks in advance.
I just ran into this.
Chances are the issue is in your conf file (obviously, since you reinstalled the seeded)
In the mongodb.conf do not set fork = true if calling it as a service. This will prevent the service call from being able to access it with service mongodb.conf status/stop/restart.
Removing a fork=True line, however, will alleviate the issue.
See comments; use the other solution even though this one is accepted.
The reason you get the Unknown instance error is because upstart is tracking the wrong PID for the instance of forked mongod process. But the proper solution to this is not running the process in foreground by removing fork=true line from the config like #GoingTharn suggesting, but rather helping upstart to capture the right PID of the forked process by adding
expect daemon
to the /etc/init/mongodb.conf
I faced exactly the same problem and did the followings:
Removed the file mongod.lock (in my case this file was located at /var/lib/mongodb/)
Used the following command from my mongo client
mongo --repair
And that fixed the issue. It may be noted that I had a system crash prior to this problem appeared. Therefore, what I believe, the problem was caused due to the unclean shutdown of the server demon.
If you are unsure of the reason, you may wish to have a look at the log file (in my case I found it under /var/log/mongodb/). That might give you some useful hints.
Thanks.
I faced it as you had.Maybe it is because my computer crash unexpectedly.I use the command: sudo top(ubuntu), and I found mongo running.I killed it and start mongo.Every thing turns right.
I fixed it by myself. Below is what I did:
apt-get install mongodb
And overwrote .conf file. After that everything works fine. I hope this would help someone.
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.