Not able to start redhat httpd service - linux

When I try to start the httpd service it is failing with the error :
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
output of journalctl -xe
The result is failed.
Dec 08 04:09:49 uls-**** systemd[1]: Unit httpd.service entered failed state.
Dec 08 04:09:49 uls-******** systemd[1]: httpd.service failed.
Dec 08 04:09:49 uls-******** sudo[67525]: pam_unix(sudo:session): session closed for user root
Dec 08 04:09:49 uls-******** polkitd[854]: Unregistered Authentication Agent for unix-process:67526:3062933569 (system bus name :1.159161, object path /org/
Dec 08 04:10:01 uls-******** systemd[1]: Started Session 78106 of user root.
-- Subject: Unit session-78106.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-78106.scope has finished starting up.
--
-- The start-up result is done.
Dec 08 04:10:01 uls-******** systemd[1]: Started Session 78107 of user root.
-- Subject: Unit session-78107.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-78107.scope has finished starting up.
--
-- The start-up result is done.
Dec 08 04:10:01 uls-******** CROND[67561]: (root) CMD (/usr/share/spamassassin/sa-update.cron 2>&1 | tee -a /var/log/sa-update.log)
Dec 08 04:10:01 uls-******** CROND[67562]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Dec 08 04:20:01 uls-******** systemd[1]: Started Session 78109 of user root.
-- Subject: Unit session-78109.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-78109.scope has finished starting up.
--
-- The start-up result is done.
Dec 08 04:20:01 uls-******** systemd[1]: Started Session 78108 of user root.
-- Subject: Unit session-78108.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-78108.scope has finished starting up.
--
-- The start-up result is done
.
output of systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2021-12-08 04:26:51 PST; 53s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 68719 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 68719 (code=exited, status=1/FAILURE)
I tried to change the port number in httpd.conf file. But I got the same error. Can anyone please help?

try check your config, validate from command apachectl configtest

Related

How to add MACs and KEX algorithms in /etc/ssh/sshd_config on Ubuntu 18.04 on GCP

I added following MACs to /etc/ssh/sshd_config of Ubuntu 18.04 compute instance on GCP. But after updating the file ssh is not restarting and journalctl -xe shows /etc/ssh/sshd_config line 130: Bad SSH2 mac spec.
MACs hmac-sha1-512-etm#openssh.com,hmac-sha1-512-etm#openssh.com,umac-128-etm#openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128#openssh.com
I see following error when I try to restart ssh:
$ sudo systemctl restart ssh
Job for ssh.service failed because the control process exited with error code.
See "systemctl status ssh.service" and "journalctl -xe" for details.
$ journalctl -xe
--
-- Unit ssh.service has begun starting up.
Aug 02 11:37:17 ubuntu1804 sshd[23779]: /etc/ssh/sshd_config line 130: Bad SSH2 mac spec 'hmac-sha1-512-etm#openssh.com,hmac-sha1-512-etm#openssh.com,umac-128-etm#open
Aug 02 11:37:17 ubuntu1804 systemd[1]: ssh.service: Control process exited, code=exited status=255
Aug 02 11:37:17 ubuntu1804 systemd[1]: ssh.service: Failed with result 'exit-code'.
Aug 02 11:37:17 ubuntu1804 systemd[1]: Failed to start OpenBSD Secure Shell server.
-- Subject: Unit ssh.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit ssh.service has failed.
--
-- The result is RESULT.
Aug 02 11:37:17 ubuntu1804 systemd[1]: ssh.service: Service hold-off time over, scheduling restart.
Aug 02 11:37:17 ubuntu1804 systemd[1]: ssh.service: Scheduled restart job, restart counter is at 5.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit ssh.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Aug 02 11:37:17 ubuntu1804 systemd[1]: Stopped OpenBSD Secure Shell server.
-- Subject: Unit ssh.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit ssh.service has finished shutting down.
Aug 02 11:37:17 ubuntu1804 systemd[1]: ssh.service: Start request repeated too quickly.
Aug 02 11:37:17 ubuntu1804 systemd[1]: ssh.service: Failed with result 'exit-code'.
Aug 02 11:37:17 ubuntu1804 systemd[1]: Failed to start OpenBSD Secure Shell server.
-- Subject: Unit ssh.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit ssh.service has failed.
--
-- The result is RESULT.
Following is the error received when I try to connect after logoff from the existing ssh session.
ubuntu1804> gcloud compute ssh ubuntu1804 --zone us-east1-b
ssh: connect to host 35.237.57.183 port 22: Connection refused
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].
I did not find a single clue about this in google cloud documentation. I can fix the server but I would like to know what is the right way to add such configuration in sshd_config on a Ubuntu linux on GCP.
Verify acceptable values for MACs with ssh -Q mac. I'd assume hmac-sha1-512-etm#openssh.com and hmac-sha1-512-etm#openssh.com won't be there.

