ssh service is not getting started after upgrading debian 8 jessie to debian 9 strech - linux

ssh service is not getting started after upgrading debian 8 jessie to debian 9 strech
● ssh.service - OpenBSD Secure Shell server Loaded: loaded
(/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2021-05-28 13:36:30 UTC;
10min ago Process: 2155 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS
(code=exited, status=255) Process: 2152 ExecStartPre=/usr/sbin/sshd
-t (code=exited, status=0/SUCCESS) Main PID: 2155 (code=exited, status=255)
May 28 13:36:29 ip-172-31-43-40 systemd[1]: Starting OpenBSD Secure
Shell server... May 28 13:36:30 ip-172-31-43-40 systemd[1]:
ssh.service: Main process exited, code=exited, status=255/n/a May 28
13:36:30 ip-172-31-43-40 systemd[1]: Failed to start OpenBSD Secure
Shell server. May 28 13:36:30 ip-172-31-43-40 systemd[1]: ssh.service:
Unit entered failed state. May 28 13:36:30 ip-172-31-43-40 systemd[1]:
ssh.service: Failed with result 'exit-code'.

kindly check the source list, in your source list might be something that disables the SSH
kindly use the different source list

Kindly change your /etc/apt/source.list to this Link it might work.

Related

sshd service fails to start : ssh.service failed because the control process exited with error code

I'm not sure why it isn't starting or why its preventing me from connecting, i get this error:
root#vmi: "# sudo service ssh status
ssh.service OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2022-11-27 09:47:47 CST; 4min 58s ago
Docs: man: sshd (8) man: sshd_config(5)
Process: 446 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=255/EXCEPTION)
Nov 27 09:47:47 vmi.contaboserver.net systemd[1]: ssh.service: Scheduled restart job, restart>
Nov 27 09:47:47 vmi.contaboserver.net systemd[1]: Stopped OpenBSD Secure Shell server.
Nov 27 09:47:47 vmi.contaboserver.net systemd[1]: ssh.service: Start request repeated too qui>
Nov 27 09:47:47 vmi.contaboserver.net systemd[1]: ssh.service: Failed with result 'exit-code'.
Nov 27 09:47:47 vmi.contaboserver.net systemd[1]: Failed to start OpenBSD Secure Shell server. lines 1-12/12 (END)
Please provide more precise log information, just restart sshd service then use journalctl -xe or vim /var/log/secure (if The storage location of the sshd logs has not been changed)

x11vnc service failing with exit code

