I just got mongo running yesterday, I entered C:\mongodb\bin\mongod.exe, then bought up another command prompt and entered the same thing again, and it was working fine. I ended up shutting it down wrong and now im getting unable to create/open lock file: data/db/mongod/lock because it is being used by another process. I have tried all of what im seeing but getting not recognized errors. It was a little test db, so i want to just get rid of it so i can open mongo again. I deleted the file.lock from my db file as well, but not sure it worked seems like it left and was back again, but it might just be me.
I know this is a super easy problem, just not getting it. Where should i be entering these command, im following the instructions, but i know im not inputing them in the right place because none of them work at all. I tried just inputting them, in C, in C: data/db, i entered C:\mongodb\bin\mongod.exe left it open and opened another command prompt and enter everything in there to. I can't just reset mongodb? Does anyone know what I'm missing maybe it's i have no windows knowledge at all, i'm trying to use it because i know javascript a little php/sql and i'm trying to learn node.js when i had it working in the shell it was great, but with this set up stuff i'm lost. I'm understanding everything there saying but just not where to do it i think.
Someone please lol, i just uninstalled mongodb and reinstalled and same problem.
mongod --repair (is not recognized as internal, or external command)
db.repairDatabase(same,,is not recognized as internal, or external command);
\data\db\mongod.lock (asks how i want to open it)
This is my set up, i think mongod is the problem, but can't get rid of it.
Computer>Windows>data>db
_tmp
joural
local
local.ns
mongod locked file
edit*** not sure if i removed the lock or not but i got it to work. I should have wrote down how i did it but pretty sure this was it.
open a command prompt cd\ enter it cd mongodb\bin enter it open another command cd\ enter it cd mongoDb\bin enter it. in the first command enter mongod then in the other one enter mongo. Don't know if this is right way, but i got me to be able to play with mongodb like i wanted.
try to remove mongod.lock and journal, then restart.
Related
I am a beginner of MERN and while learning Mongodb I used to open my server using my PowerShell by the command mongod but I got to know that I can do the same from my VS code terminal. But unfortunately, it is not starting the server for some reason. There is no error that it prints on the screen. It simply prints some data and doesn't start the server. It is running mongo command perfectly on my terminal. Can anyone tell me why it is starting?
The error got fixed. Actually my project was in D drive and my data folder was into my C drive so whenever I was opening the terminal using mongod command. It used to find the data folder and as it didn't used to find it on D drive. It therefore used to close it up at the same time. Though if it would have shown the error correctly then it would have been better to fix it up.
I used cd C: command to change into the C: drive and then used the command mongod
So mongo was running fine, and then I tried to create a database and a collection. Long story short, the server stopped responding. I thought (after about 6 hours of trying everything else, asking my friends and getting literally nowhere) that maybe I should just uninstall and reinstall mongoDB. Turns out that was a mistake, because now when I try to do the mongo command I get this
$ mongo
bash: /c/Program Files/MongoDB/Server4.4/bin/mongo.exe: No such file or directory
I noticed that there is no "/" between Server and 4.4 --- I think that's the issue, but I have no idea how to fix that. An yes, I have added MongoDB to my system variable path...
What is going on here?
It seems like commands are working now. I guess I just needed to wait like 8 hours!?
I'm trying to start Libreoffice impress automatically once my raspberry pi has started up.
I created:
.config/lxsession/LXDE/autostart
and added my presentation:
sudo libreoffice -show /home/pi/test.odp
When i execute the command in a terminal, all works fine.
However the autostart doesn't seem to work at boot. Libreoffice starts, but then says it can't find the file...
The file .config/lxsession/LXDE/autostart is used to start applications without root privileges. Therefore, you should remove "sudo" from your code:
libreoffice -show /home/pi/test.odp
That should work as intended. If your presentation need root privileges (I don't see why it would, but anyway), you could use gksudo on your code, then at boot you would see a window asking for your password to proceed. The new code would look like this:
gksudo libreoffice -show /home/pi/test.odp
Important: please note you should not try to open a GUI enabled application with sudo or root privileges, as this can have bad consequences, such as modifying permissions and ownership on program files, which could lead to malfunctioning. If you really need to open a GUI application as root, always use gksudo or gksu.
On the other hand, if you really need to open a program at boot with root privileges, you should look into using the file /etc/rc.local or the cron service for that.
On an Ubuntu 14.04, I have started to receive the following warning (or error) each time I start a new session in terminal :
Unable to make or open a FIFO for universal variables with path '/run/user/0/fishd.12c79b706e7a.notifier': Permission denied
When I try to look into this file, the file does not exist at all.
I had a similar problem setting my terminal to fish in IntelliJ IDEA on Manjaro.
Every time I opened up the terminal, it kept printing the following error message;
Unable to open universal variable file '/opt/intellij-idea-ultimate-edition/plugins/terminal/fish/fish_variables': Permission denied
The solution I used, while not ideal did stop the error message - it's trying to write to a root controlled location from user land. from the terminal type the following command:
chown -R USER:USER /opt/intellij-idea-ultimate-edition/plugins/terminal/fish
This is fish issue #2222.
The problem seems to be that you get the wrong value for $XDG_RUNTIME_DIR. In that issue the reporter said su -l caused it, which, unlike what the documentation said, did not clear $XDG_RUNTIME_DIR or set it again to the wrong value.
I get a much more benign issue on fish 2.2.0 (and current git):
fish: No TTY for interactive shell (tcgetpgrp failed)
setpgid: Inappropriate ioctl for device
which seems not to break anything, so I can only recommend upgrading.
I installed MongoDB both on Win 7 and on Mac OS X, and both places, I got mongod (the server) and mongo (the client).
But at both places, running mongod will fail if I double click on the file, and the error message was gone too quickly before I can see anything. (was better on Mac because Terminal didn't exit automatically and showed the error message).
Turned out it was due to /data/db not exist and the QuickStart guide says: By default MongoDB will store data in /data/db, but it won't automatically create that directory
I just have a big question that MongoDB seems to want a lot of people using it (as do many other products), but why would it not automatically create the folder for you? If it didn't exist... creating it can do not much harm... especially you can state so in the user agreement. The question is why. I can think of one strange reason, but the reason may be too strange to list here...
One good reason would be that you do not want it in /data/db. In this case, you want it to fail with an error when you forgot to specify the correct directory on the command line. The same goes for mis-spelled directory names. If MongoDB just created a new directory and started to serve from there, that would not be very helpful. It would be quite confusing, because databases and collections are auto-created, so there would not even be errors when you try to access them.