Bug: Varnish 4 install on CentOS 7 (systemctl) - linux

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.

Related

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]

postgresql service not running on RHEL 7

We have an application that is running on RHEL6/32 bit and RHEL6/64 bit. This application uses postgresql 8.4 from the beginning. Now, we want to provide support for this application on RHEL7/64 bit. RHEL7 comes with default postgresql 9.2 in its yum list and this is getting installed and its related services are running properly as well. But after installing postgresql 8.4 on RHEL7, it seems like the services are never running. Please find below the logs:
[root#linpubn218 postgres]# service postgresql status
postgresql.service - SYSV: PostgreSQL database server.
Loaded: loaded (/etc/rc.d/init.d/postgresql)
Active: failed (Result: resources) since Mon 2016-07-25 12:40:28 IST; 2h 0min ago
Docs: man:systemd-sysv-generator(8)
Jul 25 12:40:26 linpubn218.gl.avaya.com systemd[1]: Starting SYSV: PostgreSQL database server....
Jul 25 12:40:28 linpubn218.gl.avaya.com postgresql[26957]: Starting postgresql service: [ OK ]
Jul 25 12:40:28 linpubn218.gl.avaya.com systemd[1]: PID file /var/run/postmaster-8.4.pid not readable (yet?) after start.
Jul 25 12:40:28 linpubn218.gl.avaya.com systemd[1]: Failed to start SYSV: PostgreSQL database server..
Jul 25 12:40:28 linpubn218.gl.avaya.com systemd[1]: Unit postgresql.service entered failed state.
Jul 25 12:40:28 linpubn218.gl.avaya.com systemd[1]: postgresql.service failed.
Jul 25 14:33:45 linpubn218.gl.avaya.com systemd[1]: Unit postgresql.service cannot be reloaded because it is inactive.
Jul 25 14:33:45 linpubn218.gl.avaya.com systemd[1]: Unit postgresql.service cannot be reloaded because it is inactive.
After looking at the logs in journalctl -xe
[root#linpubn218 postgres]# journalctl -xe
Jul 25 14:39:21 linpubn218.gl.avaya.com yum[29260]: Installed: postgresql84-libs-8.4.17-1PGDG.rhel6.x86_64
Jul 25 14:39:45 linpubn218.gl.avaya.com yum[29275]: Installed: postgresql84-8.4.17-1PGDG.rhel6.x86_64
Jul 25 14:40:01 linpubn218.gl.avaya.com useradd[29316]: failed adding user 'postgres', exit code: 9
Jul 25 14:40:02 linpubn218.gl.avaya.com CROND[29320]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jul 25 14:40:02 linpubn218.gl.avaya.com systemd[1]: Reloading.
Jul 25 14:40:03 linpubn218.gl.avaya.com systemd[1]: Configuration file /usr/lib/systemd/system/auditd.service is marked world-inaccessible. This has no effect as config
Jul 25 14:40:03 linpubn218.gl.avaya.com yum[29309]: Installed: postgresql84-server-8.4.17-1PGDG.rhel6.x86_64
Jul 25 14:42:05 linpubn218.gl.avaya.com polkitd[819]: Registered Authentication Agent for unix-process:29459:43987285 (system bus name :1.292 [/usr/bin/pkttyagent --not
Jul 25 14:42:05 linpubn218.gl.avaya.com systemd[1]: Starting SYSV: PostgreSQL database server....
Jul 25 14:42:06 linpubn218.gl.avaya.com runuser[29473]: pam_unix(runuser-l:session): session closed for user postgres
Jul 25 14:42:08 linpubn218.gl.avaya.com postgresql[29464]: Starting postgresql service: [ OK ]
Jul 25 14:42:08 linpubn218.gl.avaya.com systemd[1]: PID file /var/run/postmaster-8.4.pid not readable (yet?) after start.
Jul 25 14:42:08 linpubn218.gl.avaya.com systemd[1]: Failed to start SYSV: PostgreSQL database server..
Can postgresql 8.4 be installed on RHEL7, which is a systemd based OS? If yes, then what should I do to remove the above error?
I noticed that in /etc/init.d/postgresql-8.4 there is a declared variable:
pidfile="/var/run/postmaster-${PGMAJORVERSION}.${PGPORT}.pid"
But in systemctl, PIDfile is not the same:
# systemctl show postgresql-8.4.service -p PIDFile
PIDFile=/var/run/postmaster-8.4.pid
So, to fix the problem edit /etc/init.d/postgresql-8.4 and replace
pidfile="/var/run/postmaster-${PGMAJORVERSION}.${PGPORT}.pid"
with
pidfile="/var/run/postmaster-${PGMAJORVERSION}.pid"
then reload systemctl:
# systemctl daemon-reload
#/etc/init.d/postgresql-8.4 start
Starting postgresql-8.4 (via systemctl): [ OK ]
Generally permissions caused this type of error
su - postgres
After that:
chmod 700 -R <data_directory>
And you should check SELinux as well.

Fedora20 could not boot with serial

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.

Can not start keystone service

I installed packstack on my fresh installation of Fedora 21 with all updates. When I run
packstack --allinone I received this error:
ERROR : Error appeared during Puppet run: 192.168. 1.*_keystone.pp Error:
Could not start Service[keystone]: Execution of '/sbin/service openstack-keystone
start'` returned 1: Redirecting to /bin/systemctl start openstack-keystone.service
You will find full trace in log /var/tmp/packstack/20141223-022613-whLvTs/manifests
/192.168.1.*_keystone.pp.log
And this is the log:
Notice: /Stage[main]/Cinder::Keystone::Auth/Keystone_user_role[cinder#services]:
Dependency Service[keystone] has failures: true
Warning: /Stage[main]/Cinder::Keystone::Auth/Keystone_user_role[cinder#services]:
Skipping because of failed dependencies
Notice: Finished catalog run in 13.02 seconds
With systemctl status openstack-keystone.service get this:
openstack-keystone.service - OpenStack Identity Service (code-named Keystone)
Loaded: loaded (/usr/lib/systemd/system/openstack-keystone.service; disabled)
Active: failed (Result: start-limit) since Tue 2014-12-23 19:47:36 EET; 1min 59s ago
Process: 22526 ExecStart=/usr/bin/keystone-all (code=exited, status=1/FAILURE)
Main PID: 22526 (code=exited, status=1/FAILURE)
Dec 23 19:47:35 localhost.localdomain systemd[1]: Failed to start OpenStack...
Dec 23 19:47:35 localhost.localdomain systemd[1]: Unit openstack-keystone.s...
Dec 23 19:47:35 localhost.localdomain systemd[1]: openstack-keystone.servic...
Dec 23 19:47:36 localhost.localdomain systemd[1]: start request repeated to...
Dec 23 19:47:36 localhost.localdomain systemd[1]: Failed to start OpenStack...
Dec 23 19:47:36 localhost.localdomain systemd[1]: Unit openstack-keystone.s...
Dec 23 19:47:36 localhost.localdomain systemd[1]: openstack-keystone.servic...
This can happen due SELinux avc denial because of a missing policy.
You can try to put SELinux to permissive mode:
# setenforce 0
A similar bug

Error starting Apache 2.4.6 on OpenSuse 13.1

When I try to start the apache this happens:
Job for apache2.service failed. See ‘systemctl status apache2.service’ and ‘journalctl -xn’ for details.
system.ctl status apache2.service -l returns me this:
Mar 24 23:41:57 glauber-pc.site start_apache2[3249]: httpd2-prefork: Syntax error on line 179 of /etc/apache2/httpd.conf: Syntax error on line 102 of /etc/apache2/default-server.conf: Syntax error on line 1 of /etc/apache2/conf.d/mod_evasive.conf: Cannot load /usr/lib64/apache2/mod_evasive20.so into server: /usr/lib64/apache2/mod_evasive20.so: cannot open shared object file: No such file or directory
Mar 24 23:41:57 glauber-pc.site systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
Mar 24 23:41:57 glauber-pc.site systemd[1]: Failed to start The Apache Webserver.
Mar 24 23:41:57 glauber-pc.site systemd[1]: Unit apache2.service entered failed state.
Everything seems right in those lines, any clue what it can be?
Change the first line in
/etc/apache2/conf.d/mod_evasive.conf
to
LoadModule evasive20_module /usr/lib64/apache2/mod_evasive24.so
(...24.so instead of ...20.so)

Resources