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)
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.
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.
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...
I have just starting using Linode with Centos 7. I have never created my own server to host a website so apologies in advance.
I have read every stackoverflow (and other sites) Q&A's for this problem and I can't seem to fix it.
I installed Apache2 and followed the tutorial on Linodes website. The server doesn't start and I get these following errors:
When I run - systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active: failed (Result: exit-code) since Sun 2015-11-08 16:18:47 GMT; 10s ago
Process: 15662 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 15661 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=0/SUCCESS)
Main PID: 15661 (code=exited, status=0/SUCCESS)
Nov 08 16:18:47 london systemd[1]: Starting The Apache HTTP Server...
Nov 08 16:18:47 london httpd[15661]: httpd (pid 15652) already running
Nov 08 16:18:47 london kill[15662]: kill: cannot find process ""
Nov 08 16:18:47 london systemd[1]: httpd.service: control process exited, code=exited status=1
Nov 08 16:18:47 london systemd[1]: Failed to start The Apache HTTP Server.
Nov 08 16:18:47 london systemd[1]: Unit httpd.service entered failed state.
When I run - journalctl -xn
Logs begin at Thu 2015-10-22 20:33:26 BST, end at Sun 2015-11-08 16:18:47 GMT.
Nov 08 16:10:01 london systemd[1]: Starting Session 2857 of user root.
Subject: Unit session-2857.scope has begun with start-up
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Unit session-2857.scope has begun starting up.
Nov 08 16:10:01 london systemd[1]: Started Session 2857 of user root.
Subject: Unit session-2857.scope has finished start-up
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Unit session-2857.scope has finished starting up.
The start-up result is done.
Nov 08 16:10:01 london CROND[15635]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Nov 08 16:15:02 london sshd[15647]: Received disconnect from 43.229.53.26: 11: [preauth]
Nov 08 16:18:47 london systemd[1]: Starting The Apache HTTP Server...
Subject: Unit httpd.service has begun with start-up
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Unit httpd.service has begun starting up.
Nov 08 16:18:47 london httpd[15661]: httpd (pid 15652) already running
Nov 08 16:18:47 london kill[15662]: kill: cannot find process ""
Nov 08 16:18:47 london systemd[1]: httpd.service: control process exited, code=exited status=1
Nov 08 16:18:47 london systemd[1]: Failed to start The Apache HTTP Server.
Subject: Unit httpd.service has failed
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Unit httpd.service has failed.
I have absolutely no idea and can't see where I am going wrong. Can someone help at all??
Many thanks!