Fedora20 could not boot with serial - linux

I am trying to boot Fedora 20 with serial output,so I modify the boot command line with:
menuentry 'Fedora (3.18.0) 20 (Heisenbug)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-0-rescue-690525b7662a4bbca483ccdfdac3f6dc-advanced-d27ee4d5-522c-48e8-abc5-73b42bd81ae4' {
load_video
insmod gzio
insmod part_gpt
insmod ext2
set root='hd1,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2 86088439-feab-4ac8-9cca-792414d9fff0
else
search --no-floppy --fs-uuid --set=root 86088439-feab-4ac8-9cca-792414d9fff0
fi
linuxefi /vmlinuz-3.18.0 root=UUID=d27ee4d5-522c-48e8-abc5-73b42bd81ae4 ro text no_console_suspend hpet=disable console=ttyS0,115200 console=tty0
initrdefi /initramfs-3.18.0.img
}
And the serial output seemed to stop at:
'a start job is running for Show Plymouth Boot Screen',
and did not go on.
and here are the journalctl message:
Jan 06 19:02:13 localhost.localdomain systemd[1]: Mounted /boot.
Jan 06 19:02:13 localhost.localdomain systemd[1]: Mounting /boot/efi...
Jan 06 19:02:13 localhost.localdomain systemd[1]: Started Activation of DM RAID sets.
Jan 06 19:02:13 localhost.localdomain systemd[1]: Starting Encrypted Volumes.
Jan 06 19:02:13 localhost.localdomain systemd[1]: Reached target Encrypted Volumes.
Jan 06 19:02:13 localhost.localdomain systemd[1]: Mounted /boot/efi.
Jan 06 19:02:13 localhost.localdomain systemd[1]: Starting Local File Systems.
Jan 06 19:02:13 localhost.localdomain systemd[1]: Reached target Local File Systems.
Jan 06 19:02:13 localhost.localdomain systemd[1]: Started Mark the need to relabel after reboot.
Jan 06 19:02:13 localhost.localdomain systemd[1]: Started Reconfigure the system on administrator request.
Jan 06 19:02:13 localhost.localdomain systemd[1]: Started Relabel all filesystems, if necessary.
Jan 06 19:02:13 localhost.localdomain systemd[1]: Starting Tell Plymouth To Write Out Runtime Data...
Jan 06 19:02:13 localhost.localdomain systemd[1]: Starting Trigger Flushing of Journal to Persistent Storage...
Jan 06 19:02:13 localhost.localdomain systemd[1]: Starting Recreate Volatile Files and Directories...
Jan 06 19:02:13 localhost.localdomain systemd[1]: Starting Security Auditing Service...
Jan 06 19:02:13 localhost.localdomain auditd[468]: Error - audit support not in kernel
Jan 06 19:02:13 localhost.localdomain auditd[468]: Cannot open netlink audit socket
Jan 06 19:02:13 localhost.localdomain auditd[468]: The audit daemon is exiting.
Jan 06 19:02:13 localhost.localdomain auditctl[469]: Error - audit support not in kernel
Jan 06 19:02:13 localhost.localdomain auditctl[469]: Error - audit support not in kernel
Jan 06 19:02:13 localhost.localdomain auditctl[469]: Cannot open netlink audit socket
Jan 06 19:02:13 localhost.localdomain systemd[1]: Started Recreate Volatile Files and Directories.
Jan 06 19:02:13 localhost.localdomain systemd[1]: auditd.service: main process exited, code=exited, status=1/FAILURE
Jan 06 19:02:13 localhost.localdomain systemd[1]: Failed to start Security Auditing Service.
Jan 06 19:02:13 localhost.localdomain systemd[1]: Unit auditd.service entered failed state.
Jan 06 19:02:13 localhost.localdomain systemd[1]: Starting Update UTMP about System Reboot/Shutdown...
Jan 06 19:02:13 localhost.localdomain systemd-journal[394]: Permanent journal is using 24.0M (max 601.3M, leaving 902.0M of free 2.1G, current limit 601.3M).
Jan 06 19:02:13 localhost.localdomain systemd-journal[394]: Time spent on flushing to /var is 172.987ms for 1168 entries.
Jan 06 19:02:13 localhost.localdomain systemd[1]: Started Trigger Flushing of Journal to Persistent Storage.
Jan 06 19:02:13 localhost.localdomain systemd[1]: Started Update UTMP about System Reboot/Shutdown.
Jan 06 19:02:17 localhost.localdomain kernel: random: nonblocking pool is initialized

