Couchdb 3.2.2 does not start on boot after instaltion - couchdb

I had installed the couchdb 3.2.1. The service started automatically on server boot. After upgrading automatically to 3.2.2 all went wrong and i removed 3.2.1 and made a fresh install of 3.2.2. All is working except the start of the service if the server boots. What can i do to fix this? Thank you.
EDIT:
Following the suggestion of Honeywild, i confirm that the service is enabled. I reboot the server and the couchdb did not started again. In the log appeared this:
[error] 2022-04-26T12:49:53.718192Z couchdb#127.0.0.1 <0.3835.0> -------- OS Process died with status: 143
[error] 2022-04-26T12:49:53.719167Z couchdb#127.0.0.1 <0.3894.0> -------- OS Process died with status: 143
[error] 2022-04-26T12:49:53.838879Z couchdb#127.0.0.1 <0.3835.0> -------- gen_server <0.3835.0> terminated with reason: {exit_status,143}
[error] 2022-04-26T12:49:53.839013Z couchdb#127.0.0.1 <0.3835.0> -------- gen_server <0.3835.0> terminated with reason: {exit_status,143}
[error] 2022-04-26T12:49:53.839087Z couchdb#127.0.0.1 <0.3894.0> -------- gen_server <0.3894.0> terminated with reason: {exit_status,143}
[error] 2022-04-26T12:49:53.839171Z couchdb#127.0.0.1 <0.3894.0> -------- gen_server <0.3894.0> terminated with reason: {exit_status,143}
[error] 2022-04-26T12:49:53.843963Z couchdb#127.0.0.1 <0.3835.0> -------- CRASH REPORT Process (<0.3835.0>) with 0 neighbors exited with reason: {exit_status,143} at gen_server:handle_common_reply/8(line:805) <= proc_lib:init_p_do_apply/3(line:226); initial_call: {couch_os_process,init,['Argument__1']}, ancestors: [<0.3834.0>], message_queue_len: 0, links: [<0.279.0>], dictionary: [], trap_exit: false, status: running, heap_size: 987, stack_size: 28, reductions: 5062
[error] 2022-04-26T12:49:53.844450Z couchdb#127.0.0.1 <0.3835.0> -------- CRASH REPORT Process (<0.3835.0>) with 0 neighbors exited with reason: {exit_status,143} at gen_server:handle_common_reply/8(line:805) <= proc_lib:init_p_do_apply/3(line:226); initial_call: {couch_os_process,init,['Argument__1']}, ancestors: [<0.3834.0>], message_queue_len: 0, links: [<0.279.0>], dictionary: [], trap_exit: false, status: running, heap_size: 987, stack_size: 28, reductions: 5062
[error] 2022-04-26T12:49:53.844742Z couchdb#127.0.0.1 <0.3894.0> -------- CRASH REPORT Process (<0.3894.0>) with 0 neighbors exited with reason: {exit_status,143} at gen_server:handle_common_reply/8(line:805) <= proc_lib:init_p_do_apply/3(line:226); initial_call: {couch_os_process,init,['Argument__1']}, ancestors: [<0.3893.0>], message_queue_len: 0, links: [<0.279.0>], dictionary: [], trap_exit: false, status: running, heap_size: 987, stack_size: 28, reductions: 8319
[error] 2022-04-26T12:49:53.845669Z couchdb#127.0.0.1 <0.3894.0> -------- CRASH REPORT Process (<0.3894.0>) with 0 neighbors exited with reason: {exit_status,143} at gen_server:handle_common_reply/8(line:805) <= proc_lib:init_p_do_apply/3(line:226); initial_call: {couch_os_process,init,['Argument__1']}, ancestors: [<0.3893.0>], message_queue_len: 0, links: [<0.279.0>], dictionary: [], trap_exit: false, status: running, heap_size: 987, stack_size: 28, reductions: 8319
[error] 2022-04-26T12:49:53.867452Z couchdb#127.0.0.1 <0.549.0> -------- gen_server <0.549.0> terminated with reason: killed
[error] 2022-04-26T12:49:53.867542Z couchdb#127.0.0.1 <0.549.0> -------- gen_server <0.549.0> terminated with reason: killed
[error] 2022-04-26T12:49:53.867706Z couchdb#127.0.0.1 <0.549.0> -------- CRASH REPORT Process (<0.549.0>) with 0 neighbors exited with reason: killed at gen_server:decode_msg/9(line:475) <= proc_lib:init_p_do_apply/3(line:226); initial_call: {couch_multidb_changes,init,['Argument__1']}, ancestors: [<0.431.0>,couch_replicator_sup,<0.397.0>], message_queue_len: 0, links: [], dictionary: [], trap_exit: true, status: running, heap_size: 2586, stack_size: 28, reductions: 12699
[error] 2022-04-26T12:49:53.867823Z couchdb#127.0.0.1 <0.549.0> -------- CRASH REPORT Process (<0.549.0>) with 0 neighbors exited with reason: killed at gen_server:decode_msg/9(line:475) <= proc_lib:init_p_do_apply/3(line:226); initial_call: {couch_multidb_changes,init,['Argument..
Then i simple run service couchdb start, and it started without any problem.
This kind of problems did not occur in previous couchdb version and usually i simple made upgrade without any problems. I am using Ubuntu 20.04.04 LTS.
Any more ideas? Than you.