ob for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details

Hello i am settting my django app and i got the following error
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
when I run this command "systemctl status nginx.service"
I got this
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-06-08 08:44:51 UTC; 1min 36s ago
Docs: man:nginx(8)
Process: 1878 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
and when I run "journalctl -xe"
i got following message
--
-- The job identifier is 1.
Jun 08 08:27:55 ubuntu-s-1vcpu-1gb-blr1-01 systemd[886]: Startup finished in 133ms.
-- Subject: User manager start-up is now complete
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The user manager instance for user 1000 has been started. All services queued
-- for starting have been started. Note that other services might still be starting
-- up or be started at any later time.
--
-- Startup of the manager took 133459 microseconds.
Jun 08 08:28:40 ubuntu-s-1vcpu-1gb-blr1-01 systemd[886]: Started D-Bus User Message Bus.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit UNIT has finished successfully.
--
-- The job identifier is 16.
Jun 08 08:28:40 ubuntu-s-1vcpu-1gb-blr1-01 dbus-daemon[1019]: [session uid=1000 pid=1019] AppArmor D-Bus mediation is enabled
Jun 08 08:31:39 ubuntu-s-1vcpu-1gb-blr1-01 sudo[1308]: pam_unix(sudo:auth): Couldn't open /etc/securetty: No such file or directory
Jun 08 08:31:44 ubuntu-s-1vcpu-1gb-blr1-01 sudo[1308]: pam_unix(sudo:auth): Couldn't open /etc/securetty: No such file or directory
Jun 08 08:40:07 ubuntu-s-1vcpu-1gb-blr1-01 sshd[979]: Received disconnect from 47.15.4.238 port 54700:11: disconnected by user
Jun 08 08:40:07 ubuntu-s-1vcpu-1gb-blr1-01 sshd[979]: Disconnected from user yash 47.15.4.238 port 54700
Jun 08 08:40:48 ubuntu-s-1vcpu-1gb-blr1-01 sudo[1707]: pam_unix(sudo:auth): Couldn't open /etc/securetty: No such file or directory
Jun 08 08:40:53 ubuntu-s-1vcpu-1gb-blr1-01 sudo[1707]: pam_unix(sudo:auth): Couldn't open /etc/securetty: No such file or directory
Jun 08 08:44:47 ubuntu-s-1vcpu-1gb-blr1-01 sudo[1875]: pam_unix(sudo:auth): Couldn't open /etc/securetty: No such file or directory
Jun 08 08:44:51 ubuntu-s-1vcpu-1gb-blr1-01 sudo[1875]: pam_unix(sudo:auth): Couldn't open /etc/securetty: No such file or directory
~
~
~
~
can anyone help me
~

(Job for apache2.service failed because the control process exited with error code) occured after trying to activate webdav module

