firebird3.0.service failed because the control process exited with error code. How to start firebird? - ubuntu-16.04

I'm working with firebird3.0 database suddenly my database is stopped working and when i have checked server status by
$ /etc/init.d/firebird3.0 status
i see server is stopped
● firebird3.0.service - Firebird Database Server ( SuperServer )
Loaded: loaded (/lib/systemd/system/firebird3.0.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-05-16 19:01:13 IST; 29s ago
Process: 9628 ExecStart=/usr/sbin/fbguard -pidfile /run/firebird3.0/default.pid -daemon -forever (code=exited, status=252)
May 16 19:00:58 ADMIN-I-61 systemd1: Starting Firebird Database Server ( SuperServer )...
May 16 19:01:13 ADMIN-I-61 systemd1: firebird3.0.service: Control process exited, code=exited status=252
May 16 19:01:13 ADMIN-I-61 systemd1: Failed to start Firebird Database Server ( SuperServer ).
May 16 19:01:13 ADMIN-I-61 systemd1: firebird3.0.service: Unit entered failed state.
May 16 19:01:13 ADMIN-I-61 systemd1: firebird3.0.service: Failed with result 'exit-code'.
when i'm trying following commands to start server
/etc/init.d/firebird3.0 start
/etc/init.d/firebird3.0 restart
it returns me
[....] Starting firebird3.0 (via systemctl): firebird3.0.serviceJob for firebird3.0.service failed because the control process exited with error code. See "systemctl status firebird3.0.service" and "journalctl -xe" for details.
failed!
My today's firebird.log file is looks like this
ADMIN-I-61 Thu May 16 11:06:37 2019
/opt/firebird/bin/fbguard: guardian starting /opt/firebird/bin/firebird
ADMIN-I-61 Thu May 16 11:07:26 2019
INET/inet_error: bind errno = 98
ADMIN-I-61 Thu May 16 11:07:27 2019
startup:INET_connect:
Unable to complete network request to host "ADMIN-I-61".
Error while listening for an incoming connection.
Address already in use
ADMIN-I-61 Thu May 16 11:07:27 2019
/opt/firebird/bin/fbguard: /opt/firebird/bin/firebird terminated due to startup error (2)
ADMIN-I-61 Thu May 16 11:07:27 2019
/opt/firebird/bin/fbguard: /opt/firebird/bin/firebird terminated due to startup error (2)
ADMIN-I-61 Thu May 16 12:22:35 2019
/opt/firebird/bin/fbguard: guardian starting /opt/firebird/bin/firebird
I have check ports
please help...!

When installing the firebird from the package deb, the line in the file /etc/firebird/3.0/firebird.conf was uncommented:
RemoteBindAddress = localhost
Comment out this line:
**#RemoteBindAddress = localhost**
Default:
RemoteBindAddress =
After changes, you must restart the service firebird.

Related

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.

Problems installing OpenMediaVault 5 on Raspberry Pi 1

BTW, I am trying to install OpenMediaVault on a Raspberry Pi 1, however, whenever I try and install OpenMediaVault on a Raspberry Pi 1, I get problems with the monit package, the FastCGI Process Manager and the openmediavault package too. Here is what happens with the package monit:
monit.service - LSB: service and resource monitoring daemon
Loaded: loaded (/etc/init.d/monit; generated)
Active: failed (Result: exit-code) Since Fri 2020-05-22 13:49:54 BST; 30min ago
Docs: man:systemd-sysv-generator(8)
May 22 13:49:54 raspberrypi systemd[1]: Starting LSB: service and resource monitoring daemon...
May 22 13:49:54 raspberrypi monit[4940]: Starting daemon monitor: monitSegmentation fault
May 22 13:49:54 raspberrypi monit[4940]: failed!
May 22 13:49:54 raspberrypi systemd[1]: monit.service: Control process exit, code=exited,
status=1/FAILURE
May 22 13:49:54 raspberrypi systemd[1]: monit.service: Failed with result 'exit-code'.
May 22 13:49:54 raspberrypi systemd[1]: Failed to start LSB: service and resource monitoring
daemon.
Here is what happens with the FastCGI Process Manager:
php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)
Active: failed (Resul: signal) since Fri 2020-05-22 14:33:21 BST; 6min ago
Docs: man:php-fpm7.3(8)
Main PID: 416 (code=killed, signal=ILL)
May 22 14:33:15 raspberrypi systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...
May 22 14:33:15 raspberrypi systemd[1]: php7.3-fpm.service: Main process exited, code=killed,
status=4/ILL
May 22 14:33:15 raspberrypi systemd[1]: php7.3-fpm.service: Failed with result 'signal'.
May 22 14:33:15 raspberrypi systemd[1]: Failed to start The PHP 7.3 FastCGI Process Manager.
And here is what happens with the package openmediavault:
dpkg: dependency problems prevent configuration of openmediavault:
openmediavault depends on monit; however
Package monit is not configured yet.
dpkg: error processing package openmediavault (--configure):
dependency problems - leaving unconfigured
Could anyone help with this problem?

Fatal error when starting orion context broker