finally I solved this problem by appending:
console=tty console=ttyS0,115200n8
rather than:
console=tty0 console=ttyS0,115200
in boot command line
I don't know why,but it works,thanks god.

Related

Apache Error on CentOs fails to start or restart

Apache web server fails to restart.The server has been running well and suddenly failed.
What would be the possible cause for making httpd.service fail to start and what is the solution?
Running Apachectl configtest returns symbol lookup error: /usr/local/apache/bin/httpd: undefined symbol: apr_crypto_init
Running systemctl status httpd.service :
httpd.service - Web server Apache
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2022-10-04 22:36:27 CST; 1min 24s ago
Process: 13030 ExecStop=/usr/local/apache/bin/apachectl graceful-stop (code=exited, status=127)
Process: 3911 ExecStart=/usr/local/apache/bin/apachectl start (code=exited, status=127)
Main PID: 851 (code=exited, status=0/SUCCESS)
Oct 04 22:36:27 hwsrv-985893.hostwindsdns.com systemd[1]: Starting Web server Apache...
Oct 04 22:36:27 hwsrv-985893.hostwindsdns.com apachectl[3911]: /usr/local/apache/bin/httpd: symbol lookup error: /usr/local/apache/bin/httpd: undefined symbol: apr_crypto_init
Oct 04 22:36:27 hwsrv-985893.hostwindsdns.com systemd[1]: httpd.service: control process exited, code=exited status=127
Oct 04 22:36:27 hwsrv-985893.hostwindsdns.com systemd[1]: Failed to start Web server Apache.
Oct 04 22:36:27 hwsrv-985893.hostwindsdns.com systemd[1]: Unit httpd.service entered failed state.
Oct 04 22:36:27 hwsrv-985893.hostwindsdns.com systemd[1]: httpd.service failed.
Running journalctl -xe :
Oct 04 22:51:54 hwsrv-985893.hostwindsdns.com kernel: net_ratelimit: 75 callbacks suppressed
Oct 04 22:51:56 hwsrv-985893.hostwindsdns.com sshd[4063]: Failed password for root from 61.177.172.114 port 36803 ssh2
Oct 04 22:51:56 hwsrv-985893.hostwindsdns.com sshd[4065]: Failed password for root from 218.92.0.195 port 33236 ssh2
Oct 04 22:51:56 hwsrv-985893.hostwindsdns.com sshd[4063]: Received disconnect from 61.177.172.114 port 36803:11: [preauth]
Oct 04 22:51:56 hwsrv-985893.hostwindsdns.com sshd[4063]: Disconnected from 61.177.172.114 port 36803 [preauth]
Oct 04 22:51:56 hwsrv-985893.hostwindsdns.com sshd[4063]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=61.177.172.114 user=root
Oct 04 22:51:56 hwsrv-985893.hostwindsdns.com sshd[4065]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Oct 04 22:51:59 hwsrv-985893.hostwindsdns.com sshd[4065]: Failed password for root from 218.92.0.195 port 33236 ssh2
Oct 04 22:51:59 hwsrv-985893.hostwindsdns.com sshd[4065]: Received disconnect from 218.92.0.195 port 33236:11: [preauth]
Oct 04 22:51:59 hwsrv-985893.hostwindsdns.com sshd[4065]: Disconnected from 218.92.0.195 port 33236 [preauth]
Oct 04 22:51:59 hwsrv-985893.hostwindsdns.com sshd[4065]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=218.92.0.195 user=root
Oct 04 22:51:59 hwsrv-985893.hostwindsdns.com kernel: net_ratelimit: 65 callbacks suppressed
Oct 04 22:52:05 hwsrv-985893.hostwindsdns.com kernel: net_ratelimit: 77 callbacks suppressed

Apache2 is not starting,I am using Ubuntu 16.04