I tried to start my apache webserver but I can't. Every time I type in:
sservice apache2 start
I get the Error:
Job for apache2.service failed because the control process exited with error code.
I got the error the first time after I tried to activate the WebDAV module for apache2. But I already deactivated it. I rebooted the server too but no effect.
I'm running the apache on my second pc and access it via SSH.
Heres my Logfile:
--
-- A start job for unit phpsessionclean.service has begun execution.
--
-- The job identifier is 1448.
Jul 28 18:39:31 Server-MS-7B28 systemd[1]: phpsessionclean.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit phpsessionclean.service has successfully entered the 'dead' state.
Jul 28 18:39:31 Server-MS-7B28 systemd[1]: Finished Clean php session files.
-- Subject: A start job for unit phpsessionclean.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit phpsessionclean.service has finished successfully.
--
-- The job identifier is 1448.
Jul 28 18:40:25 Server-MS-7B28 sshd[2785]: Received disconnect from 222.186.31.166 port 58094:11: [preauth]
Jul 28 18:40:25 Server-MS-7B28 sshd[2785]: Disconnected from 222.186.31.166 port 58094 [preauth]
Jul 28 18:40:37 Server-MS-7B28 sshd[2787]: Received disconnect from 112.85.42.104 port 12119:11: [preauth]
Jul 28 18:40:37 Server-MS-7B28 sshd[2787]: Disconnected from 112.85.42.104 port 12119 [preauth]
Jul 28 18:41:43 Server-MS-7B28 sudo[2793]: pam_unix(sudo:auth): Couldn't open /etc/securetty: Datei oder Verzeichnis nicht gefunden
Jul 28 18:41:46 Server-MS-7B28 sudo[2793]: pam_unix(sudo:auth): Couldn't open /etc/securetty: Datei oder Verzeichnis nicht gefunden
Jul 28 18:41:46 Server-MS-7B28 sudo[2793]: elias-server : TTY=pts/0 ; PWD=/home/elias-server ; USER=root ; COMMAND=/bin/bash
Jul 28 18:41:46 Server-MS-7B28 sudo[2793]: pam_unix(sudo:session): session opened for user root by elias-server(uid=0)
Jul 28 18:41:53 Server-MS-7B28 audit[2808]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/lib/snapd/snap-confine" pid=2808 comm="apparmor_parser"
Jul 28 18:41:53 Server-MS-7B28 audit[2808]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=28>
Jul 28 18:41:53 Server-MS-7B28 kernel: audit: type=1400 audit(1595954513.320:3245): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/lib/snapd/snap-confine" pi>
Jul 28 18:41:53 Server-MS-7B28 kernel: audit: type=1400 audit(1595954513.320:3246): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/lib/snapd/snap-confine//mo>
Jul 28 18:42:09 Server-MS-7B28 systemd[1]: Starting The Apache HTTP Server...
-- Subject: A start job for unit apache2.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit apache2.service has begun execution.
--
-- The job identifier is 1515.
Jul 28 18:42:09 Server-MS-7B28 apachectl[2837]: AH00526: Syntax error on line 32 of /etc/apache2/sites-enabled/000-default.conf:
Jul 28 18:42:09 Server-MS-7B28 apachectl[2837]: Invalid command 'DAV', perhaps misspelled or defined by a module not included in the server configuration
Jul 28 18:42:09 Server-MS-7B28 apachectl[2817]: Action 'start' failed.
Jul 28 18:42:09 Server-MS-7B28 apachectl[2817]: The Apache error log may have more information.
Jul 28 18:42:09 Server-MS-7B28 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit apache2.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Jul 28 18:42:09 Server-MS-7B28 systemd[1]: apache2.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit apache2.service has entered the 'failed' state with result 'exit-code'.
Jul 28 18:42:09 Server-MS-7B28 systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: A start job for unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit apache2.service has finished with a failure.
--
-- The job identifier is 1515 and the job result is failed.
Thank you for your help,
Elias
The problem is because some configuration files are deleted, you have to reinstall it.
REINSTALL APACHE2:
To replace configuration files that have been deleted, without purging the package, you can do:
sudo apt-get -o DPkg::Options::="--force-confmiss" --reinstall install apache2
To fully remove the apache2 config files, you should:
sudo apt-get purge apache2
which will then let you reinstall it in the usual way with:
sudo apt-get install apache2
This can happen if port 80 is already under use.
refer the link for more
You can use this to check if something is using the port.
netstat -plant | grep 80

problems centos 7 httpd service restart

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

How to port an RPM package consist of SysV init script to systemd?