My orion context broker does not start and when I enter the command
/etc/init.d/contextBroker start I get this message
[root#context-broker ~]# /etc/init.d/contextBroker start
Starting contextBroker (via systemctl): Job for contextBroker.service failed because the control process exited with error code. See "systemctl status contextBroker.service" and "journalctl -xe" for details.
[FAILED]
The systemctl status contextBroker.service commannd gives this message
[root#context-broker ~]# systemctl status contextBroker.service
● contextBroker.service - LSB: run contextBroker
Loaded: loaded (/etc/rc.d/init.d/contextBroker; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2019-05-24 11:38:50 UTC; 1min 11s ago
Docs: man:systemd-sysv-generator(8)
Process: 9782 ExecStart=/etc/rc.d/init.d/contextBroker start (code=exited, status=1/FAILURE)
May 24 11:38:47 context-broker.novalocal systemd[1]: Starting LSB: run contextBroker...
May 24 11:38:48 context-broker.novalocal contextBroker[9782]: contextBroker is stopped
May 24 11:38:48 context-broker.novalocal contextBroker[9782]: Starting...
May 24 11:38:48 context-broker.novalocal su[9788]: (to orion) root on none
May 24 11:38:50 context-broker.novalocal contextBroker[9782]: Starting contextBroker... cat: /var/run/contextBroker/contextBroker.pid...irectory
May 24 11:38:50 context-broker.novalocal systemd[1]: contextBroker.service: control process exited, code=exited status=1
May 24 11:38:50 context-broker.novalocal contextBroker[9782]: pidfile not found[FAILED]
May 24 11:38:50 context-broker.novalocal systemd[1]: Failed to start LSB: run contextBroker.
May 24 11:38:50 context-broker.novalocal systemd[1]: Unit contextBroker.service entered failed state.
May 24 11:38:50 context-broker.novalocal systemd[1]: contextBroker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
Also the /tmp/contextBroker.log file looks like this
time=2019-05-24T11:41:12.971Z | lvl=FATAL | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[1753]:restStart | msg=Fatal Error (error starting REST interface)
I checked if mongodb is running and it is running correctly.
UPDATE
With some searching I realised I had to kill the pid of the process and after I did that the service successfully starts according to the messaags but I find it doesnt actually work. When I ask for the status I get the following:
[root#context-broker centos]# /etc/init.d/contextBroker status
● contextBroker.service - LSB: run contextBroker
Loaded: loaded (/etc/rc.d/init.d/contextBroker; bad; vendor preset: disabled)
Active: active (exited) since Sun 2019-05-26 18:34:49 UTC; 4min 56s ago
Docs: man:systemd-sysv-generator(8)
Process: 16295 ExecStop=/etc/rc.d/init.d/contextBroker stop (code=exited, status=0/SUCCESS)
Process: 16319 ExecStart=/etc/rc.d/init.d/contextBroker start (code=exited, status=0/SUCCESS)
May 26 18:34:47 context-broker.novalocal systemd[1]: Starting LSB: run contextBroker...
May 26 18:34:47 context-broker.novalocal contextBroker[16319]: contextBroker is stopped
May 26 18:34:47 context-broker.novalocal contextBroker[16319]: Starting...
May 26 18:34:47 context-broker.novalocal su[16325]: (to orion) root on none
May 26 18:34:49 context-broker.novalocal systemd[1]: Started LSB: run contextBroker.
May 26 18:34:49 context-broker.novalocal contextBroker[16319]: Starting contextBroker... [ OK ]
The log file has the same message as previously.
With some searching again I believe the cause is that the service doesnt have a daemon(??). So if that is the case how do I add one?
Normally when getting the error starting REST interface, it's because there is already a broker running, which means the port is already taken. Make sure there is no broker already running.

fail2ban fails to start ubuntu 16.04

I have used this tutorial to install fail2ban for my Ubuntu 16.04 server.
After going through this I tried to start with: /etc/init.d/fail2ban start
Here was the response:
[....] Starting fail2ban (via systemctl): fail2ban.serviceJob for fail2ban.service failed because the control process exited with error code. See "systemctl status fail2ban.service" and "journalctl -xe" for details.
failed!
When I then run: systemctl status fail2ban.service
I get this:
> fail2ban.service - Fail2Ban Service
Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Tue 2018-05-15 14:01:38 UTC; 1min 40s ago
Docs: man:fail2ban(1)
Process: 4468 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=255)
May 15 14:01:38 tastycoders-prod1 systemd[1]: fail2ban.service: Control process exited, code=exited status=255
May 15 14:01:38 tastycoders-prod1 systemd[1]: Failed to start Fail2Ban Service.
May 15 14:01:38 tastycoders-prod1 systemd[1]: fail2ban.service: Unit entered failed state.
May 15 14:01:38 tastycoders-prod1 systemd[1]: fail2ban.service: Failed with result 'exit-code'.
May 15 14:01:38 tastycoders-prod1 systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart.
May 15 14:01:38 tastycoders-prod1 systemd[1]: Stopped Fail2Ban Service.
May 15 14:01:38 tastycoders-prod1 systemd[1]: fail2ban.service: Start request repeated too quickly.
May 15 14:01:38 tastycoders-prod1 systemd[1]: Failed to start Fail2Ban Service.
Some tutorials at DigitalOcean contain errors. Check your /etc/fail2ban/jail.local. Try to keep it as simple as you can, i.e. keep there only those options you want to change.
Otherwise, if you have copied jail.conf to jail.local (according to the guide at DO), then delete or comment out pam section, if you do not use it, in jail.local file.
Go to line 146 of /etc/fail2ban/jail.local
# [pam-generic]
# enabled = false
# pam-generic filter can be customized to monitor specific subset of 'tty's
# filter = pam-generic
# port actually must be irrelevant but lets leave it all for some possible uses
# port = all
# banaction = iptables-allports
# port = anyport
# logpath = /var/log/auth.log
# maxretry = 6
More details are here: https://github.com/fail2ban/fail2ban/issues/1396