on doing sudo systemctl restart httpd.service i get this error
[opc#xxxx ~]$ sudo systemctl restart httpd.service
Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xeu httpd.service" for det ails.
systemctl status httpd.service shows me this
× httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2022-11-05 05:48:10 GMT; 2min 54s ago
Docs: man:httpd.service(8)
Process: 48848 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 48848 (code=exited, status=1/FAILURE)
Status: "Reading configuration..."
CPU: 46ms
Nov 05 05:48:09 xxxxx systemd[1]: Starting The Apache HTTP Server...
Nov 05 05:48:10 xxxxx systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Nov 05 05:48:10 xxxxx systemd[1]: httpd.service: Failed with result 'exit-code'.
Nov 05 05:48:10 xxxxx systemd[1]: Failed to start The Apache HTTP Server.
and journalctl -xeu httpd.service shows this message
i changed the port to 80 from 443 and nothing happened
Related
I have problem when starting VNC it giving error looks like this :
Job for vncserver#:1.service failed because the control process exited with error code. See "systemctl status vncserver#:1.service" and "journalctl -xe" for details.
when i check the status the error looks like this :
vncserver#:1.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/vncserver#:1.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2021-05-07 07:43:11 UTC; 10s ago
Process: 2442 ExecStart=/usr/bin/vncserver %I (code=exited, status=2)
Process: 2436 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
May 07 07:43:11 dev-srv-nlr systemd[1]: Starting Remote desktop service (VNC)...
May 07 07:43:11 dev-srv-nlr systemd[1]: vncserver#:1.service: control process exited, code=exited status=2
May 07 07:43:11 dev-srv-nlr systemd[1]: Failed to start Remote desktop service (VNC).
May 07 07:43:11 dev-srv-nlr systemd[1]: Unit vncserver#:1.service entered failed state.
May 07 07:43:11 dev-srv-nlr systemd[1]: vncserver#:1.service failed.
do you know how to solve this ? Thanks in advance.
when I type systemctl restart httpd ,
I get the following error:
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
en when I type 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 Wed 2020-07-01 00:45:46 COT; 16s ago
Process: 1927 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
Process: 23178 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
Process: 1925 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 1925 (code=exited, status=1/FAILURE)
Status: "Total requests: 657; Current requests/sec: -30.7; Current traffic: 0 B/sec"
Jul 01 00:45:46 sitio.co systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 01 00:45:46 sitio.co systemd[1]: Failed to start The Apache HTTP Server.
Jul 01 00:45:46 sitio.co systemd[1]: Unit httpd.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
for journalctl -xe
Jul 01 01:05:01 sitio.co CROND[2219]: (root) CMD (/usr/local/maldetect/maldet --mkpubpaths >> /dev/null 2>&1)
Jul 01 01:09:23 sitio.co 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.
Jul 01 01:09:24 sitio.co systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 01 01:09:24 sitio.co 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.
--
-- The result is failed.
Jul 01 01:09:24 sitio.co systemd[1]: Unit httpd.service entered failed state.
Jul 01 01:09:48 sitio.co postfix/qmgr[2155]: 968D275E: from=<root#sitio.co>, size=3215, nrcpt=1 (queue active)
Jul 01 01:09:48 sitio.co postfix/smtp[2303]: warning: database /etc/postfix/generic.db is older than source file /etc/postfix/generic
Jul 01 01:09:49 sitio.co postfix/smtp[2303]: 968D275E: to=<sistemas.revistas#correounivalle.edu.co>, relay=smtp.gmail.com[173.194.217.109]:587, delay=42
Jul 01 01:10:01 sitio.co systemd[1]: Created slice user-0.slice.
-- Subject: Unit user-0.slice has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has finished starting up.
--
-- The start-up result is done.
Jul 01 01:10:01 sitio.co systemd[1]: Starting Session 76464 of user root.
-- Subject: Unit session-76464.scope has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-76464.scope has begun starting up.
Jul 01 01:10:01 sitio.co systemd[1]: Started Session 76464 of user root.
-- Subject: Unit session-76464.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-76464.scope has finished starting up.
--
-- The start-up result is done.
Jul 01 01:10:01 sitio.co CROND[2306]: (root) CMD (/usr/local/maldetect/maldet --mkpubpaths >> /dev/null 2>&1)
and for systemctl status httpd.service -l
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active: failed (Result: exit-code) since Wed 2020-07-01 01:09:24 COT; 4min 24s ago
Process: 2296 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
Process: 23178 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
Process: 2294 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 2294 (code=exited, status=1/FAILURE)
Status: "Total requests: 657; Current requests/sec: -30.7; Current traffic: 0 B/sec"
Jul 01 01:09:24 sitio.co systemd1: httpd.service: main process
exited, code=exited, status=1/FAILURE
Jul 01 01:09:24 sitio.co systemd1: Failed to start The Apache HTTP
Server.
Jul 01 01:09:24 sitio.co systemd1: Unit httpd.service entered failed
state.
look the last logs:
enter image description here
enter image description here
Stop the Apache httpd service and check semaphore usage owned by the apache user.
ipcs -s
Execute the following command to clear semaphore used by Apache user.
ipcs -s | awk -v user=apache '$3==user {system("ipcrm -s "$2)}'
You can refer Link for more information.
fix error by running
$ apachectl configtest
I have been trying to install Apache/2.4.37 webserver on centos 8 machine and keep getting the following error
Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xe" for details.
[root#localhost draj]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: failed (Result: exit-code) since Mon 2020-04-13 17:07:09 +0545; 4min 10s ago
Docs: man:httpd.service(8)
Process: 14004 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 14004 (code=exited, status=1/FAILURE)
Status: "Reading configuration..."
Apr 13 17:07:09 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
Apr 13 17:07:09 localhost.localdomain httpd[14004]: AH00526: Syntax error on line 122 of /etc/httpd/conf/httpd.conf:
Apr 13 17:07:09 localhost.localdomain httpd[14004]: DocumentRoot '/var/www/html' is not a directory, or is not readable
Apr 13 17:07:09 localhost.localdomain systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Apr 13 17:07:09 localhost.localdomain systemd[1]: httpd.service: Failed with result 'exit-code'.
Apr 13 17:07:09 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
Could somebody kindly shed some light on how to fix this problem, thanks !!
I am having a problem to run this code.
#systemctl start httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor prese t: disabled)
Active: failed (Result: exit-code) since Wed 2018-01-17 17:59:46 UTC; 20s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 2188 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAIL URE)
Process: 2187 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, st atus=1/FAILURE)
Main PID: 2187 (code=exited, status=1/FAILURE)
Jan 17 17:59:45 hackdays httpd[2187]: (98)Address already in use: AH00072...0
Jan 17 17:59:45 hackdays httpd[2187]: (98)Address already in use: AH00072...0
Jan 17 17:59:45 hackdays httpd[2187]: no listening sockets available, shu...n
Jan 17 17:59:45 hackdays httpd[2187]: AH00015: Unable to open logs
Jan 17 17:59:46 hackdays systemd[1]: httpd.service: main process exited, ...E
Jan 17 17:59:46 hackdays kill[2188]: kill: cannot find process ""
Jan 17 17:59:46 hackdays systemd[1]: httpd.service: control process exite...1
Jan 17 17:59:46 hackdays systemd[1]: Failed to start The Apache HTTP Server.
Jan 17 17:59:46 hackdays systemd[1]: Unit httpd.service entered failed state.
Jan 17 17:59:46 hackdays systemd[1]: httpd.service failed.
From the stacktrace I can see the below
Address already in use:
Can you check if the port is been used already by some other process.
i install nginx in my remote server but i done some error in my nginx.conf file and could not able to revert back
so it tried to remove my nginx and reconfigure it
so i used these step which is given in the link to delete my nginx
http://www.ehowstuff.com/how-to-remove-uninstall-nginx-on-centos-7-rhel-7-oracle-linux-7/
then i use yum remove nginx and again reinstall it
but when i try sudo systemctl start nginx or [root#lotto nginx]# service nginx start
its showing
Job for nginx.service failed because the control process exitenter code hereed with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
when i am using
[root#lotto nginx]# systemctl status nginx.service
showing
nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2016-07-01 07:48:44 EDT; 18s ago
Process: 30832 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
Process: 30830 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
Main PID: 14307 (code=exited, status=0/SUCCESS)
Jul 01 07:48:44 lotto systemd[1]: Starting The nginx HTTP and reverse proxy server...
Jul 01 07:48:44 lotto nginx[30832]: nginx: [emerg] getpwnam("nginx") failed in /etc/nginx/nginx.conf:5
Jul 01 07:48:44 lotto nginx[30832]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jul 01 07:48:44 lotto systemd[1]: nginx.service: control process exited, code=exited status=1
Jul 01 07:48:44 lotto systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
Jul 01 07:48:44 lotto systemd[1]: Unit nginx.service entered failed state.
Jul 01 07:48:44 lotto systemd[1]: nginx.service failed.
and [root#lotto nginx]# journalctl -xe
nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2016-07-01 07:48:44 EDT; 18s ago
Process: 30832 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
Process: 30830 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
Main PID: 14307 (code=exited, status=0/SUCCESS)
uninstall
yum remove nginx
install
In CentOS , you should using yum install ; instead of apt-get install in Ubuntu.
at last I found out the solutions by my self
I used nginx -t which shows that I don't have any syntax error in my code
Then I use
user nobody; // in my nginx.conf
This solved my problem
Thanks everyone for your help!