Unable to start Apache2 server after I modifed dir.conf file, even after changing it back to normal
I modified /etc/apache2/mods-enabled/dir.conf and changed the order and wrote index.php in
the first place before index.html, so the file contents have been modified from
"DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm" to now
"DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm". But still
changing that back to original order, also does not start apache2 server, it gives the same
error. I tried restarting and stop and start, but none seem to work.
** Here are the details of systemctl status apache2.service **
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Tue 2020-11-24 12:28:31 IST; 5min ago
Docs: man:systemd-sysv-generator(8)
Process: 20300 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 25755 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Nov 24 12:28:31 localhost apache2[25755]: *
Nov 24 12:28:31 localhost apache2[25755]: * The apache2 configtest failed.
Nov 24 12:28:31 localhost apache2[25755]: Output of config test was:
Nov 24 12:28:31 localhost apache2[25755]: AH00534: apache2: Configuration error: More than one MPM loaded.
Nov 24 12:28:31 localhost apache2[25755]: Action 'configtest' failed.
Nov 24 12:28:31 localhost apache2[25755]: The Apache error log may have more information.
Nov 24 12:28:31 localhost systemd[1]: apache2.service: Control process exited, code=exited status=1
Nov 24 12:28:31 localhost systemd[1]: Failed to start LSB: Apache2 web server.
Nov 24 12:28:31 localhost systemd[1]: apache2.service: Unit entered failed state.
Nov 24 12:28:31 localhost systemd[1]: apache2.service: Failed with result 'exit-code'.
**Here is the details of journalctl -xe**
Nov 24 12:44:42 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:75]
Nov 24 12:44:42 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:77]
Nov 24 12:44:43 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:75]
Nov 24 12:44:43 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:77]
Nov 24 12:44:44 localhost systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
Nov 24 12:44:44 localhost systemd[1]: mysql.service: Unit entered failed state.
Nov 24 12:44:44 localhost systemd[1]: mysql.service: Failed with result 'exit-code'.
Nov 24 12:44:44 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:75]
Nov 24 12:44:44 localhost systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Nov 24 12:44:44 localhost systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Nov 24 12:44:44 localhost systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Nov 24 12:44:44 localhost mysqld[5387]: 2020-11-24T07:14:44.545855Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
Nov 24 12:44:44 localhost mysqld[5387]: 2020-11-24T07:14:44.545908Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
Nov 24 12:44:44 localhost mysqld[5387]: 2020-11-24T07:14:44.705792Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --expl
Nov 24 12:44:44 localhost mysqld[5387]: 2020-11-24T07:14:44.707018Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.32-0ubuntu0.16.04.1) starting as process 538
Nov 24 12:44:44 localhost mysqld[5387]: 2020-11-24T07:14:44.709650Z 0 [ERROR] Could not open file '/var/log/mysql/error.log' for error logging: No suc
Nov 24 12:44:44 localhost mysqld[5387]: 2020-11-24T07:14:44.709678Z 0 [ERROR] Aborting
Nov 24 12:44:44 localhost mysqld[5387]: 2020-11-24T07:14:44.709703Z 0 [Note] Binlog end
Nov 24 12:44:44 localhost mysqld[5387]: 2020-11-24T07:14:44.709770Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
Nov 24 12:44:44 localhost systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Nov 24 12:44:44 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:77]
Nov 24 12:44:44 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:75]
Nov 24 12:44:45 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:77]
Nov 24 12:44:45 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:75]
Nov 24 12:44:45 localhost kernel: [drm:drm_mode_addfb2 [drm]] [FB:77]

Postgresql12.3 wont start on boot, systemd

