[Risolto] Apache non starta ....

Salve a tutti.

Fedora 17. Apache installato ed aggiornato.

Cerco di laniciarlo:

systemctl start http.service Failed to issue method call: Unit http.service failde to load: No such file or directory

Ho controllato con il comando status

systemctl status http.service loaded: error (Reason: Non such file or directory) Active: inactive (dead)

Suggerimenti ?

Grazie
enrico

manca una “d”

systemctl start httpd.service

[quote=halloween]manca una “d”

systemctl start httpd.service

Si effettivamente, la fretta.
Adesso il risultato:

root@localhost admin]# systemctl start httpd.service Job failed. See system journal and 'systemctl status' for details.
E quuindi ho lanciato lo status

[root@localhost admin]# systemctl status httpd.service
httpd.service - The Apache HTTP Server (prefork MPM)
	  Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
	  Active: failed (Result: exit-code) since Mon, 03 Dec 2012 10:34:50 +0100; 5s ago
	 Process: 1923 ExecStart=/usr/sbin/httpd $OPTIONS -k start (code=exited, status=1/FAILURE)
	  CGroup: name=systemd:/system/httpd.service

Dec 03 10:34:50 localhost.localdomain httpd[1923]: (98)Address already in use...
Dec 03 10:34:50 localhost.localdomain httpd[1923]: no listening sockets avail...
Dec 03 10:34:50 localhost.localdomain httpd[1923]: Unable to open logs

Era già avviato? Hai un altro server web in uso?

Direi di no, o almeno su questa macchina no, l’ho installata ieri !!!
Altri server sulla rete si ovviamente:

[root@localhost ~]# ps -x
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:01 /usr/lib/systemd/systemd
    2 ?        S      0:00 [kthreadd]
    3 ?        S      0:00 [ksoftirqd/0]
    5 ?        S<     0:00 [kworker/0:0H]
    7 ?        S<     0:00 [kworker/u:0H]
    8 ?        S      0:00 [migration/0]
    9 ?        S      0:00 [watchdog/0]
   10 ?        S      0:00 [migration/1]
   12 ?        S<     0:00 [kworker/1:0H]
   13 ?        S      0:00 [ksoftirqd/1]
   14 ?        S      0:00 [watchdog/1]
   15 ?        S<     0:00 [cpuset]
   16 ?        S<     0:00 [khelper]
   17 ?        S      0:00 [kdevtmpfs]
   18 ?        S<     0:00 [netns]
   19 ?        S      0:00 [bdi-default]
   20 ?        S<     0:00 [kintegrityd]
   21 ?        S<     0:00 [kblockd]
   22 ?        S<     0:00 [ata_sff]
   23 ?        S      0:00 [khubd]
   24 ?        S<     0:00 [md]
   28 ?        S      0:00 [kswapd0]
   29 ?        SN     0:00 [ksmd]
   30 ?        SN     0:00 [khugepaged]
   31 ?        S      0:00 [fsnotify_mark]
   32 ?        S<     0:00 [crypto]
   40 ?        S<     0:00 [kthrotld]
   43 ?        S      0:00 [scsi_eh_0]
   44 ?        S      0:00 [scsi_eh_1]
   46 ?        S      0:00 [scsi_eh_2]
   47 ?        S      0:00 [scsi_eh_3]
   48 ?        S      0:00 [kworker/u:3]
   50 ?        S<     0:00 [kpsmoused]
   51 ?        S<     0:00 [deferwq]
   52 ?        S      0:00 [kworker/u:5]
   56 ?        S<     0:00 [kworker/1:1H]
  274 ?        S      0:00 [scsi_eh_4]
  275 ?        S      0:00 [scsi_eh_5]
  284 ?        S<     0:00 [kworker/0:1H]
  319 ?        S<     0:00 [kdmflush]
  321 ?        S<     0:00 [kdmflush]
  367 ?        S      0:00 [jbd2/dm-1-8]
  368 ?        S<     0:00 [ext4-dio-unwrit]
  400 ?        Ss     0:00 /usr/lib/systemd/systemd-journald
  401 ?        S      0:00 [kauditd]
  402 ?        Ss     0:00 /usr/lib/udev/udevd
  510 ?        S      0:00 /usr/lib/udev/udevd
  511 ?        S      0:00 /usr/lib/udev/udevd
  520 ?        S<     0:00 [hd-audio0]
  535 ?        S<     0:00 [kvm-irqfd-clean]
  537 ?        S      0:00 [irq/47-mei]
  570 ?        S      0:00 [jbd2/sda1-8]
  571 ?        S<     0:00 [ext4-dio-unwrit]
  573 ?        S<     0:00 [kdmflush]
  594 ?        S      0:00 [jbd2/dm-2-8]
  595 ?        S<     0:00 [ext4-dio-unwrit]
  612 ?        S<sl   0:00 /sbin/auditd -n
  615 ?        Ssl    0:00 /usr/sbin/NetworkManager --no-daemon
  618 ?        Ss     0:00 /usr/sbin/abrtd -d -s
  619 ?        Ss     0:00 /usr/bin/abrt-watch-log -F BUG corruption stack overf
  621 ?        S<sl   0:00 /sbin/audispd
  622 ?        S<     0:00 /usr/sbin/sedispatch
  639 ?        Ss     0:00 /usr/sbin/smartd -n -q never
  640 ?        Ss     0:00 /usr/bin/abrt-watch-log -F Backtrace /var/log/Xorg.0.
  643 ?        Ss     0:00 /usr/lib/systemd/systemd-logind
  646 ?        Ss     0:00 /usr/bin/system-setup-keyboard
  649 ?        Ssl    0:00 /sbin/rsyslogd -n -c 5
  653 ?        Ss     0:00 /usr/sbin/acpid
  659 ?        Ss     0:00 /usr/sbin/mcelog --ignorenodev --daemon --foreground
  660 ?        Ss     0:00 /usr/sbin/crond -n
  661 ?        Ss     0:00 /usr/sbin/atd -f
  663 ?        Ssl    0:00 /usr/sbin/gdm-binary -nodaemon
  721 ?        Sl     0:00 /usr/libexec/gdm-simple-slave --display-id /org/gnome
  728 ?        Sl     0:00 /usr/libexec/polkit-1/polkitd --no-debug
  732 ?        S      0:00 /usr/sbin/modem-manager
  733 ?        Ss     0:00 /usr/sbin/bluetoothd -n
  743 ?        Ss     0:00 /usr/sbin/sshd -D
  753 ?        S<     0:00 [rpciod]
  763 tty1     Ss+    0:53 /usr/bin/Xorg :0 -background none -logverbose 7 -auth
  805 ?        Ssl    0:00 /usr/libexec/accounts-daemon
  824 ?        Ssl    0:00 /usr/libexec/upowerd
  890 ?        Sl     0:00 gdm-session-worker [pam/gdm-password]
  901 ?        S      0:01 [kworker/0:0]
  921 ?        S      0:01 [kworker/1:0]
 1131 ?        Ssl    0:01 /usr/lib/udisks2/udisksd --no-debug
 1434 ?        Ss     0:00 sendmail: accepting connections
 1611 ?        S      0:00 [kworker/0:2]
 1676 ?        Sl     0:01 /usr/bin/python -Es /usr/sbin/setroubleshootd -f 
 1688 pts/0    S      0:00 su
 1696 pts/0    S+     0:00 bash
 1747 ?        S      0:00 [kworker/0:1]
 1831 ?        S      0:00 [kworker/1:1]
 1889 ?        S      0:00 [flush-253:1]
 1916 ?        S      0:00 dbus-launch --autolaunch ec9582d1728110aa714ae1530000
 1917 ?        Ssl    0:00 /bin/dbus-daemon --fork --print-pid 5 --print-address
 1920 ?        S      0:00 /usr/libexec/gconfd-2
 1981 ?        Ss     0:00 sshd: root@pts/1    
 1985 pts/1    Ss     0:00 -bash
 2039 pts/1    R+     0:00 ps -x

