Sphinx not working - Status active (exited) - sphinx

Sphinx installed and it was working. Suddenly it stopped and following error appearing
Sphinx error: connection to unix:///path/runtime/sphinx/var/sphinx.socket failed (errno=111, msg=Connection refused)
● sphinxsearch.service - LSB: Fast standalone full-text SQL search
engine Loaded: loaded (/etc/init.d/sphinxsearch) Active: active
(exited) since Wed 2019-05-08 17:24:31 EDT; 3s ago Process: 2039
ExecStop=/etc/init.d/sphinxsearch stop (code=exited, status=0/SUCCESS)
Process: 2052 ExecStart=/etc/init.d/sphinxsearch start (code=exited,
status=0/SUCCESS)
May 08 17:24:31 bureaubureau systemd[1]: Starting LSB: Fast standalone
full-text SQL search engine... May 08 17:24:31 bureaubureau
systemd[1]: Started LSB: Fast standalone full-text SQL search engine.

Related

Mongod does not start: mongod.service: Failed with result 'signal'

I currently have MongoDB 4.4 installed, as my system does not support 5.0. I have previously had 4.4 installed on Arch Linux, however when I moved over to Ubuntu and tried to run mongod, I get this result from systemd:
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: failed (Result: signal) since Fri 2021-12-10 15:57:00 CST; 2min 3s ago
Docs: https://docs.mongodb.org/manual
Process: 4369 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=killed, signal=ILL)
Main PID: 4369 (code=killed, signal=ILL)
Dec 10 15:57:00 system systemd[1]: Started MongoDB Database Server.
Dec 10 15:57:00 system systemd[1]: mongod.service: Main process exited, code=killed, status=4/ILL
Dec 10 15:57:00 system systemd[1]: mongod.service: Failed with result 'signal'.
MongoDB fails before logs can be created.
While this doesn't completely solve the issue, I'm fine with this resolution:
For whatever reason, 4.2 works fine, but 4.4 doesn't, even though I was completely fine running 4.4 on Arch.

mongodb service fail after reinstalling it on ubuntu