First of all, check if the systemctl service is enabled, run systemctl is-enabled
sudo systemctl list-unit-files | grep enabled | grep couchdb
or
sudo systemctl list-unit-files --state=enabled | grep couchdb
if the output to a console will be empty, run:
sudo systemctl enable couchdb.service
then check again:
sudo systemctl list-unit-files --state=enabled | grep couchdb
next, if the service has been enabled, you did right, you followed a good practice, which is to identify the error in the logs.
Probably you tried:
sudo journalctl -u couchdb.service
and then you found the error which you mentioned above.
Further research steps can include:
Disable the systemd service (temporary): systemctl disable couchdb
Reboot
Run the application manually not as a systemd service /path/to/couchdb and check a result.
Run the application manually with strace strace /path/to/couchdband check a result.
One more idea:
You have to be sure that the service is started after the network is started
More:
agree and conduct a diagnostic session together to understand what exactly causes this error.

There was an update from couchdb that fixed the problem: now version is 3.2.2-2 in ubuntu.

Related

EB CLI create failed with error: TypeError - expected str, bytes or os.PathLike object, not NoneType

I'm first time I deploy an nodejs expresss application to AWS using EB CLI follow by aws guide
First step, I run eb init success.
Next step, I run eb create my-env to create an environment. And I get a error message:
ERROR: TypeError - expected str, bytes or os.PathLike object, not NoneType
Update: This's log when I run eb logs
/var/log/eb-engine.log
----------------------------------------
2021/02/24 02:37:43.600169 [INFO] Executing instruction: RunAppDeployPreDeployHooks
2021/02/24 02:37:43.600179 [INFO] The dir .platform/hooks/predeploy/ does not exist in the application. Skipping this step...
2021/02/24 02:37:43.600191 [INFO] Executing instruction: stop X-Ray
2021/02/24 02:37:43.600196 [INFO] stop X-Ray ...
2021/02/24 02:37:43.600212 [INFO] Running command /bin/sh -c systemctl show -p PartOf xray.service
2021/02/24 02:37:43.607595 [WARN] stopProcess Warning: process xray is not registered
2021/02/24 02:37:43.607611 [INFO] Running command /bin/sh -c systemctl stop xray.service
2021/02/24 02:37:43.615106 [INFO] Executing instruction: stop proxy
2021/02/24 02:37:43.615123 [INFO] Running command /bin/sh -c systemctl show -p PartOf httpd.service
2021/02/24 02:37:43.623248 [WARN] deregisterProcess Warning: process httpd is not registered, skipping...
2021/02/24 02:37:43.623266 [INFO] Running command /bin/sh -c systemctl show -p PartOf nginx.service
2021/02/24 02:37:43.628431 [WARN] deregisterProcess Warning: process nginx is not registered, skipping...
2021/02/24 02:37:43.628457 [INFO] Executing instruction: FlipApplication
2021/02/24 02:37:43.628462 [INFO] Fetching environment variables...
2021/02/24 02:37:43.628470 [INFO] setting default port 8080 to application
2021/02/24 02:37:43.628559 [INFO] Purge old process...
2021/02/24 02:37:43.628593 [INFO] Register application processes...
2021/02/24 02:37:43.628598 [INFO] Registering the proc: web
Update 2: Now, I deployed my application to AWS EB by manual (upload source zip). I still find and fix above problem.
I search many time but I not found solution to fix it. If you understand my problem, please help me. Thank you so much.
FINAL UPDATE: I resolved problem by this comment. problem involve to git config.