hai editato il file di configurazione per cambiare porta di ascolto ?

# netstat -anp | grep tcp | grep LISTEN

che dice ?

[quote=halloween]hai editato il file di configurazione per cambiare porta di ascolto ?

# netstat -anp | grep tcp | grep LISTEN

che dice ?[/quote]

Ecco cosa dice:

tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      740/rpcbind         
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      743/sshd            
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1434/sendmail: acce 
tcp        0      0 0.0.0.0:38972           0.0.0.0:*               LISTEN      759/rpc.statd       
tcp6       0      0 :::55943                :::*                    LISTEN      759/rpc.statd       
tcp6       0      0 :::111                  :::*                    LISTEN      740/rpcbind         
tcp6       0      0 :::22                   :::*                    LISTEN      743/sshd            

Ad occhio direi che di http server non parla.

# grep Listen /etc/httpd/conf/httpd.conf

Hai fatto delle modifiche al tuo http.conf?

[code]# apachectl configtest

sestatus[/code]

[code]# Listen: Allows you to bind Apache to specific IP addresses and/or

Change this to Listen on specific IP addresses as shown below to

#Listen 12.34.56.78:80
Listen 80
[/code]

Ecco qua.

esegui i comandi suggeriti da robyduck ed aggiungi

# lsof -i :80

[quote=robyduck]Hai fatto delle modifiche al tuo http.conf?

[code]# apachectl configtest

sestatus[/code][/quote]

No. Ecco le risposte ai comandi che mi hai suggerito:

[root@localhost ~]# apachectl configtest
Syntax OK

[root@localhost ~]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux/
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28

Il comando suggerito da Halloween

lsof -i :80

Non da errore ma non restituisce nulla.

ma continua a dare sempre lo stesso problema ?

Non parte il servizio apache. Non mi collego col browser ne da fuori e neanche dal server stesso.

Ovviamente la rete funziona sia pingando da fuori che navigando dal server su siti esterni.

enrico

Ok, possiamo usare l’ascia?

[code]# yum remove httpd-tools apr-util-ldap httpd

rm -rf /etc/httpd ; rm -rf /var/log/httpd

yum install httpd

systemctl enable httpd.service ; systemctl start httpd.service

[/code]
Riavvia e controlla se al boot lo carica. Riporta eventuali errori.

[quote=robyduck]Ok, possiamo usare l’ascia?

[code]# yum remove httpd-tools apr-util-ldap httpd

rm -rf /etc/httpd ; rm -rf /var/log/httpd

yum install httpd

systemctl enable httpd.service ; systemctl start httpd.service

[/code]
Riavvia e controlla se al boot lo carica. Riporta eventuali errori.[/quote]

Usata l’ascia.
Disinstallazione e Re-installazione andata a buon fine.
Il browser di una macchina esterna vedeva la pagina classica apache (blu con penne per intenderci).

La macchina è poi ripartita e continua a connettersi.

Quindi direi risolto. Mi sa che con mysql e php rifaccio la stessa “cura dell’ascia”.

Curiosità: perché non mi abilita la rete alla ripartenza ? Devo andare sull’icona in alto e premere ON altrimenti rimane giù.

enrico

Perchè hai problemi anche su Mysql e Php?? Non sempre questo metodo funziona, ma secondo me c’era qualche impostazione sbagliata alla quale non saremmo mai arrivati.
Direi di chiudere qui la discussione come risolta, per gli altri problemi, soprattutto quello della rete, apri un nuovo topic.
Ciao