Bootstrap failed: 5: Input/output error while running any service on macOS Big Sur version 11.5.2 - mongodb

I am trying to run mongodb-community#4.2 service using brew services start mongodb-community#4.2 (facing similar error, while running httpd service or any other service)
Following is the error:
Error: Failure while executing; /bin/launchctl bootstrap gui/502 /Users/chiragsingla/Library/LaunchAgents/homebrew.mxcl.mongodb-community#4.2.plist exited with 5.

There can be multiple reasons behind this error message. So, the first thing to do is to find where your mongo related logs are stored. To do that, run the following command -
sudo find / -name mongod.conf
This will get you the mongo db config file. On running this command, I got /usr/local/etc/mongod.conf. You may find it directly under /etc.
On opening mongod.conf, you will find log path mentioned there. You can open the file itself, or instead get the last 15-20 lines of this log file via tail command -
tail -n 15 <<your mongo db log path>>
Now, you will need to debug the issue mentioned in the logs. Generally, I have seen these three sets of issues -
Permission issue with /tmp/mongodb-27017.sock - While some SO answers asked to change the permissions for this file as a solution, my issue with this only went away after I removed this file.
Compatibility issue - If you see a message like Version incompatibility detected, it means that the mongodb version you have currently installed is different from the version whose data is present on your system. Uninstall the current mongodb version and then install the correct older version (if you don't want to lose the data).
Once you have done it, and your mongo is up and running, and you want to upgrade mongodb version, follow this SO answer.
Permission issues with WiredTiger - Using chmod to change file permissions resolved these.
In case you have any issue other than these three, you will still need to search more on SO and figure it out. Hope this was of some help! :)

Related

How to get performance of mongodb cluster from logs using mongodb keyhole?

I have installed Mongodb keyhole in my ubuntu server. Iam trying to analyze performance of a MongoDB cluster from the log file using the below command.
keyhole --loginfo log_file[.gz] [--collscan] [-v]
But the problem is iam getting the below error, eventhough the log file is same directory where iam running the command.Anyone please help me on this.
2022/10/12 11:20:45 open logfilename_mongodb.log.gz.[gz]: no such file or directory
I have fixed the issue with the below command format.
./keyhole -loginfo -v ~/Downloads/logfilepath.log
Glancing at the Logs Analytics readme for the project, it looks like you've got a simple syntax issue here. The [] characters are intending to indicate optional arguments/settings to use when running keyhole.
Have you tried a syntax similar to this?
keyhole --loginfo log_file --collscan -v

What causes error "Connection test failed: spawn npm; ENOENT" when creating new Strapi project with MongoDB?