Postgresql 13 Installation failing on Ubuntu 20.04 (code=exited, status=203/EXEC)

I've been trying to install PostgreSQL on Ubuntu 20.04 (VPS) but I always get an error.
I followed this article to install it.
EDIT: I also followed the instructions from the PostgreSQL website to install it from repository. I get the same error.
The line that breaks the installation is here (2nd time I try to install it):
$ sudo apt install postgresql-13 postgresql-client-13
It outputs:
Reading package lists... Done
Building dependency tree
Reading state information... Done
postgresql-13 is already the newest version (13.1-1.pgdg20.04+1).
postgresql-client-13 is already the newest version (13.1-1.pgdg20.04+1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up postgresql-common (223.pgdg20.04+1) ...
Not replacing deleted config file /etc/postgresql-common/createcluster.conf
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:
Job for postgresql.service failed because the control process exited with error code.
See "systemctl status postgresql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript postgresql, action "start" failed.
● postgresql.service - PostgreSQL database server
Loaded: loaded (/etc/systemd/system/postgresql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-11-18 17:57:53 UTC; 13ms ago
Docs: man:postgres(1)
Process: 16459 ExecStart=/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data (code=exited, status=203/EXEC)
Main PID: 16459 (code=exited, status=203/EXEC)
Nov 18 17:57:53 localhost systemd[1]: Starting PostgreSQL database server...
Nov 18 17:57:53 localhost systemd[16459]: postgresql.service: Failed to execute command: No such file or directory
Nov 18 17:57:53 localhost systemd[16459]: postgresql.service: Failed at step EXEC spawning /usr/local/pgsql/bin/postgres: No such file or directory
Nov 18 17:57:53 localhost systemd[1]: postgresql.service: Main process exited, code=exited, status=203/EXEC
Nov 18 17:57:53 localhost systemd[1]: postgresql.service: Failed with result 'exit-code'.
Nov 18 17:57:53 localhost systemd[1]: Failed to start PostgreSQL database server.
dpkg: error processing package postgresql-common (--configure):
installed postgresql-common package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql-13:
postgresql-13 depends on postgresql-common (>= 182~); however:
Package postgresql-common is not configured yet.
dpkg: error processing package postgresql-13 (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
postgresql-common
postgresql-13
Then I try to check the status of postgresql.service:
$ systemctl status postgresql.service
● postgresql.service - PostgreSQL database server
Loaded: loaded (/etc/systemd/system/postgresql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-11-18 17:57:53 UTC; 15s ago
Docs: man:postgres(1)
Process: 16459 ExecStart=/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data (code=exited, status=203/EXEC)
Main PID: 16459 (code=exited, status=203/EXEC)
Can you give me some insights on how to deal with this issue ?

puppet server suddenly stop working

I am new to puppet, it was working just fine till some days ago. I got back to start the server today, running
sudo /etc/init.d/puppetserver start
I then got
Starting puppetserver (via systemctl): puppetserver.serviceJob for puppetserver.service failed. See 'systemctl status puppetserver.service' and 'journalctl -xn' for details.
and journalctl -xn throws
No journal files were found.
failed!
When I check the logs in /var/log/puppetlabs/puppetserver, I get no specific informations. I also noticed that the puppet command that was located in /opt/puppetlabs/puppet/bin but I can't find the bin folder anymore.
Does anyone has an idea ?
EDIT :
Here's the output of systemctl status puppetserver.service
puppetserver.service - LSB: puppetserver
Loaded: loaded (/etc/init.d/puppetserver)
Active: failed (Result: exit-code) since Fri 2017-11-10 10:20:13 UTC; 3h 54min ago
Process: 5490 ExecStart=/etc/init.d/puppetserver start (code=exited, status=2)
and

Supervisord action if service restart

I want to create a file when the service is restarted.
rpm -qa | grep super
supervisor-3.1.3-0.5.b1.el6.noarch
My config file:
[program:tests]
command=/root/while.sh
directory=/root
user=root
autostart=true
autorestart=true
[eventlistener:tests_ls]
command=touch /tmp/32
events=PROCESS_STATE
My log file error
2016-06-27 10:48:15,794 ERRO pool tests_ls event buffer overflowed, discarding event 8
2016-06-27 10:48:15,794 INFO exited: tests_ls (exit status 0; not expected)
2016-06-27 10:48:16,796 ERRO pool tests_ls event buffer overflowed, discarding event 9
2016-06-27 10:48:16,796 INFO gave up: tests_ls entered FATAL state, too many start retries too quickly
2016-06-27 10:48:39,155 ERRO pool tests_ls event buffer overflowed, discarding event 10
2016-06-27 10:48:39,155 INFO exited: tests (terminated by SIGKILL; not expected)
2016-06-27 10:48:40,157 ERRO pool tests_ls event buffer overflowed, discarding event 11
2016-06-27 10:48:40,160 INFO spawned: 'tests' with pid 26378
2016-06-27 10:48:41,163 ERRO pool tests_ls event buffer overflowed, discarding event 12
supervisorctl
tests RUNNING pid 26378, uptime 0:09:02
tests_ls FATAL Exited too quickly (process log may have details)
Where did I go wrong?

Can't start MySQL after ESXi reboot

My MySQL server just stopped working after ESXi server restart...
It does not start automatically, and I can't start it from my Unix shell.
~# service mysql restart
restart: Unknown instance:
~# sudo service mysql start
start: Job failed to start
~# sudo -u mysql mysqld
~#
~# netstat -tap | grep mysql
~#
~# service mysql restart
restart: Unknown instance:
Files at /var/log/ : mysql.err and mysql.log are empty.
File here /var/log/mysql/error.log has some info:
Version: '5.1.62-0ubuntu0.11.10.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
130410 9:50:54 [ERROR] /usr/sbin/mysqld: Table './radius/radcheck' is marked as crashed and should be repaired
130410 9:50:54 [Warning] Checking table: './radius/radcheck'
130410 9:50:54 [ERROR] /usr/sbin/mysqld: Table './radius/radpostauth' is marked as crashed and should be repaired
130410 9:50:54 [Warning] Checking table: './radius/radpostauth'
130410 9:50:54 [ERROR] /usr/sbin/mysqld: Table './radius/resv' is marked as crashed and should be repaired
130410 9:50:54 [Warning] Checking table: './radius/resv'
130819 22:31:21 [Note] Plugin 'FEDERATED' is disabled.
130819 22:31:21 InnoDB: Initializing buffer pool, size = 8.0M
130819 22:31:21 InnoDB: Completed initialization of buffer pool
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130819 22:31:21 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
Could anyone tell me, what could be wrong here?
Ugh... that's ugly.
Here's a fix. When uninstalling, copy the list of packages to be removed, then use that list to reinstall them afterwards.
http://www.blog.webcare.pk/2012/05/ubuntu-mysql-cannot-start-after-upgrade.html

Resources