Thanks!
I am trying to setup x11vnc service on raspberry pi 4B platform, but it's failing. Below are the status logs:
root#raspberrypi4-64:~# systemctl status x11vnc.service
x x11vnc.service - x11vnc service
Loaded: loaded (/lib/systemd/system/x11vnc.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2022-11-23 09:44:49 UTC; 10s ago
Process: 1947 ExecStart=/usr/bin/x11vnc -forever -display :0 -auth guess -passwdfile /home/root/.vnc/passwd (code=exited, status=1/FAILURE)
Main PID: 1947 (code=exited, status=1/FAILURE)
Nov 23 09:44:49 raspberrypi4-64 systemd[1]: x11vnc.service: Failed with re...e'.
Nov 23 09:44:49 raspberrypi4-64 systemd[1]: x11vnc.service: Scheduled rest... 5.
Nov 23 09:44:49 raspberrypi4-64 systemd[1]: Stopped x11vnc service.
Nov 23 09:44:49 raspberrypi4-64 systemd[1]: x11vnc.service: Start request ...ly.
Nov 23 09:44:49 raspberrypi4-64 systemd[1]: x11vnc.service: Failed with re...e'.
Nov 23 09:44:49 raspberrypi4-64 systemd[1]: Failed to start x11vnc service.
Hint: Some lines were ellipsized, use -l to show in full.
Any suggestion on this will be really helpful.
I am expecting to enable x11vnc service on raspberry pi 4B.

RabbitMQ server won't start anymore after assigning username/password

I installed a rabbitmq server and it was active and running fine until I entered:
echo "[{loopback_users, []}]}]." > /etc/rabbitmq/rabbitmq.config
I also assigned a username and password and also assigned the user as administrator. I tried to restart the server after that and it wouldn't restart. Checked the status and it was no longer running. Any idea what I did wrong? Still a rookie, any tips would be great.
[root#rmq01 ~]# systemctl status rabbitmq-server.service -l
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2022-08-12 05:47:22 UTC; 1s ago
Process: 1807 ExecStop=/usr/sbin/rabbitmqctl shutdown (code=exited, status=0/SUCCESS)
Process: 7026 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE)
Main PID: 7026 (code=exited, status=1/FAILURE)
Status: "Standing by"
Aug 12 05:47:22 rmq01 systemd[1]: rabbitmq-server.service: main process exited, code=exited, status=1/FAILURE
Aug 12 05:47:22 rmq01 systemd[1]: Failed to start RabbitMQ broker.
Aug 12 05:47:22 rmq01 systemd[1]: Unit rabbitmq-server.service entered failed state.
Aug 12 05:47:22 rmq01 systemd[1]: rabbitmq-server.service failed.
I'm sure the answer is right in front of me but I can't seem to pin point it.
please use the new format file config:
https://github.com/rabbitmq/rabbitmq-server/blob/v3.8.x/deps/rabbit/docs/rabbitmq.conf.example
## Related doc guide: https://rabbitmq.com/access-control.html.
## The default "guest" user is only permitted to access the server
## via a loopback interface (e.g. localhost).
## {loopback_users, [<<"guest">>]},
##
# loopback_users.guest = true

Bash script doesn't launch with systemd

I'm trying to launch a simple bash script called script-startup.sh when my raspberry Pi boots, using systemd. This script only contains some basic actions on files (copying, moving, executing binaries) and calls make as well to compile bits of codes.
I created a new file with path /etc/systemd/system/baymabx.service :
[Unit]
Description=Baymabx
After=pm2-pi
[Service]
ExecStart=/home/pi/Desktop/baymabx/script-startup.sh
Launching /home/pi/Desktop/baymabx/script-startup.sh in the terminal works as it is intended to be. Also, pm2-pi.service is pm2 starting my backend server, that I need before using my script.
However, after doing systemctl start baymabx and systemctl status baymabx, I get :
● baymabx.service - Baymabx
Loaded: loaded (/etc/systemd/system/baymabx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2020-12-11 01:34:06 CET; 3min 2s ago
Process: 359 ExecStart=/home/pi/Desktop/baymabx/script-startup.sh (code=exited, status=203/EXEC)
Main PID: 359 (code=exited, status=203/EXEC)
Dec 11 01:34:06 raspberrypi systemd[1]: Started Baymabx.
Dec 11 01:34:06 raspberrypi systemd[359]: baymabx.service: Failed to execute command: Exec format error
Dec 11 01:34:06 raspberrypi systemd[359]: baymabx.service: Failed at step EXEC spawning /home/pi/Desktop/baymabx/script-startup.sh: Exec format error
Dec 11 01:34:06 raspberrypi systemd[1]: baymabx.service: Main process exited, code=exited, status=203/EXEC
Dec 11 01:34:06 raspberrypi systemd[1]: baymabx.service: Failed with result 'exit-code'.
Anyone know how I can get it to work ?

Systemd service enabled but does not start

I have a custom Spring Boot web application running on a Linux virtual machine. I have a systemd script to start/restart the application.
I have tried changing to WantedBy=default.target and it still does not work. I have tried adding After or Type and still does not work
[Unit]
Description=SpringBootSampleApp
[Service]
WorkingDirectory=/home/mecpro
ExecStop=/usr/bin/sudo /home/mecpro/webapp/webapp-0.0.1-SNAPSHOT.war
ExecStart=/usr/bin/sudo /home/mecpro/webapp/webapp-0.0.1-SNAPSHOT.war
[Install]
WantedBy=multi-user.target
My console screen looks like this
Loaded: loaded (/etc/systemd/system/webapp.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2019-08-12 13:26:27 UTC; 22ms ago
Main PID: 9104 (sudo)
Tasks: 2 (limit: 4675)
When I run systemctl status webapp.service, I get this
webapp.service - SpringBootSampleApp
Loaded: loaded (/etc/systemd/system/webapp.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-08-12 13:26:27 UTC; 3min 17s ago
Process: 9104 ExecStart=/usr/bin/sudo /home/mecpro/webapp/webapp-0.0.1-SNAPSHOT.war (code=exited, status=2)
Main PID: 9104 (code=exited, status=2)
Aug 12 13:26:28 x01133361 sudo[9104]: /home/mecpro/webapp/webapp-0.0.1-SNAPSHOT.war: 2: /home/mecpro/webapp/webapp-0.0.1-SNAPSHOT.war: Syntax error: "(" unexpected
Aug 12 13:26:27 x01133361 systemd[1]: Started SpringBootSampleApp.
Aug 12 13:26:27 x01133361 systemd[1]: webapp.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 12 13:26:27 x01133361 systemd[1]: webapp.service: Failed with result 'exit-code'.
Aug 12 13:26:27 x01133361 sudo[9104]: root : TTY=unknown ; PWD=/home/mecpro ; USER=root ; COMMAND=/home/mecpro/webapp/webapp-0.0.1-SNAPSHOT.war
Aug 12 13:26:27 x01133361 sudo[9104]: pam_unix(sudo:session): session opened for user root by (uid=0)
Aug 12 13:26:27 x01133361 sudo[9104]: pam_unix(sudo:session): session closed for user root
This is my first question on StackOverflow so kindly excuse if the question is badly formatted. Thanks in advance.

Resources