I am trying to create a new Strapi app on Ubuntu 16.4 using MongoDB. After stepping through the tutorial, here: https://strapi.io/documentation/3.0.0-beta.x/guides/databases.html#mongodb-installation, I get the following error: Connection test failed: spawn npm; ENOENT
The error seems obvious, but I'm having issues getting to the cause of it. I've installed latest version of MongoDB and have ensured it is running using service mongod status. I can also connect directly using nc, like below.
$ nc -zvv localhost 27017
Connection to localhost 27017 port [tcp/*] succeeded!
Here is an image of the terminal output:
Any help troubleshooting this would be appreciated! Does Strapi perhaps log setup errors somewhere, or is there a way to get verbose logging? Is it possible the connection error would be logged by MongoDB somewhere?
I was able to find the answer. The problem was with using npx instead of Yarn. Strapi documentation states that either should work, however, it is clear from my experience that there is a bug when using npx.
I switched to Yarn and the process proceeded as expected without error. Steps were otherwise exactly the same.
Update: There is also a typo in Strapi documentation for yarn. They include the word "new" before the project name, which will create a project called new and ignore the project name.
Strapi docs (incorrect):
yarn create strapi-app new my-project
Correct usage, based on my experience:
yarn create strapi-app my-project
The ENOENT error is "an abbreviation of Error NO ENTry (or Error NO ENTity), and can actually be used for more than files/directories."
Why does ENOENT mean "No such file or directory"?
Everything I've read on this points toward issues with environment variables and the process.env.PATH.
"NOTE: This error is almost always caused because the command does not exist, because the working directory does not exist, or from a windows-only bug."
How do I debug "Error: spawn ENOENT" on node.js?
If you take the function that Jiaji Zhou provides in the link above and paste it into the top of your config/functions/bootstrap.js file (above module.exports), it might give you a better idea of where the error is occurring, specifically it should tell you the command it ran. Then run the command > which nameOfCommand to see what file path it returns.
"miss-installed programs are the most common cause for a not found command. Refer to each command documentation if needed and install it." - laconbass (from the same link, below Jiaji Zhou's answer)
This is how I interpret all of the above and form a solution. Put that function in bootstrap.js, then take the command returned from the function and run > which nameOfCommand. Then in bootstrap.js (you can comment out the function), put console.log(process.env.PATH) which will return a string of all the directories your current environment is checking for executables. If the path returned from your which command isn't in your process.env.PATH, you can move the command into a path, or try re-installing.

Understanding the error message: spdlog::spdlog_ex

I am aware this question is very specific. Nontheless, maybe s.o. can help:
I was trying to compile an open-source code today. (anyone, who's interested, that's the one.) The error message described below occurs after oai_hss -j $PREFIX/hss_rel14.json --onlyloadkey - having followed the step-by-step installation guide to this point.
After typing the aforementioned command in my terminal, the following error is thrown:
terminate called after throwing an instance of 'spdlog::spdlog_ex'
what(): Failed opening file logs/hss.log for writing: No such file or directory
Aborted (core dumped)
Allright, this sounds pretty severy (core dumped). I was searching google for a meaning of that error message. I came across this other github project. Apparently the spdlog class is trying to enable logging from wherever I run my program. And it throws an spdlog_ex error whenever the file it is trying to add to the registry (in this case logs/hss.log) already exists within this registry. So, I guess, the solution to my problem would be to find this registry and delete logs/hss.log. Does this make sense?
Question: Where the heck do I find this registry?
Maybe some background knowledge would be useful: I am trying to compile the open-source code within a VM that is running Ubuntu 18.04.3 LTS bionic with a 4.15.0-66-generic kernel.
I was searching the /tmp directory for a log folder already. There is none. Where else could it be?
open this file
sudo nano /usr/local/etc/oai/hss_rel14.json
you will see some config where you can find logs/hss.log
actually you have to change these 4 value to
logname: "/var/log/hss.log"
statlogname: "/var/log/hss_stat.log"
auditlogname: "/var/log/hss_audit.log"
ossfile: "~/openair-cn/etc/oss.json"
then use sudo touch to create these files
sudo touch /var/log/hss.log
sudo touch /var/log/hss_stat.log
sudo touch /var/log/hss_audit.log
for logname, statlogname, and auditlogname you can change it to whatever file you want but i like to put them together in /var/log folder.
for ossfile , the oss.json is actually in there.
hope this help

Slamdata error when mounting: An unknown error ocurred: 500 ""

I have once before mounted this same database, so I am confident that I have the correct credentials.
During the last session that I had it mounted I was experimenting with my queries, visuals etc. and the session all of a sudden crashed.
Then when I reloaded slamdata, the mount for my database was gone.
Obviously I then tried to remount the same database with the same credentials in order to continue my work. However when I did this I got an error:
There was a problem saving the mount: An unknown error ocurred: 500 ""
And then there is a never ending spin wheel that sits on the mount button. I can leave this pop up and go to the original screen, but nothing occurs. And then if I try to remount again the same error occurs.
I have verified that I can still access my db and collections using robomongo. So if anyone knows what this error message refers to please let me know! I have yet to find its meaning online.
Note: I have already tried uninstalling and reinstalling/ restarted my computer.
In SlamData 4.2.1 this bug has been identified and fixed an issue with the MongoDB connecter that would corrupt the metastore if you use the _id field in a query. The fix is available in the SlamData 4.2.2 release soon
Below is the fix:
Delete the current metastore. Below is the location of this file for each supported operating system:
Mac OS:
$HOME/Library/Application Support/quasar/quasar-metastore.db.mv.db
Microsoft Windows:
%HOMEDIR%\AppData\Local\quasar\quasar-metastore.db.mv.db
Linux (various vendors):
$HOME/.config/quasar/quasar-metastore.db.mv.db
Open a terminal and switch to the location that you stored SlamData into. You should find a quasar-web.jar file in the following location based on your installed operating system based on default installation paths:
Mac OS:
/Applications/SlamData 4.2.1.app/Contents/java/app/quasar-web.jar
Microsoft Windows:
C:\Program Files (x86)\slamdata 4.2.1\quasar-web.jar
Linux (various vendors):
$HOME/SlamData 4.2.1/quasar-web.jar
Run the following command in a terminal:
java -jar quasar-web.jar initUpdateMetaStore
This will rebuild your metastore. Once complete it will return you to your operating system prompt.
Rerun the SlamData application as you normally would
Remount your database
At this point in time you can access your saved workspaces.
NOTE: You will not want to open the workspace you were using that caused this issue as it will cause the same problem.

Not able to start Sphinx Search- error 1067

I am trying to install the Sphinx Search Server. I followed the steps given here http://itsonrail.wordpress.com/2010/05/23/installing-sphinx-on%C2%A0windows/
I added C:\Sphinx\bin to environment path and Sphinx Search is listed in the Services panel. When I try to start it, this error occurs:
Windows could not start SphinxSearch service on local computer
Error: 1067 The process terminated unexpectedly.
Please help me solving this problem. Thanks in advance.
I trid this http://sphinxsearch.com/forum/view.html?id=2684 but it didn't help.
I had the same error in my Windows 7 x64. The step below helped to solve my problem:
Create folders data and log in C:\Sphinx.
Then try to start sphinx with cmd:
C:\sphinx\bin>searchd
I have faced the same problem and eventually moved the sphnix.conf to C:\Sphinx\bin\sphnix.conf from root and the services starts. Please try this. (Please make sure there are data\, log\ directories in the root with write permission)
It is looking like your configuration is not setup properly. Have you tried to run search daemon from sphinx directory path via command prompt?
C:\sphinx\bin> searchd
C:\sphinx\bin>indexer --rotate –all
Also please ensure the log via search.log or windows event log.
If it is not running after this than try to reinstall it again
I hope it will work for you
Error 1067 doesn't say much about the problem, except that the process terminated unexpectedly. Try looking some more informations in searchd.log.
I've got same error code when I tried to update Sphinx with newer version.
In the log file, I've found
FATAL: no valid indexes to serve
My problem was that I tried running new version of Sphinx using index files created with an older version. It was solved by deleting all old index files and creating new indexes.
==>> close your cmd window and restart the sphinxsearch service...
I got this error suddenly, when Shpinx was working fine yesterday. Turns out the query log file was hitting 4Gb in size. I deleted it, and service started with no problems.
Make sure all the folders defined in the conf file actually exist. I was missing the LOG folder and that's why I was getting the error. Once I added the folder, the problem was solved.