BlogBlog ÜbersichtjailscriptportsoptFreeBSDLinksThermoskanne

Herausfinden wieso ein Programm mit rc.d Skript nicht startet

Möchte man unter FreeBSD ein Programm mit dem rc.d Skript starten, dies schlägt aber fehl, so kann man in der /etc/rc.conf mit folgendem Eintrag zusätzliche Ausgaben aktivieren:

rc_debug="YES"

Im folgenden Beispiel ist die rc_debug Variable nicht gesetzt und der Apache wird auch nicht gestartet:

# /usr/local/etc/rc.d/apache2 start
#

Setzt man nun die rc_debug Variable, werden zusätzliche Informationen angezeigt:

# echo 'rc_debug="YES"' >> /etc/rc.conf
# /usr/local/etc/rc.d/apache2 start
/usr/local/etc/rc.d/apache2: DEBUG: checkyesno: apache2ssl_enable is set to NO.
/usr/local/etc/rc.d/apache2: DEBUG: checkyesno: apache2_enable is set to NO.

Gemäss der Ausgabe ist die enable Variable nicht gesetzt. Überprüft man das nun, sieht man, dass sich ein Schreibfehler eingeschlichen hat:

# grep apache /etc/rc.conf
apache_enable="YES"

Ist der Fehler korrigiert, startet nun auch der Apache wie gewünscht:

# /usr/local/etc/rc.d/apache2 start
/usr/local/etc/rc.d/apache2: DEBUG: checkyesno: apache2ssl_enable is set to NO.
/usr/local/etc/rc.d/apache2: DEBUG: checkyesno: apache2_enable is set to YES.
/usr/local/etc/rc.d/apache2: DEBUG: pid file (/var/run/httpd.pid): not readable.
/usr/local/etc/rc.d/apache2: DEBUG: run_rc_command: evaluating apache2_precmd().
Performing sanity check on apache2 configuration:
Syntax OK
/usr/local/etc/rc.d/apache2: DEBUG: checkyesno: apache2limits_enable is set to NO.
Starting apache2.
/usr/local/etc/rc.d/apache2: DEBUG: run_rc_command: _doit: /usr/local/sbin/httpd
Mehr Informationen zu den rc.conf Variablen findet man in der Manpage rc.conf(5).
 Permalink

Comments

No new comments allowed (anymore) on this post.