> R. G. Newbury <newbury@xxxxxxxxxxxx> wrote: >> > New install of F15 on Thinkpad X61. Httpd refuses to start using: >> > systemctl enable httpd.service; systemctl start httpd.service > Hmm, this works fine on my installation of F15. 'systemctl enable' > redirects to 'chkconfig' because httpd uses systemd's SYSV > compatibility, but both commands do what you expect. > >> > >> > User:group apache:apache exists and 'owns' /var/www >> > >> > No httpd.service file was installed through yum. I created one containing: > httpd still uses a SYSV initscript. systemd is completely compatible > with them for the moment. > >> > ************************************** >> > # httpd.service for systemd >> > # installed to /lib/systemd/system > Please do not install or edit unit files in /lib/systemd. Changes in > that directory can be overriden by package updates. Instead use > /etc/systemd/system, either by creating new unit files in that > directory or copying existing ones in /lib/systemd to /etc and editing > them. Unit files in /etc/systemd always override identically named > ones in /lib/systemd. Well *that* explains why there was no httpd.service file!. But it does not quite explain why 'status' reported a 'fail'. I will rsync the desktop F14 /etc/sysconfig/httpd and /etc/rc.d/init.d/httpd files and see what happens then, when I run 'service httpd restart' >> > [Unit] >> > Description=httpd daemon >> > After=mysqld.service > You probably want "network.target" in After too. (Although presumably > mysqld has that in its After too.) If you use NetworkManager and bind > httpd to particular IP addresses also add > "NetworkManager-wait-online.service" to After as well, otherwise it > might come up before it has a socket to bind to. Since I do not need it, I'll delete this file. I'll wait for someone who *knows* what is going on the write one! >> > >> > [Service] >> > EnvironmentFile=-/etc/sysconfig/httpd >> > ExecStart=/usr/sbin/httpd $OPTIONS -k start >> > ExecReload=/usr/sbin/httpd $OPTIONS -k restart >> > PIDFile=/run/httpd.pid >> > Type=forking > This might be your problem: > >> > User=apache >> > Group=apache > httpd probably needs to be launched as root and allowed to drop > privileges on its own. (Don't quote me on this though; I don't know > much about the internal workings of httpd.) You could well be right. Httpd wants to own the files in /var/www/html etc. but since it is launched on boot, root would be the correct user to do that. > One other thing that might affect it: if you bind httpd to particular > IP addresses, it might require the network to be active > >> > [Install] >> > WantedBy=multi-user.target >> > **************************************** >> > >> > I only get 'Job failed. See system logs and 'systemctl status' for >> > details'. ?[FAILED] >> > >> > Status details are no help. I added OPTIONS=" -e 3 -E >> > /var/log/httpd/error_log -w" to /etc/sysconfig/httpd, which systemctl >> > status says it is executing, but I get NO error_log entries. >> > >> > Moreover, I get NO systems logs of any sort from systemctl/systemd. >> > >> > FIRST QUESTION: Where are the system logs? ?I do NOT have a >> > /var/log/messages file.... Do I need to set a logging option somewhere? > systemd normally logs to syslog. You really should figure out why > syslog isn't working first. SOLVED that bit. Somehow I chconfig'd OFF, the rsyslog daemon while turning off all the rpc stuff (it forwarded to systemctl)....Does sorta help! > That being said, you can force systemd to log elsewhere with the > "systemd.log_target=" kernel argument. Set it to "kmsg" to log to the > kernel message log or "console" to print errors on the console. You > can also set "systemd.log_level=debug" to get lots more output out of > systemd. More on these and a lot more at > http://fedoraproject.org/wiki/How_to_debug_Systemd_problems > >> > SECOND QUESTION: If I use '/usr/sbin/httpd -k start', it works and I get >> > httpd threads in the ps list. >> > Service httpd status, at that point, says that the start FAILED. >> > Service httpd stop does not actually stop anything, nor does systemctl >> > httpd.service stop. ?(Does not know the pid?) > Exactly. Systemd has no idea httpd was started, nor does it need to. > It really shouldn't muck about with what the user didn't intend it to > control. Well yup! But I thought that it WAS controlling....What we have here is a failure to communicate, as someone once said! - R. Geoffrey Newbury -- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines