PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Apache Start problem



ldi91
31.08.06, 10:16
meine httpd.conf


Listen *:80
ServerRoot "/web"
#LoadModule access_module /usr/lib/apache2-prefork/mod_access.so
#LoadModule actions_module /usr/lib/apache2-prefork/mod_actions.so
#LoadModule alias_module /usr/lib/apache2-prefork/mod_alias.so
#LoadModule auth_module /usr/lib/apache2-prefork/mod_auth.so
#LoadModule autoindex_module /usr/lib/apache2-prefork/mod_autoindex.so
#LoadModule cgi_module /usr/lib/apache2-prefork/mod_cgi.so
#LoadModule dir_module /usr/lib/apache2-prefork/mod_dir.so
#LoadModule include_module /usr/lib/apache2-prefork/mod_include.so
#LoadModule log_config_module /usr/lib/apache2-prefork/mod_log_config.so
#LoadModule mime_module /usr/lib/apache2-prefork/mod_mime.so
#LoadModule negotiation_module /usr/lib/apache2-prefork/mod_negotiation.so
#LoadModule setenvif_module /usr/lib/apache2-prefork/mod_setenvif.so
#LoadModule status_module /usr/lib/apache2-prefork/mod_status.so
#LoadModule userdir_module /usr/lib/apache2-prefork/mod_userdir.so
#LoadModule asis_module /usr/lib/apache2-prefork/mod_asis.so
#LoadModule imap_module /usr/lib/apache2-prefork/mod_imap.so
#LoadModule php4_module /usr/lib/apache2-prefork/libphp4.so
#LoadModule perl_module /usr/lib/apache2/mod_perl.so
#LoadModule python_module /usr/lib/apache2/mod_python.so
#LoadModule ruby_module /usr/lib/apache2/mod_ruby.so




User wwwrun
Group www