I installed Postgres 12.3 from source code with steps(according to this):
./configure --with-openssl --with-systemd
make
sudo make install
If I start with pg_ctl from postgres user all works fine:
pg_ctl -D $PGDATA -l /path/to/logfile
Then I try to create a systemd service, as described here.
Steps:
Create file /etc/systemd/system/postgresql.service with content:
[Unit]
Description=PostgreSQL database server
Documentation=man:postgres(1)
[Service]
Type=notify
User=postgres
ExecStart=/usr/local/pgsql/bin/postgres -D /path/to/pgdata
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=0
[Install]
WantedBy=multi-user.target
sudo systemctl enable postgresql.service
Then I reboot my machine.
After restart Postgres unavaliable. Some logs:
sudo 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 Fri 2020-06-05 03:23:32 MSK; 37s ago
Docs: man:postgres(1)
Process: 724 ExecStart=/usr/local/pgsql/bin/postgres -D /path/to/pgdata (code=exited, status=1/FAILURE)
Main PID: 724 (code=exited, status=1/FAILURE)
Jun 05 03:23:31 ctsvc systemd[1]: Starting PostgreSQL database server...
Jun 05 03:23:32 ctsvc systemd[1]: postgresql.service: Main process exited, code=exited, status=1/FAILURE
Jun 05 03:23:32 ctsvc systemd[1]: Failed to start PostgreSQL database server.
Jun 05 03:23:32 ctsvc systemd[1]: postgresql.service: Unit entered failed state.
Jun 05 03:23:32 ctsvc systemd[1]: postgresql.service: Failed with result 'exit-code'.
journalctl -xe | grep postgres
-- Subject: Unit postgresql.service has begun start-up
-- Unit postgresql.service has begun starting up.
Jun 05 03:23:32 ctsvc postgres[724]: 2020-06-05 03:23:32.209 MSK [724] LOG: starting PostgreSQL 12.3 on armv7l-unknown-linux-gnueabihf, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 32-bit
Jun 05 03:23:32 ctsvc postgres[724]: 2020-06-05 03:23:32.211 MSK [724] LOG: could not bind IPv4 address "172.17.17.42": Cannot assign requested address
Jun 05 03:23:32 ctsvc postgres[724]: 2020-06-05 03:23:32.211 MSK [724] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
Jun 05 03:23:32 ctsvc postgres[724]: 2020-06-05 03:23:32.211 MSK [724] WARNING: could not create listen socket for "172.17.17.42"
Jun 05 03:23:32 ctsvc postgres[724]: 2020-06-05 03:23:32.211 MSK [724] FATAL: could not create any TCP/IP sockets
Jun 05 03:23:32 ctsvc postgres[724]: 2020-06-05 03:23:32.212 MSK [724] LOG: database system is shut down
Jun 05 03:23:32 ctsvc systemd[1]: postgresql.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit postgresql.service has failed
-- Unit postgresql.service has failed.
Jun 05 03:23:32 ctsvc systemd[1]: postgresql.service: Unit entered failed state.
Jun 05 03:23:32 ctsvc systemd[1]: postgresql.service: Failed with result 'exit-code'.
Jun 05 03:24:09 ctsvc sudo[1602]: user1 : TTY=pts/0 ; PWD=/home/user1 ; USER=root ; COMMAND=/bin/systemctl status postgresql.service
netstat -tnl | grep "5432" - shows nothing.
After that I can manualy run this service:
sudo systemctl status postgresql.service
● postgresql.service - PostgreSQL database server
Loaded: loaded (/etc/systemd/system/postgresql.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-06-05 03:30:57 MSK; 8s ago
Docs: man:postgres(1)
Main PID: 1681 (postgres)
Tasks: 8 (limit: 4915)
CGroup: /system.slice/postgresql.service
├─1681 /usr/local/pgsql/bin/postgres -D /path/to/pgdata
├─1683 postgres: checkpointer
├─1684 postgres: background writer
├─1685 postgres: walwriter
├─1686 postgres: autovacuum launcher
├─1687 postgres: stats collector
├─1688 postgres: logical replication launcher
└─1693 postgres: postgres postgres 172.17.17.40(53600) idle
Jun 05 03:30:56 ctsvc systemd[1]: Starting PostgreSQL database server...
Jun 05 03:30:57 ctsvc postgres[1681]: 2020-06-05 03:30:57.006 MSK [1681] LOG: starting PostgreSQL 12.3 on armv7l-unknown-linux-gnueabihf, compiled b
Jun 05 03:30:57 ctsvc postgres[1681]: 2020-06-05 03:30:57.007 MSK [1681] LOG: listening on IPv4 address "172.17.17.42", port 5432
Jun 05 03:30:57 ctsvc postgres[1681]: 2020-06-05 03:30:57.032 MSK [1681] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"
Jun 05 03:30:57 ctsvc postgres[1681]: 2020-06-05 03:30:57.424 MSK [1682] LOG: database system was shut down at 2020-06-05 02:59:03 MSK
Jun 05 03:30:57 ctsvc postgres[1681]: 2020-06-05 03:30:57.725 MSK [1681] LOG: database system is ready to accept connections
Jun 05 03:30:57 ctsvc systemd[1]: Started PostgreSQL database server.
netstat -tnl | grep '5432'
tcp 0 0 172.17.17.42:5432 0.0.0.0:* LISTEN
In my postgresql.conf I have following:
# - Connection Settings -
listen_addresses = '172.17.17.42'
port = 5432
max_connections = 100
If it helps: Postgres runs on Cubietruck with Armbian.
uname -a
Linux ctsvc 4.19.62-sunxi #5.92 SMP Wed Jul 31 22:07:23 CEST 2019 armv7l GNU/Linux
In my system there are no more processes that try to bind this port at boot time. As far as I understand, with the service itself and Postgresql everything is fine. However, something strange happens during the launch, but I can’t understand how to find out the reason of this behavior.
Thanks in advance.
Finally my file /etc/systemd/system/postgresql.service looks like this:
[Unit]
Description=PostgreSQL database server
Documentation=man:postgres(1)
Wants=network-online.target
After=network.target network-online.target
[Service]
Type=notify
User=postgres
ExecStart=/usr/local/pgsql/bin/postgres -D /path/to/pgdata
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
KillSignal=SIGINT
TimeoutSec=0
[Install]
WantedBy=multi-user.target
Thanks to Laurenz Albe comment, I added following in Unit section:
Wants=network-online.target
After=network.target network-online.target
to make sure that network fully operational before PG start. After this PG running correctly after reboot.

docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? for Ubuntu 16.04

Getting the above error while running any docker command.
When i run the following command
$ sudo docker info
Output
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
None of the docker commands are working. All of them throws same error.
$ sudo systemctl status docker
Output.
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/docker.service.d
└─docker-override.conf
Active: inactive (dead) (Result: exit-code) since Mon 2018-07-02 09:27:04 EDT; 1min 2s ago
Docs: https://docs.docker.com
Process: 23866 ExecStart=/usr/bin/dockerd -H fd:// -s overlay2 --disable-legacy-registry=false <br>(code=exited, status=1/FAILURE)
Main PID: 23866 (code=exited, status=1/FAILURE)
Jul 02 09:27:04 cse-bennettuniv systemd[1]: Failed to start Docker Application Container Engine.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: docker.service: Unit entered failed state.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: docker.service: Failed with result 'exit-code'.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: Stopped Docker Application Container Engine.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: docker.service: Start request repeated too quickly.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: Failed to start Docker Application Container Engine.
$ sudo systemctl status nvidia-docker
Output
● nvidia-docker.service - NVIDIA Docker plugin
Loaded: loaded (/lib/systemd/system/nvidia-docker.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2018-07-02 08:54:55 EDT; 37min ago
Docs: https://github.com/NVIDIA/nvidia-docker/wiki
Main PID: 3173 (nvidia-docker-p)
Tasks: 10
Memory: 61.8M
CPU: 3.739s
CGroup: /system.slice/nvidia-docker.service
└─3173 /usr/bin/nvidia-docker-plugin -s /var/lib/nvidia-docker
Jul 02 08:54:55 cse-bennettuniv systemd[1]: Starting NVIDIA Docker plugin...
Jul 02 08:54:55 cse-bennettuniv systemd[1]: Started NVIDIA Docker plugin.
Jul 02 08:54:55 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:55 Loading NVIDIA unified memory
Jul 02 08:54:55 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:55 Loading NVIDIA management library
Jul 02 08:54:55 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:55 Discovering GPU devices
Jul 02 08:54:59 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:59 Provisioning volumes at /var/lib/nvidia-docker/volumes
Jul 02 08:54:59 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:59 Serving plugin API at /var/lib/nvidia-docker
Jul 02 08:54:59 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:59 Serving remote API at localhost:3476
When I run the following comman...
$ sudo service docker restart
Output
Job for docker.service failed because the control process exited with error code. See _"systemctl status docker.service"_ and _"journalctl -xe"_ for details.
I have already run the "systemctl status docker.service" and I also run the "journalctl -xe" command to understand whats the problem. The journalctl output contains
Jul 03 13:23:06 cse-bennettuniv systemd[1]: Starting Docker Application Container Engine...
Jul 03 13:23:06 cse-bennettuniv dockerd[9390]: ERROR: The '--disable-legacy-registry' flag has been removed. Interacting with legacy (v1) registries is no longer supported
Jul 03 13:23:06 cse-bennettuniv systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Jul 03 13:23:06 cse-bennettuniv systemd[1]: Failed to start Docker Application Container Engine.
Jul 03 13:23:06 cse-bennettuniv systemd[1]: docker.service: Unit entered failed state.
Jul 03 13:23:06 cse-bennettuniv systemd[1]: docker.service: Failed with result 'exit-code'.
Jul 03 13:23:06 cse-bennettuniv systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Jul 03 13:23:06 cse-bennettuniv systemd[1]: Stopped Docker Application Container Engine.
A more complete txt file of the outpot thrown by "journalctl -xe" command
Thank you #DavidMaze and #Exa for refining the issue. I googled this particular error ERROR: The '--disable-legacy-registry' flag has been removed. Interacting with legacy (v1) registries is no longer supported . And then I removed it from the file and saved it. After that, it was working fine but there was a new error in nvidia-docker. So my Superior suggested me to reinstall docker and nvidia-docker. I followed this LINK to reinstall things. Everything got installed without any error. But when i tried to start the nvidia-docker, it stared throwing this perticular error: Failed to start nvidia-docker.service: Unit nvidia-docker.service not found. Following are the details.
sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/docker.service.d
└─docker-override.conf
Active: active (running) since Thu 2018-07-05 14:49:50 EDT; 23s ago
Docs: https://docs.docker.com
Main PID: 60189 (dockerd)
Tasks: 51
Memory: 239.4M
CPU: 723ms
CGroup: /system.slice/docker.service
├─60189 /usr/bin/dockerd -H fd:// -s overlay2
└─60200 docker-containerd --config /var/run/docker/containerd/containerd.toml
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.795448032-04:00" level=warning msg="Your kernel does not support swap memory limit"
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.795489588-04:00" level=warning msg="Your kernel does not support cgroup rt period"
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.795499101-04:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.796089811-04:00" level=info msg="Loading containers: start."
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.886351523-04:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon opti
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.913124323-04:00" level=info msg="Loading containers: done."
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.932021936-04:00" level=info msg="Docker daemon" commit=9ee9f40 graphdriver(s)=overlay2 version=18.03.1-ce
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.932079832-04:00" level=info msg="Daemon has completed initialization"
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.938512369-04:00" level=info msg="API listen on /var/run/docker.sock"
Jul 05 14:49:50 cse-bennettuniv systemd[1]: Started Docker Application Container Engine.
sudo systemctl status nvidia-docker
● nvidia-docker.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
Jul 05 14:40:51 cse-bennettuniv systemd[1]: Stopped NVIDIA Docker plugin.
Jul 05 14:40:51 cse-bennettuniv systemd[1]: Stopped NVIDIA Docker plugin.
Jul 05 14:44:07 cse-bennettuniv systemd[1]: Stopped NVIDIA Docker plugin.
Jul 05 14:44:07 cse-bennettuniv systemd[1]: Stopped NVIDIA Docker plugin.
Here it gives the reason that there is no such file or directory.
sudo service nvidia-docker start
Failed to start nvidia-docker.service: Unit nvidia-docker.service not found. This I was doing to to veryfy the issue. But it got confirmed when I ran the following code in /lib/systemd/system
dgxuser#cse-bennettuniv:/lib/systemd/system$ ls | grep nvidia
nvidia-persistenced.service
This means there is no file named nvidia-docker.service. Now I dont understand even after install it properly, why I can't start the nvidia-docker?

Bug: Varnish 4 install on CentOS 7 (systemctl)

Installed Varnish from yum; but immediate error when initiating via systemctl.
Jul 28 14:11:54 localhost.localdomain varnishd[6546]: .init_func = VGC_function_vcl_init,
Jul 28 14:11:54 localhost.localdomain varnishd[6546]: .fini_func = VGC_function_vcl_fini,
Jul 28 14:11:54 localhost.localdomain varnishd[6546]: };
Jul 28 14:11:54 localhost.localdomain varnishd[6557]: Assert error in main(), mgt/mgt_main.c line 686:
Jul 28 14:11:54 localhost.localdomain varnishd[6557]: Condition((daemon(1,0)) == 0) not true.
Jul 28 14:11:54 localhost.localdomain varnishd[6557]: errno = 19 (No such device)
Jul 28 14:11:54 localhost.localdomain systemd[1]: Failed to read PID from file /var/run/varnish.pid: Invalid argument
Jul 28 14:11:54 localhost.localdomain systemd[1]: varnish.service never wrote its PID file. Failing.
Jul 28 14:11:54 localhost.localdomain systemd[1]: Failed to start Varnish a high-perfomance HTTP accelerator.
Jul 28 14:11:54 localhost.localdomain systemd[1]: Unit varnish.service entered failed state.
SELinux is disabled; package was installed via root. This is a fresh install.
Looks like you need to reboot. ;)
The message:
Failed to read PID from file /var/run/varnish.pid Invalid argument
is non-critical. It is just systemd trying to read the pidfile too early. You can poll status with:
systemctl status varnish
If its "Main PID" entry is matching the contents of /var/run/varnish.pid(and if varnishd is started via systemd, it always does), you can ignore that message. This is fixed in later versions of systemd.

Resources