You are not logged in.

#1 2012-10-18 19:56:32

Jobbe
Member
Registered: 2012-10-17
Posts: 18

[SOLVED] systemd - general problem - httpd daemon wont't start at boot

I've tried since yesterday to get the httpd.service to run at system boot. With no luck!

I installed Arch yesterday, and I had big trouble getting GDM to autostart, but I eventually got it working.

Sadly then I have the same problems, again. This time with the httpd service.

I tried the wiki about Apache with no luck.

I did not use rc.d - I used systemd:

systemctl enable httpd.service

which didn't produce any errors. nor output at all.

Also this command works, so I don't think it's the httpd service that have a problem.

systemctl enable httpd.service

Any idea's ?

Last edited by Jobbe (2012-10-19 23:04:17)

Offline

#2 2012-10-18 20:03:43

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] systemd - general problem - httpd daemon wont't start at boot

Please change your thread title to something that actually describes your problem
https://wiki.archlinux.org/index.php/Fo … ow_to_Post


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2012-10-18 20:16:42

Gnarl
Member
Registered: 2010-11-18
Posts: 63

Re: [SOLVED] systemd - general problem - httpd daemon wont't start at boot

Create a httpd.service file in /etc/systemd/system/

[Unit]
Description=Apache Webserver
After=network.target

[Service]
Type=forking
EnvironmentFile=/etc/conf.d/apache
ExecStart=/usr/sbin/httpd -k start $OPTIONS
ExecStop=/usr/sbin/httpd -k graceful-stop $OPTIONS
ExecReload=/usr/sbin/httpd -k graceful $OPTIONS
Restart=always

[Install]
WantedBy=multi-user.target

After created run

systemctl daemon-reload

Offline

#4 2012-10-18 20:23:24

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] systemd - general problem - httpd daemon wont't start at boot

I know you stated that you installed yesterday, which likely means you are using systemd, but I just want to make sure.... you are using systemd right?

Offline

#5 2012-10-18 21:11:52

Jobbe
Member
Registered: 2012-10-17
Posts: 18

Re: [SOLVED] systemd - general problem - httpd daemon wont't start at boot

jasonwryan wrote:

Please change your thread title to something that actually describes your problem
https://wiki.archlinux.org/index.php/Fo … ow_to_Post

Sorry! I corrected it!

---

WonderWoofy wrote:

I know you stated that you installed yesterday, which likely means you are using systemd, but I just want to make sure.... you are using systemd right?

yes that indeed i do! smile

---

Gnarl: I'm affraid it did not work, i did as you wrote

this command didn't return anything

systemctl daemon-reload

Offline

#6 2012-10-18 21:53:55

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] systemd - general problem - httpd daemon wont't start at boot

Jobbe wrote:

I used systemd:

systemctl enable httpd.service

which didn't produce any errors. nor output at all.

It should have given you this output:

ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'

Have you successfully enabled other services?

Jobbe wrote:

Also this command works, so I don't think it's the httpd service that have a problem.

systemctl enable httpd.service

That's the enable command again - did you mean 'systemctl start'?

Gnarl wrote:

Create a httpd.service file in /etc/systemd/system/

Unnecessary, the apache package already provides the required service file.

Offline

#7 2012-10-18 21:55:19

Morrad
Member
Registered: 2012-01-18
Posts: 54

Re: [SOLVED] systemd - general problem - httpd daemon wont't start at boot

What does 'systemctl status httpd.service' have to say?  Also, 'journald' may contain some clues.

Offline

#8 2012-10-18 22:11:17

Jobbe
Member
Registered: 2012-10-17
Posts: 18

Re: [SOLVED] systemd - general problem - httpd daemon wont't start at boot

tomk wrote:
Jobbe wrote:

I used systemd:

systemctl enable httpd.service

which didn't produce any errors. nor output at all.

It should have given you this output:

ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'

I just tried this command (after i did a disable)

sudo systemctl enable httpd.service

which gave this output:

ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
tomk wrote:

Have you successfully enabled other services?

yes, I got GDM working - with trouble! (systemd didn't work as expected either)

tomk wrote:
Jobbe wrote:

Also this command works, so I don't think it's the httpd service that have a problem.

systemctl enable httpd.service

That's the enable command again - did you mean 'systemctl start'?

I did. Sorry!

---

Still httpd is not running ..

Offline

#9 2012-10-19 13:58:42

Gnarl
Member
Registered: 2010-11-18
Posts: 63

Re: [SOLVED] systemd - general problem - httpd daemon wont't start at boot

tomk wrote:
Jobbe wrote:

I used systemd:

systemctl enable httpd.service

which didn't produce any errors. nor output at all.

It should have given you this output:

ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'

Have you successfully enabled other services?

Jobbe wrote:

Also this command works, so I don't think it's the httpd service that have a problem.

systemctl enable httpd.service

That's the enable command again - did you mean 'systemctl start'?

Gnarl wrote:

Create a httpd.service file in /etc/systemd/system/

Unnecessary, the apache package already provides the required service file.

The stock httpd.service did work for me.

The systemctl daemon-reload will not have an output

you'll have to start the service as you did above.

Offline

#10 2012-10-19 23:05:18

Jobbe
Member
Registered: 2012-10-17
Posts: 18

Re: [SOLVED] systemd - general problem - httpd daemon wont't start at boot

Hm. I reinstalled my system onto my SSD drive. And it works now. I don't know what else I did, since I did exactly the same as when I installed before.

Last edited by Jobbe (2012-10-19 23:06:12)

Offline

#11 2017-12-10 23:58:30

nelsinchi
Member
From: America/Bogota
Registered: 2012-06-19
Posts: 3

Re: [SOLVED] systemd - general problem - httpd daemon wont't start at boot

After the httpd service is enabled didn't work to start the service on boot, but I could fix the error when I comment out the Listen option with the IP address in the /etc/httpd/conf/httpd.conf file, then I added an new Listen with the apache port "80", like below:

#Listen 12.34.56.78:80
#Listen 127.0.0.1:80
Listen 80

Finally, when I rebooted my arch-server the apache service started without any error from boot.

Offline

#12 2017-12-11 09:36:25

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,409

Re: [SOLVED] systemd - general problem - httpd daemon wont't start at boot

It is quite unlikely that whatever issue you had was the same as the one that was solved in this thread 5 years ago.

Please don't necrobump: https://wiki.archlinux.org/index.php/Co … bumping.22

Closing.

Offline

Board footer

Powered by FluxBB