Include /etc/apache2/vhosts.d/*.conf

und die bekomm ich die fehlermeldung

web05:~ # /etc/init.d/apache2 start
Starting httpd2 (prefork) (98)Address already in use: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down
Unable to open logs
startproc: exit status of parent of /usr/sbin/httpd2-prefork: 1
done
web05:~ #

hatt was mit dem listen-tag zu tun. nur was isat da falsch??

Tomek
31.08.06, 10:18
Ich glaube, du versuchst einen Apache-Server zu starten, obwohl bereits einer läuft.

ldi91
31.08.06, 10:48
glaub ich nicht :


web05:~ # /etc/init.d/apache2 stop
Shutting down httpd2 (not running) done
web05:~ # /etc/init.d/apache2 start
Starting httpd2 (prefork) (98)Address already in use: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down
Unable to open logs
startproc: exit status of parent of /usr/sbin/httpd2-prefork: 1
done
web05:~ #

marce
31.08.06, 11:02
... und was sagt ein netstat zu dem Thema, bzw. ein ps -fe?

ldi91
31.08.06, 11:10
der apche läuft ja. aber mit einer warnung. und ich hab keine ahnung was er damit meint



web05:~ # ps -fe
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 09:37 ? 00:00:01 init [3]
root 2 1 0 09:37 ? 00:00:00 [ksoftirqd/0]
root 3 1 0 09:37 ? 00:00:00 [events/0]
root 4 1 0 09:37 ? 00:00:00 [khelper]
root 5 1 0 09:37 ? 00:00:00 [kthread]
root 11 5 0 09:37 ? 00:00:00 [kacpid]
root 317 5 0 09:37 ? 00:00:00 [kblockd/0]
root 352 5 0 09:37 ? 00:00:00 [pdflush]
root 353 5 0 09:37 ? 00:00:00 [pdflush]
root 355 5 0 09:37 ? 00:00:00 [aio/0]
root 354 1 0 09:37 ? 00:00:00 [kswapd0]
root 945 5 0 09:37 ? 00:00:00 [kseriod]
root 1078 1 0 09:37 ? 00:00:00 [scsi_eh_0]
root 1142 5 0 09:37 ? 00:00:00 [reiserfs/0]
root 2044 1 0 09:37 ? 00:00:01 /sbin/udevd --daemon --stop-exec
root 2441 5 0 09:37 ? 00:00:00 [khubd]
100 2963 1 0 09:37 ? 00:00:00 /usr/bin/dbus-daemon --system
root 3309 1 0 09:37 ? 00:00:00 /sbin/resmgrd
root 4411 1 0 09:37 ? 00:00:00 /sbin/syslog-ng
root 4414 1 0 09:37 ? 00:00:00 /sbin/klogd -c 1 -x -x
nobody 4423 1 0 09:37 ? 00:00:00 /sbin/portmap
root 4466 1 0 09:37 ? 00:00:00 /usr/sbin/acpid
root 4514 1 0 09:37 ? 00:00:00 /usr/lib/postfix/master
postfix 4522 4514 0 09:37 ? 00:00:00 pickup -l -t fifo -u
postfix 4523 4514 0 09:37 ? 00:00:00 qmgr -l -t fifo -u
root 4624 1 0 09:37 ? 00:00:00 /usr/sbin/cron
root 4633 1 0 09:37 ? 00:00:00 /usr/sbin/nscd
root 4666 1 0 09:37 ? 00:00:00 /usr/sbin/hald --daemon=yes --re
root 4698 4666 0 09:37 ? 00:00:00 hald-addon-acpi
root 4771 1 0 09:37 ? 00:00:00 /usr/sbin/powersaved -d -f /var/
root 4789 4666 0 09:37 ? 00:00:00 hald-addon-storage
root 4822 1 0 09:37 ? 00:00:00 /usr/sbin/sshd -o PidFile=/var/r
root 4994 1 0 09:37 tty1 00:00:00 /sbin/mingetty --noclear tty1
root 4995 1 0 09:37 tty2 00:00:00 /sbin/mingetty tty2
root 4996 1 0 09:37 tty3 00:00:00 /sbin/mingetty tty3
root 4997 1 0 09:37 tty4 00:00:00 /sbin/mingetty tty4
root 4998 1 0 09:37 tty5 00:00:00 /sbin/mingetty tty5
root 4999 1 0 09:37 tty6 00:00:00 /sbin/mingetty tty6
root 5327 4822 0 09:38 ? 00:00:00 sshd: root@notty
root 5330 5327 0 09:38 ? 00:00:00 /usr/lib/ssh/sftp-server
root 5335 4822 0 09:38 ? 00:00:00 sshd: root@pts/0
root 5338 5335 0 09:38 pts/0 00:00:00 -bash
root 5385 4822 0 09:38 ? 00:00:00 sshd: root@notty
root 5388 5385 0 09:39 ? 00:00:00 /usr/lib/ssh/sftp-server
root 5766 1 0 09:52 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc
nobody 5767 5766 0 09:52 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc
nobody 5770 5766 0 09:52 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc
root 7885 5338 0 11:09 pts/0 00:00:00 ps -fe
web05:~ #

Tomek
31.08.06, 11:12
Stoppe mal Apache über das Initskript und prüfe, ob auf Port 80 noch etwas läuft:

lsof -i :80
Wenn nicht, solltest du schauen, ob die Listen-Anweisung mehrmals in der Apache-Konfiguration vorhanden ist.

ldi91
31.08.06, 11:17
zu meinem erstaunen läuft da was


web05:~ # lsof -i :80
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
httpd2-pr 5766 root 3u IPv6 14331 TCP *:http (LISTEN)
httpd2-pr 5767 nobody 3u IPv6 14331 TCP *:http (LISTEN)
httpd2-pr 5770 nobody 3u IPv6 14331 TCP *:http (LISTEN)
web05:~ #

hab versucht zu killen


web05:~ # killall httpd
httpd: no process killed
web05:~ #

das ging aber auch nicht

ldi91
31.08.06, 11:22
ich hab mal den server rebootet. apache startet normal

web05:~ # /etc/init.d/apache2 start
Starting httpd2 (prefork) done
web05:~ # lsof -i :80
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
httpd2-pr 6100 root 3u IPv6 14632 TCP *:http (LISTEN)
httpd2-pr 6101 wwwrun 3u IPv6 14632 TCP *:http (LISTEN)
httpd2-pr 6102 wwwrun 3u IPv6 14632 TCP *:http (LISTEN)
httpd2-pr 6103 wwwrun 3u IPv6 14632 TCP *:http (LISTEN)
httpd2-pr 6104 wwwrun 3u IPv6 14632 TCP *:http (LISTEN)
httpd2-pr 6105 wwwrun 3u IPv6 14632 TCP *:http (LISTEN)
web05:~ #

ust es normal das da 5 httpd laufen??

marce
31.08.06, 11:22
dann finde erst mal heraus, woher das kommt (2. Apache installiert? Hängende Scripte? ...)

... Ansosten kann man über apache2ctl -configtest oder wie das beim 2er heisst sich die Konfiguration erst mal testen lassen, ohne dass er sich an irgendwelchen laufenden Prozessen stört...


Das mit dem (min) 5 Prozessen ist je nach Konfiguration normal...

ldi91
31.08.06, 11:26
und jetzt hab ich die module eingebunden und der apache startet nichtsagen nicht.


Listen *:80
ServerRoot "/web"
LoadModule access_module /usr/lib/apache2-prefork/mod_access.so
LoadModule actions_module /usr/lib/apache2-prefork/mod_actions.so
LoadModule alias_module /usr/lib/apache2-prefork/mod_alias.so
LoadModule auth_module /usr/lib/apache2-prefork/mod_auth.so
LoadModule autoindex_module /usr/lib/apache2-prefork/mod_autoindex.so
LoadModule cgi_module /usr/lib/apache2-prefork/mod_cgi.so
LoadModule dir_module /usr/lib/apache2-prefork/mod_dir.so
LoadModule include_module /usr/lib/apache2-prefork/mod_include.so
LoadModule log_config_module /usr/lib/apache2-prefork/mod_log_config.so
LoadModule mime_module /usr/lib/apache2-prefork/mod_mime.so
LoadModule negotiation_module /usr/lib/apache2-prefork/mod_negotiation.so
LoadModule setenvif_module /usr/lib/apache2-prefork/mod_setenvif.so
LoadModule status_module /usr/lib/apache2-prefork/mod_status.so
LoadModule userdir_module /usr/lib/apache2-prefork/mod_userdir.so
LoadModule asis_module /usr/lib/apache2-prefork/mod_asis.so
LoadModule imap_module /usr/lib/apache2-prefork/mod_imap.so
LoadModule php4_module /usr/lib/apache2-prefork/libphp4.so
LoadModule perl_module /usr/lib/apache2/mod_perl.so
LoadModule python_module /usr/lib/apache2/mod_python.so
LoadModule ruby_module /usr/lib/apache2/mod_ruby.so

User wwwrun
Group www



Include /etc/apache2/vhosts.d/*.conf


web05:~ # /etc/init.d/apache2 start
Starting httpd2 (prefork) startproc: exit status of parent of /usr/sbin/httpd2-prefork: 1
failed
web05:~ #

marce
31.08.06, 11:28
hast Du das apachectl -configtest schon mal ausprobiert?

... ansonsten: error.log sagt auch oft was...

... und _was genau_ hast Du eingebunden?

ldi91
31.08.06, 11:50
so modul problem gelöst

marce
31.08.06, 12:06
danke für die äußerst informative Lösungsdarstellung.

ldi91
31.08.06, 12:16
so:
alse es lag an mod_mime der die mimie-typ datei nicht gefunden hatt. ich hab einfach ein link auf die mime.types in /etc gesetzt und schon ging der apache