i was using mongodb and it was fine.
then i wanted to convert it to replica set and i get into some problems and i uninstalled it.
after reinstalling (10 times and doing everything on internet xD) why i check status with systemctl status it say failed with exit_code ( i know my conf file dont have problem).
what can i do? i even installed the 3.3 version and even it doesnt start anymore.
i used anything that it came to my mind (purging config files & lot more...).
i really dont want to reinstall my os (really cant).
this is my sudo systemctl status mongod
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2021-02-18 20:05:20 +0330; 8s ago
Docs: https://docs.mongodb.org/manual
Process: 147513 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=1/FAILURE)
Main PID: 147513 (code=exited, status=1/FAILURE)
Feb 18 20:05:20 nima-Lenovo-ideapad-320-15AST systemd[1]: Started MongoDB Database Server.
Feb 18 20:05:20 nima-Lenovo-ideapad-320-15AST mongod[147513]: about to fork child process, waiting until server is ready for connections.
Feb 18 20:05:20 nima-Lenovo-ideapad-320-15AST mongod[147527]: forked process: 147527
Feb 18 20:05:20 nima-Lenovo-ideapad-320-15AST mongod[147513]: ERROR: child process failed, exited with 1
Feb 18 20:05:20 nima-Lenovo-ideapad-320-15AST mongod[147513]: To see additional information in this output, start without the "--fork" option.
Feb 18 20:05:20 nima-Lenovo-ideapad-320-15AST systemd[1]: mongod.service: Main process exited, code=exited, status=1/FAILURE
Feb 18 20:05:20 nima-Lenovo-ideapad-320-15AST systemd[1]: mongod.service: Failed with result 'exit-code'.
I solved the problem by changing the default mongodb port from port 27017 to port 27018 in /etc/mongod.conf.
I'm sure this will come handy to a lot of people.
And for the last part, after uninstalling mongodb I removed mongod.service files (every file) in the system and systemd directories in root and installed mongodb again.
(so I think uninstalling mongodb wasn't complete at first time. And 2 instances interfere with each other. Now everything works fine in mongodb with port 27018).

Unable to start posgtresql?

I have installed postgresql for a long time, but it suddenly stopped working when I added an IP address in the pg_hba file.
I'm trying to run it using sudo service postgresql restart but this doesn't work.
Also
root#ubuntu-dev-server:/# systemctl start postgresql#9.6-main
Job for postgresql#9.6-main.service failed because the service did not take the steps required by its unit configuration.
See "systemctl status postgresql#9.6-main.service" and "journalctl -xe" for details.
And then,
root#ubuntu-dev-server:/# systemctl status postgresql#9.6-main.service
● postgresql#9.6-main.service - PostgreSQL Cluster 9.6-main
Loaded: loaded (/lib/systemd/system/postgresql#.service; indirect; vendor preset: enabled)
Active: failed (Result: protocol) since Fri 2020-07-24 16:56:06 UTC; 1min 54s ago
Process: 31877 ExecStop=/usr/bin/pg_ctlcluster --skip-systemctl-redirect -m fast 9.6-main stop (code=exited, status=0/SUCCESS)
Process: 951 ExecStart=/usr/bin/pg_ctlcluster --skip-systemctl-redirect 9.6-main start (code=exited, status=1/FAILURE)
Main PID: 24944 (code=exited, status=0/SUCCESS)
Jul 24 16:56:06 ubuntu-dev-server systemd[1]: Starting PostgreSQL Cluster 9.6-main...
Jul 24 16:56:06 ubuntu-dev-server postgresql#9.6-main[951]: The PostgreSQL server failed to start. Please check the log output:
Jul 24 16:56:06 ubuntu-dev-server postgresql#9.6-main[951]: 2020-07-24 16:56:06.236 UTC [956] FATAL: could not map anonymous shared memory: Cannot allocate memory
Jul 24 16:56:06 ubuntu-dev-server postgresql#9.6-main[951]: 2020-07-24 16:56:06.236 UTC [956] HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory, swap space, or huge pages. To reduce the request size (currently 148471808 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.
Jul 24 16:56:06 ubuntu-dev-server postgresql#9.6-main[951]: 2020-07-24 16:56:06.236 UTC [956] LOG: database system is shut down
Jul 24 16:56:06 ubuntu-dev-server systemd[1]: postgresql#9.6-main.service: Can't open PID file /run/postgresql/9.6-main.pid (yet?) after start: No such file or directory
Jul 24 16:56:06 ubuntu-dev-server systemd[1]: postgresql#9.6-main.service: Failed with result 'protocol'.
Jul 24 16:56:06 ubuntu-dev-server systemd[1]: Failed to start PostgreSQL Cluster 9.6-main.
I have tried several things but still do not start. Any recommendation is welcome.

Unable to connect Postgres with psql

I have checked the server status with sudo service postgresql status
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
Active: active (exited) since Tue 2019-06-11 13:51:09 IST; 15min ago
Process: 929 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 929 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/postgresql.service
Jun 11 13:51:07 ISW114 systemd[1]: Starting PostgreSQL RDBMS...
Jun 11 13:51:09 ISW114 systemd[1]: Started PostgreSQL RDBMS.
Jun 11 13:56:53 ISW114 systemd[1]: Started PostgreSQL RDBMS.
it working fine but when i try with psql i'm getting error as below
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

Mongo DB not working in Ubuntu0.16.04.2

I just installed mongodb by following the instructions at here.
When I try to start mongodb using command
sudo systemctl status mongodb
it goes to next command line and after that i run the command
sudo systemctl status mongodb
I got the following message
mongodb.service - High-performance, schema-free document-oriented database
Loaded: loaded (/etc/systemd/system/mongodb.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2016-08-13 16:37:29 IST; 2min 50s ago
Process: 10572 ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf (code=exited, status=14)
Main PID: 10572 (code=exited, status=14)
Aug 13 16:37:28 nagainfo-Lenovo-G50-70 systemd[1]: Started High-performance, schema-free document-oriented database.
Aug 13 16:37:29 nagainfo-Lenovo-G50-70 systemd[1]: mongodb.service: Main process exited, code=exited, status=14/n/a
Aug 13 16:37:29 nagainfo-Lenovo-G50-70 systemd[1]: mongodb.service: Unit entered failed state.
Aug 13 16:37:29 nagainfo-Lenovo-G50-70 systemd[1]: mongodb.service: Failed with result 'exit-code'.
Please help me to resolve this. I have tried many things like giving permission to log and lib fies. But nothing work for me.
Thanks in advance :)