I'm trying to configure 3 Redis instances and 6 sentinels (3 of them running on the Redises and the rest are on the different hosts). But when I install redis-sentinel package and put my configuration under /etc/redis/sentinel.conf and restart the service using systemctl restart redis-sentinel I get this error:
Job for redis-sentinel.service failed because a timeout was exceeded.
See "systemctl status redis-sentinel.service" and "journalctl -xe" for details.
Here is the output of journalctl -u redis-sentinel:
Jan 01 08:07:07 redis1 systemd[1]: Starting Advanced key-value store...
Jan 01 08:07:07 redis1 redis-sentinel[16269]: 16269:X 01 Jan 2020 08:07:07.263 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
Jan 01 08:07:07 redis1 redis-sentinel[16269]: 16269:X 01 Jan 2020 08:07:07.263 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=16269, just started
Jan 01 08:07:07 redis1 redis-sentinel[16269]: 16269:X 01 Jan 2020 08:07:07.263 # Configuration loaded
Jan 01 08:07:07 redis1 systemd[1]: redis-sentinel.service: Can't open PID file /var/run/sentinel/redis-sentinel.pid (yet?) after start: No such file or directory
Jan 01 08:08:37 redis1 systemd[1]: redis-sentinel.service: Start operation timed out. Terminating.
Jan 01 08:08:37 redis1 systemd[1]: redis-sentinel.service: Failed with result 'timeout'.
Jan 01 08:08:37 redis1 systemd[1]: Failed to start Advanced key-value store.
Jan 01 08:08:37 redis1 systemd[1]: redis-sentinel.service: Service hold-off time over, scheduling restart.
Jan 01 08:08:37 redis1 systemd[1]: redis-sentinel.service: Scheduled restart job, restart counter is at 5.
Jan 01 08:08:37 redis1 systemd[1]: Stopped Advanced key-value store.
Jan 01 08:08:37 redis1 systemd[1]: Starting Advanced key-value store...
Jan 01 08:08:37 redis1 redis-sentinel[16307]: 16307:X 01 Jan 2020 08:08:37.738 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
Jan 01 08:08:37 redis1 redis-sentinel[16307]: 16307:X 01 Jan 2020 08:08:37.739 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=16307, just started
Jan 01 08:08:37 redis1 redis-sentinel[16307]: 16307:X 01 Jan 2020 08:08:37.739 # Configuration loaded
Jan 01 08:08:37 redis1 systemd[1]: redis-sentinel.service: Can't open PID file /var/run/sentinel/redis-sentinel.pid (yet?) after start: No such file or directory
and my sentinel.conf file:
port 26379
daemonize yes
sentinel myid 851994c7364e2138e03ee1cd346fbdc4f1404e4c
sentinel deny-scripts-reconfig yes
sentinel monitor mymaster 172.28.128.11 6379 2
sentinel down-after-milliseconds mymaster 5000
# Generated by CONFIG REWRITE
dir "/"
protected-mode no
sentinel failover-timeout mymaster 60000
sentinel config-epoch mymaster 0
sentinel leader-epoch mymaster 0
sentinel current-epoch 0
If you are trying to run your Redis servers on Debian based distribution, add below to your Redis configurations:
pidfile /var/run/redis/redis-sentinel.pid to /etc/redis/sentinel.conf
pidfile /var/run/redis/redis-server.pid to /etc/redis/redis.conf
What's the output in the sentinel log file?
I had a similar issue where Sentinel received a lot of sigterms.
In that case you need to make sure that if you use the daemonize yes setting, the systemd unit file must be using Type=forking.
Also make sure that the location of the PID file specified in the sentinel config matches the location specified in the systemd unit file.
If you face below error in journalctl or systemctl logs,
Jun 26 10:13:02 x systemd[1]: redis-server.service: Failed with result 'exit-code'.
Jun 26 10:13:02 x systemd[1]: redis-server.service: Scheduled restart job, restart counter is at 5.
Jun 26 10:13:02 x systemd[1]: Stopped Advanced key-value store.
Jun 26 10:13:02 x systemd[1]: redis-server.service: Start request repeated too quickly.
Jun 26 10:13:02 x systemd[1]: redis-server.service: Failed with result 'exit-code'.
Jun 26 10:13:02 x systemd[1]: Failed to start Advanced key-value store.
Then check /var/log/redis/redis-server.log for more information
In most cases issue is mentioned there.
i.e if a dump.rdb file is placed in /var/lib/redis then the issue might be with database count or redis version.
or in another scenario disabled IPV6 might be the issue.
Related
I am a bit puzzled about this... Apache status is showing information from 12 days ago. It's running fine and website is working. Is the status command not supposed to show current state of Apache?
# systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-01-05 05:19:24 CET; 1 weeks 5 days ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 514 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Jan 05 05:19:24 serverX systemd[1]: Starting The Apache HTTP Server...
Jan 05 05:19:24 serverX apachectl[532]: AH00112: Warning: DocumentRoot [/some/dir] does not exist
Jan 05 05:19:24 serverX apachectl[532]: (99)Cannot assign requested address: AH00072: make_sock: could not bind to address 10.42.24.6:80
Jan 05 05:19:24 serverX apachectl[532]: no listening sockets available, shutting down
Jan 05 05:19:24 serverX apachectl[532]: AH00015: Unable to open logs
Jan 05 05:19:24 serverX apachectl[514]: Action 'start' failed.
Jan 05 05:19:24 serverX apachectl[514]: The Apache error log may have more information.
Jan 05 05:19:24 serverX systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Jan 05 05:19:24 serverX systemd[1]: apache2.service: Failed with result 'exit-code'.
Jan 05 05:19:24 serverX systemd[1]: Failed to start The Apache HTTP Server.
OS: Ubuntu 20
netstat shows that port 80 is actually listening on 10.42.24.6
# netstat -tulpn | grep apache
tcp 0 0 10.42.24.6:80 0.0.0.0:* LISTEN 1557/apache2
tcp 0 0 10.42.24.6:443 0.0.0.0:* LISTEN 1557/apache2
Also Apache is logging requests to the access logs
I noticed this problem, because I am using systemctl status apache2 to check apache status in a new shell script I wrote... But the way this command is working, makes it useless.
Try to using ssh connect google cloud computer engine (macOs Catalina)
gcloud beta compute ssh --zone "us-west1-b" "mac-vm" --project "mac-vm-282201"
and get error
ssh: connect to host 34.105.11.187 port 22: Operation timed out
ERROR: (gcloud.beta.compute.ssh) [/usr/bin/ssh] exited with return code [255].
and I try
ssh -I ~/.ssh/mac-vm-key asd61404#34.105.11.187
also get error
ssh: connect to host 34.105.11.187 port 22: Operation timed out
so I found this code to diagnose it
gcloud compute ssh —zone "us-west1-b" "mac-vm" —project "mac-vm-282201" —ssh-flag="-vvv"
return
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug2: resolve_canonicalize: hostname 34.105.11.187 is address
debug2: ssh_connect_direct
debug1: Connecting to 34.105.11.187 [34.105.11.187] port 22.
I don't know, how can I fix this issue.
Thanks in advance!
here is my recent Serial console
Jul 4 02:28:39 mac-vm google_network_daemon[684]: For info, please visit https://www.isc.org/software/dhcp/
Jul 4 02:28:39 mac-vm dhclient[684]:
Jul 4 02:28:39 mac-vm dhclient[684]: Listening on Socket/ens4
[ 19.458355] google_network_daemon[684]: Listening on Socket/ens4
Jul 4 02:28:39 mac-vm google_network_daemon[684]: Listening on Socket/ens4
Jul 4 02:28:39 mac-vm dhclient[684]: Sending on Socket/ens4
[ 19.458697] google_network_daemon[684]: Sending on Socket/ens4
Jul 4 02:28:39 mac-vm google_network_daemon[684]: Sending on Socket/ens4
Jul 4 02:28:39 mac-vm systemd[1]: Finished Wait until snapd is fully seeded.
Jul 4 02:28:39 mac-vm systemd[1]: Starting Apply the settings specified in cloud-config...
Jul 4 02:28:39 mac-vm systemd[1]: Condition check resulted in Auto import assertions from block devices being skipped.
Jul 4 02:28:39 mac-vm systemd[1]: Reached target Multi-User System.
Jul 4 02:28:39 mac-vm systemd[1]: Reached target Graphical Interface.
Jul 4 02:28:39 mac-vm systemd[1]: Starting Update UTMP about System Runlevel Changes...
Jul 4 02:28:39 mac-vm systemd[1]: systemd-update-utmp-runlevel.service: Succeeded.
Jul 4 02:28:39 mac-vm systemd[1]: Finished Update UTMP about System Runlevel Changes.
[ 20.216129] cloud-init[718]: Cloud-init v. 20.1-10-g71af48df-0ubuntu5 running 'modules:config' at Sat, 04 Jul 2020 02:28:39 +0000. Up 20.11 seconds.
Jul 4 02:28:39 mac-vm cloud-init[718]: Cloud-init v. 20.1-10-g71af48df-0ubuntu5 running 'modules:config' at Sat, 04 Jul 2020 02:28:39 +0000. Up 20.11 seconds.
Jul 4 02:28:39 mac-vm systemd[1]: Finished Apply the settings specified in cloud-config.
Jul 4 02:28:39 mac-vm systemd[1]: Starting Execute cloud user/final scripts...
Jul 4 02:28:41 mac-vm google-clock-skew: INFO Synced system time with hardware clock.
[ 20.886105] cloud-init[725]: Cloud-init v. 20.1-10-g71af48df-0ubuntu5 running 'modules:final' at Sat, 04 Jul 2020 02:28:41 +0000. Up 20.76 seconds.
[ 20.886430] cloud-init[725]: Cloud-init v. 20.1-10-g71af48df-0ubuntu5 finished at Sat, 04 Jul 2020 02:28:41 +0000. Datasource DataSourceGCE. Up 20.87 seconds
Jul 4 02:28:41 mac-vm cloud-init[725]: Cloud-init v. 20.1-10-g71af48df-0ubuntu5 running 'modules:final' at Sat, 04 Jul 2020 02:28:41 +0000. Up 20.76 seconds.
Jul 4 02:28:41 mac-vm cloud-init[725]: Cloud-init v. 20.1-10-g71af48df-0ubuntu5 finished at Sat, 04 Jul 2020 02:28:41 +0000. Datasource DataSourceGCE. Up 20.87 seconds
Jul 4 02:28:41 mac-vm systemd[1]: Finished Execute cloud user/final scripts.
Jul 4 02:28:41 mac-vm systemd[1]: Reached target Cloud-init target.
Jul 4 02:28:41 mac-vm systemd[1]: Starting Google Compute Engine Startup Scripts...
Jul 4 02:28:41 mac-vm startup-script: INFO Starting startup scripts.
Jul 4 02:28:41 mac-vm startup-script: INFO Found startup-script in metadata.
Jul 4 02:28:42 mac-vm startup-script: INFO startup-script: sudo: ufw: command not found
Jul 4 02:28:42 mac-vm startup-script: INFO startup-script: Return code 1.
Jul 4 02:28:42 mac-vm startup-script: INFO Finished running startup scripts.
Jul 4 02:28:42 mac-vm systemd[1]: google-startup-scripts.service: Succeeded.
Jul 4 02:28:42 mac-vm systemd[1]: Finished Google Compute Engine Startup Scripts.
Jul 4 02:28:42 mac-vm systemd[1]: Startup finished in 1.396s (kernel) + 20.065s (userspace) = 21.461s.
Jul 4 02:29:06 mac-vm systemd[1]: systemd-hostnamed.service: Succeeded.
Jul 4 02:43:32 mac-vm systemd[1]: Starting Cleanup of Temporary Directories...
Jul 4 02:43:32 mac-vm systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
Jul 4 02:43:32 mac-vm systemd[1]: Finished Cleanup of Temporary Directories.
I tried to restart failed and i tried multiple options, Yet i could not able to restart the apache2.
Below links i have tried for the problems and yet i could not able to restart.
https://askubuntu.com/questions/256013/apache-error-could-not-reliably-determine-the-servers-fully-qualified-domain-n
https://askubuntu.com/questions/256013/apache-error-could-not-reliably-determine-the-servers-fully-qualified-domain-n/256018
i am using ubuntu 18.04 LTS and i am hosting the openproject software.
i added the lines as they said. Yet my apache server is not starting.
my ipaddress is 192.168.1.146 (localhost) to browse openproject
Yesterday it was working and i could able to open the project from other computers.
http://192.168.1.146
it will navigate to the index page of the openproject.
awaiting your reply.
Solved:-
netstat -ltnp | grep :80
I found that nginx is running.
So i done sudo apt-get purge nginx
sudo kill -9 982
sudo service nginx stop
sudo service apache2 start
craftsilicon#OpenProject:~$ systemctl status apache2.service
apache2.service - The Apache HTTP Server Loaded: loaded
(/lib/systemd/system/apache2.service; enabled; vendor preset:
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf Active: failed (Result: exit-code) since Mon 2020-02-03 15:23:49 IST; 13s ago Process: 3461
ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILU
Feb 03 15:23:49 OpenProject apachectl[3461]: [Mon Feb 03
15:23:49.816448 2020] [ Feb 03 15:23:49 OpenProject apachectl[3461]:
(98)Address already in use: AH00072 Feb 03 15:23:49 OpenProject
apachectl[3461]: (98)Address already in use: AH00072 Feb 03 15:23:49
OpenProject apachectl[3461]: no listening sockets available, shu Feb
03 15:23:49 OpenProject apachectl[3461]: AH00015: Unable to open logs
Feb 03 15:23:49 OpenProject apachectl[3461]: Action 'start' failed.
Feb 03 15:23:49 OpenProject apachectl[3461]: The Apache error log may
have more Feb 03 15:23:49 OpenProject systemd[1]: apache2.service:
Control process exited, Feb 03 15:23:49 OpenProject systemd[1]:
apache2.service: Failed with result 'exi Feb 03 15:23:49 OpenProject
systemd[1]: Failed to start The Apache HTTP Server.
craftsilicon#OpenProject:~$ journalctl -xe
-- Unit systemd-tmpfiles-clean.service has begun starting up. Feb 03 15:24:51 OpenProject systemd[1]: Started Cleanup of Temporary
Directories.
-- Subject: Unit systemd-tmpfiles-clean.service has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- Unit systemd-tmpfiles-clean.service has finished starting up.
-- The start-up result is RESULT. Feb 03 15:25:01 OpenProject CRON[3580]: pam_unix(cron:session): session opened for user root by
(uid=0 Feb 03 15:25:01 OpenProject CRON[3583]: (root) CMD (command -v
debian-sa1 > /dev/null && debian-sa1 1 Feb 03 15:25:01 OpenProject
CRON[3580]: pam_unix(cron:session): session closed for user root Feb
03 15:30:57 OpenProject systemd-resolved[606]: Using degraded feature
set (UDP) for DNS server 4.2 Feb 03 15:32:21 OpenProject
libreoffice-writer.desktop[3668]: javaldx: Could not find a Java
Runtime E Feb 03 15:32:21 OpenProject
libreoffice-writer.desktop[3668]: Please ensure that a JVM and the
package Feb 03 15:32:21 OpenProject libreoffice-writer.desktop[3668]:
is installed. Feb 03 15:32:21 OpenProject
libreoffice-writer.desktop[3668]: If it is already installed then try
remo Feb 03 15:32:21 OpenProject libreoffice-writer.desktop[3668]:
Warning: failed to read path from javald Feb 03 15:32:24 OpenProject
audit[3687]: AVC apparmor="ALLOWED" operation="open"
profile="libreoffice- Feb 03 15:32:24 OpenProject audit[3687]: AVC
apparmor="ALLOWED" operation="open" profile="libreoffice- Feb 03
15:32:24 OpenProject kernel: kauditd_printk_skb: 32 callbacks
suppressed Feb 03 15:32:24 OpenProject kernel: audit: type=1400
audit(1580724144.128:44): apparmor="ALLOWED" oper Feb 03 15:32:24
OpenProject kernel: audit: type=1400 audit(1580724144.128:45):
apparmor="ALLOWED" oper lines 3213-3235/3235 (END)
I can't start my apache server on debian 9.
I tried reinstall :
sudo apt-get autoremove --purge apache2 && sudo apt-get install apache2
but no change...
Job for apache2.service failed because of unavailable resources or another system error.
See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "restart" failed.
systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: resources)
journalctl -xeu apache2.service
(I set loglevel to debug mod)
Sep 05 11:45:44 systemd[1]: apache2.service: Failed with result 'resources'.
Sep 05 11:50:26 systemd[1]: apache2.service: Changed dead -> failed
Sep 05 11:50:27 systemd[1]: apache2.service: Trying to enqueue job apache2.service/stop/replace
Sep 05 11:50:27 systemd[1]: apache2.service: Installed new job apache2.service/stop as 1415
Sep 05 11:50:27 systemd[1]: apache2.service: Enqueued job apache2.service/stop as 1415
Sep 05 11:50:27 systemd[1]: apache2.service: Job apache2.service/stop finished, result=done
Sep 05 11:50:27 systemd[1]: apache2.service: Changed dead -> failed
Sep 05 11:50:30 systemd[1]: apache2.service: Failed to run 'start' task: No such file or directory
Sep 05 11:50:30 systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit apache2.service has failed.
--
-- The result is failed.
Sep 05 11:50:30 systemd[1]: apache2.service: Failed with result 'resources'.
what's wrong?
Maybe this is a problem with service 'tmp' directory. I has a similar error with systemd-resolved.service, and reason was missing '/var/tmp' directory after system migration. Check what temp directory the service is using and create it if necessary.
Also, if there is systemd newly running and crap in /var/tmp/, you might have to clear up this crap and try running the service again.
In my case it turned out to be this (without apache2 running at the time):
root#www:/var/tmp # ls -al
total 32
drwxrwxrwt 8 root root 4096 Dec 15 12:48 .
drwxr-xr-x 14 root root 4096 Jul 8 21:43 ..
drwx------ 2 root root 4096 Dec 15 12:48 systemd-private-1dcdfe608b6c41f387936225d86126c7-apache2.service-L0KeaS
drwx------ 2 root root 4096 Dec 8 03:09 systemd-private-39294ac7bf4b44198d87d45660dcbac2-phpsessionclean.service-4ShLZm
drwx------ 2 root root 4096 Dec 15 04:00 systemd-private-451ad0c3bfe6435891a80a6c714a222b-apache2.service-YQyZes
drwx------ 2 root root 4096 Dec 15 07:09 systemd-private-451ad0c3bfe6435891a80a6c714a222b-phpsessionclean.service-5L25TU
drwx------ 3 root root 4096 Dec 15 03:53 systemd-private-68bc1493e8804c968af642a2319c4e79-apache2.service-RY1iLF
I'm using RHEL 7.4 OS. I have done systemctl disable httpd.service to disable auto start of httpd. It is disabled also.
[root#clustermrfc002 ~]# systemctl is-enabled httpd
disabled.
But on reboot httpd service is starting.
Jul 28 18:02:07 clustermrfc002.novalocal systemd[1]: Starting The Apache HTTP Server...
Jul 28 18:02:08 clustermrfc002.novalocal httpd[8732]: [Sat Jul 28 18:02:08.357617 2018] [core:warn] [pid 8732] AH00117: Ignoring deprecated use
Jul 28 18:02:08 clustermrfc002.novalocal systemd[1]: Started The Apache HTTP Server.
which is causing problem in rhel 7 pacemaker cluster, below error is seen.
Jul 28 18:12:23 clustermrfc001 pengine[7420]: error: Resource MNGT_httpd_rhcdDaemon (systemd::httpd) is active on 2 nodes attempting recovery
Check the output of "chkconfig" and review its runlevel.
Or, check if any other service for HTTPD is enabled using "systemctl list-unit-files", if enabled, disable and verify
Although httpd.service is disabled to start on boot, its started by network.target as a dependency.
Jul 26 15:02:41 localhost.localdomain systemd[1]: Starting Network.
Jul 26 15:02:41 localhost.localdomain systemd[1]: Starting /etc/rc.d/rc.local Compatibility...
Jul 26 15:02:41 localhost.localdomain systemd[1]: Starting Postfix Mail Transport Agent...
Jul 26 15:02:41 localhost.localdomain systemd[1]: Starting Dynamic System Tuning Daemon...
Jul 26 15:02:41 localhost.localdomain systemd[1]: Starting PostgreSQL database server...
Jul 26 15:02:41 localhost.localdomain systemd[1]: Starting Simple Network Management Protocol (SNMP) Daemon....
Jul 26 15:02:41 localhost.localdomain systemd[1]: Starting
The Apache HTTP Server...