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

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 ?

Related

How to fix permission denied issue RedisJson?

When I try to load a redis module with loadmodule in redis.conf, redis-server crashes.
The log shows
Module /etc/modules/librejson.so failed to load: /etc/modules/librejson.so: unable to open shared objects file: Permission denied.
I have read the documentation to install RedisJson, but it does not work for me.
If I comment loadmodule line, the server works fine.
Installation process
sudo dnf update
sudo dnf upgrade
sudo dnf install redis
Configuration
cd /etc/redis
nvim /redis.conf
loadmodule loadmodule /etc/modules/librejson.so
supervised systemd
The rest of the file is kept by default
What I did
I created modules folder inside etc folder
I ran chown redis:root over modules folder
I moved the module to /etc/modules because I had read that homeprotection can block redis when trying to read the module in the /home path.
Then I used ls -l to check permissions and owners:
-rwxr-xr-x. 2 user user user 23668904 Feb 15 09:10 librejson.so
after that, I ran chown redis:root (as redis.conf owners): -rwxr-xr-xr-x. 2 redis root 23668904 Feb 15 09:10 librejson.so
and when I ran sudo systemctl restart redis.service:
Job for redis.service failed because the control process exited with error code.
See "systemctl status redis.service" and "journalctl -xeu redis.service" for details.
systemctl status redis.service:
redis.service - Redis persistent key-value database
Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; preset: disabled)
Drop-In: /etc/systemd/system/redis.service.d
└─limit.conf
Active: failed (Result: exit-code) since Thu 2023-02-16 13:21:58 CST; 6min ago
Process: 28947 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf --daemonize no --supervised systemd (code=exited, status=1/FAILURE)
Main PID: 28947 (code=exited, status=1/FAILURE)
Status: "Redis is loading..."
CPU: 10ms
Feb 16 13:21:58 fedora systemd[1]: Starting redis.service - Redis persistent key-value database...
Feb 16 13:21:58 fedora systemd[1]: redis.service: Main process exited, code=exited, status=1/FAILURE
Feb 16 13:21:58 fedora systemd[1]: redis.service: Failed with result 'exit-code'.
Feb 16 13:21:58 fedora systemd[1]: Failed to start redis.service - Redis persistent key-value database.
and nothing, I ran out of ideas.
System specs
Fedora 37
Redis server v=7.0.8

Docker Issue - Failed to start Docker Application Container Engine (code=exited, status=1/FAILURE)

I am fairly new to docker and linux and I am having issue installing and running docker. My system config are
Operating System: Debian GNU/Linux 9 (stretch)
Kernel: Linux 5.13.9.rsk.1-amd64
Architecture: x86-64
I followed official instructions. When I run sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin, it had following error
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package docker-compose-plugin
I also tried, sudo systemctl restart docker, which output
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
Then I tried, sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2022-06-10 23:04:17 CST; 1min 41s ago
Docs: https://docs.docker.com
Main PID: 33878 (code=exited, status=1/FAILURE)
CPU: 111ms
Jun 10 23:04:15 6969-69-696 systemd[1]: docker.service: Unit entered failed state.
Jun 10 23:04:15 6969-69-696 systemd[1]: docker.service: Failed with result 'exit-code'.
Jun 10 23:04:17 6969-69-696 systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Jun 10 23:04:17 6969-69-696 systemd[1]: Stopped Docker Application Container Engine.
Jun 10 23:04:17 6969-69-696 systemd[1]: docker.service: Start request repeated too quickly.
Jun 10 23:04:17 6969-69-696 systemd[1]: Failed to start Docker Application Container Engine.
Jun 10 23:04:17 6969-69-696 systemd[1]: docker.service: Unit entered failed state.
Jun 10 23:04:17 6969-69-696 systemd[1]: docker.service: Failed with result 'exit-code'.
journalctl -xe had a very big output which does not seem related to docker (most outputs are Failed to get GPU/HCU type or it is not a GPU/HCU host which would make sense since it is a remote host machine).
I have looked at other similar questions on stackoverflow and those fixes have not worked for me so far. Please let me know if I should be doing something differently or how can I fix it. I really need to get docker running for my work. Any help will be appreciated.

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

After command sudo service mongod start && sudo service mongod status
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: failed (Result: signal) since Wed 2021-08-18 11:58:29 MSK; 4s ago
Docs: https://docs.mongodb.org/manual
Process: 13899 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=killed, signal=ILL)
Main PID: 13899 (code=killed, signal=ILL)
авг 18 11:58:29 400sk systemd[1]: Started MongoDB Database Server.
авг 18 11:58:29 400sk systemd[1]: mongod.service: Main process exited, code=killed, status=4/ILL
авг 18 11:58:29 400sk systemd[1]: mongod.service: Failed with result 'signal'.
Does not write logs in /var/logs
Debian 10, try MongoDB 4.2 and 5.0, Intel(R) Xeon(R) E5540 # 2.53GHz
Installation from official site (https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/)
Signal "ILL" is illegal instruction.
MongoDB 5.0 requires Advanced Vector Extensions, Xeon E5540 does not have them.
For a list of processors that support AVX, see https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#CPUs_with_AVX
Make sure libmkl-dev and lib-avx2 are installed and available on your OS. On Debian 10, these packages are in Nonfree amd64 repository. Add the repo to your /etc/apt/sources.list Enable the repo then do apt-get update followed by:
apt-get install libmkl-dev libmkl-avx2 mongodb-org

/usr/bin/env 'node' Permission Denied

I installed Node V10.19.0 and tileserver-gl
I created a bash file in my home directory, by the name tileserver.sh
Which contain this code:
xvfb-run -a -s "-screen 0 1024x768x24" tilerserver-gl NewZeland.mbtiles
When I executed it works fine, and listening on port 8080
and I created service of this file in /etc/systemd/system/tileserver.service and enabled
sudo systemctl status tileserver.service
It shows this error:
Loaded: loaded (/etc/systemd/system/tileserver.service: enabled; vendor preset: enabled)
Active: Failed (Result: exit-code) since .....
process: 3729 ExecStart=/home/tilesServer/tileserver.sh ( code=exited, status=126)
Main PID: 3729 ( code=exited, status=126)
mar 26 18:21:57 tileserver systemd started tileserver bash script runing
mar 26 18:21:57 tilerserver tileserver.sh[3729] : /usr/bin/env "node' Permission denied
mar 26 18:21:57 tileserver systemd[1]: tileserver.service: main process exited , code=exited, status=126/n/a
mar 26 18:21:57 tileserver systemd[1]: tileserver.service: Failed with result 'exit-code'
How to resolve this issue and error
I recommended you use NVM and install It as normal user, after your installed NVM you should install NodeJS with nvm install stable to get node stable version and then you will can test.
First I add the nvm path to bachrc
start to debug it. With root
node debug tileserver-gl
It work fine , so I modified the script and working fine

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

Resources