I have created an RPM package for my daemon which on installation create service init script under /etc/init.d/
Now I wanted to port this RPM package for CentOS7.1 and use systemd framework for service startup through boot as well as by admin through start/stop command.
I couldn't find any tutorial. Please help.
EDIT:
I tried the suggestion given by msuchy.
I tried and here is my observation
On sysV based framework (CentOS6.5)
[root#adil work]# /etc/init.d/daemon_script status
Service daemon: Stopped
[root#adil work]# /etc/init.d/daemon_script start
Starting daemon: Initializing daemon... [ OK ]
[root#adil work]#
[root#adil work]# /etc/init.d/daemon_script status
Service daemon: Running
[root#adil work]#
[root#adil work]# /etc/init.d/daemon_script stop
Shutting down parent daemon: [ OK ]
[root#adil work]# /etc/init.d/daemon_script status
Service daemon: Stopped
[root#adil work]#
===========
On systemd based framework, I install the same RPM on CentOS7.1
[root#localhost x86_64]# /etc/init.d/daemon_script
Usage: /etc/init.d/daemon_script {start|stop|restart|status}
[root#localhost x86_64]# /etc/init.d/daemon_script start
Starting daemon_script (via systemctl): Warning: Unit file of daemon_script.service changed on disk, 'systemctl daemon-reload' recommended.
Job for daemon_script.service failed. See 'systemctl status daemon_script.service' and 'journalctl -xn' for details.
[FAILED]
[root#localhost x86_64]# systemctl daemon-reload
[root#localhost x86_64]# systemctl status daemon_script.service
daemon_script.service - SYSV: start and stop Test daemon service.
Loaded: loaded (/etc/rc.d/init.d/daemon_script)
Active: failed (Result: exit-code) since Fri 2015-09-11 15:30:44 IST; 32s ago
Sep 11 15:30:44 localhost.localdomain systemd[1]: Starting SYSV: start and st...
Sep 11 15:30:44 localhost.localdomain systemd[1]: daemon_script.service: cont...
Sep 11 15:30:44 localhost.localdomain systemd[1]: Failed to start SYSV: start...
Sep 11 15:30:44 localhost.localdomain systemd[1]: Unit daemon_script.service ...
Hint: Some lines were ellipsized, use -l to show in full.
[root#localhost x86_64]# systemctl status daemon_script.service -l
daemon_script.service - SYSV: start and stop Test daemon service.
Loaded: loaded (/etc/rc.d/init.d/daemon_script)
Active: failed (Result: exit-code) since Fri 2015-09-11 15:30:44 IST; 46s ago
Sep 11 15:30:44 localhost.localdomain systemd[1]: Starting SYSV: start and stop Test daemon service....
Sep 11 15:30:44 localhost.localdomain systemd[1]: daemon_script.service: control process exited, code=exited status=203
Sep 11 15:30:44 localhost.localdomain systemd[1]: Failed to start SYSV: start and stop Test daemon service..
Sep 11 15:30:44 localhost.localdomain systemd[1]: Unit daemon_script.service entered failed state.
[root#localhost x86_64]#
output of journalctl -xn
-- Logs begin at Fri 2015-09-11 14:50:35 IST, end at Fri 2015-09-11 15:40:01 IST. --
Sep 11 15:31:03 localhost.localdomain systemd[1]: [/usr/lib/systemd/system/dm-event.socket:10] Unknown lvalue 'RemoveOnStop' in section 'Socket'
Sep 11 15:39:33 localhost.localdomain systemd[1]: Starting SYSV: start and stop Test daemon service....
-- Subject: Unit daemon_script.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit daemon_script.service has begun starting up.
Sep 11 15:39:33 localhost.localdomain systemd[8509]: Failed at step EXEC spawning /etc/rc.d/init.d/daemon_script: Exec format error
-- Subject: Process /etc/rc.d/init.d/daemon_script could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The process /etc/rc.d/init.d/daemon_script could not be executed and failed.
--
-- The error number returned while executing this process is 8.
Sep 11 15:39:33 localhost.localdomain systemd[1]: daemon_script.service: control process exited, code=exited status=203
Sep 11 15:39:33 localhost.localdomain systemd[1]: Failed to start SYSV: start and stop Test daemon service..
-- Subject: Unit daemon_script.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit daemon_script.service has failed.
--
-- The result is failed.
Sep 11 15:39:33 localhost.localdomain systemd[1]: Unit daemon_script.service entered failed state.
Sep 11 15:40:01 localhost.localdomain 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.
Sep 11 15:40:01 localhost.localdomain systemd[1]: Starting Session 7 of user root.
-- Subject: Unit session-7.scope has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-7.scope has begun starting up.
Sep 11 15:40:01 localhost.localdomain systemd[1]: Started Session 7 of user root.
-- Subject: Unit session-7.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-7.scope has finished starting up.
--
-- The start-up result is done.
Sep 11 15:40:01 localhost.localdomain CROND[8528]: (root) CMD (/usr/lib64/sa/sa1 1 1)
[root#localhost x86_64]#
You do not need to migrate your scripts.
It is probably better and you can utilize some interesting functions of Systemd, your files will be smaller. But you do not need to migrate. Systemd works correctly with SysV init files too.
You can not locate any SysV init files on CentOS 7 installation because Red Hat packagers (who created CentOS) put an effort into packaging and migrated all SysV files to unit files. But you do not need to.
The is only one task you need to do. Once you place new SysV file, you must reload the systemd manager configuration using
# systemctl daemon-reload
That is all.
I give you small example
# cat /etc/init.d/foo
#!/usr/bin/sh
echo ahoy
# chmod a+x /etc/init.d/foo
# systemctl start foo
Failed to start foo.service: Unit foo.service failed to load: No such file or directory.
# systemctl daemon-reload
# systemctl start foo
# journalctl -xn
-- Subject: Unit foo.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit foo.service has finished starting up.
--
-- The start-up result is done.
# service foo start
ahoy
So you can use all command (chkconfig, service) as you are used to from CentOS 6. And when you have time, you can study man systemd.unit(5) and bunch of other man pages (see "SEE ALSO" of that man page).

Resources