logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).

#1 19-01-2019 11:16:40

Debian Alain
Membre
Lieu : Bretagne
Distrib. : sid (unstable) / bullseye (stable)
Noyau : Linux sid 6.4.0-3-amd64
(G)UI : Gnome X.org (X11) / GDM3
Inscription : 11-03-2017
Site Web

[clos] apache2 et nginx sur rpi

ce matin , j'ai voulu installer nginx en plus d'apache 2 (que j'avais déjà avec W.P.)

jusqu'ici W.P. fonctionnait parfaitement mais , helas , j'ai planté et nginx et apache .

j'ai donc retiré nginx (apt remove) qui m' a planté apache .

comment je fais pour m'en sortir ?

voilà quelques logs :

pi@raspberrypi:/var/log/apache2 $ sudo service apache2 start
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
 



pi@raspberrypi:/var/log/apache2 $ sudo service apache2 status
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2019-01-19 10:05:06 GMT; 39s ago
  Process: 11851 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

janv. 19 10:05:06 raspberrypi apachectl[11851]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
janv. 19 10:05:06 raspberrypi apachectl[11851]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
janv. 19 10:05:06 raspberrypi apachectl[11851]: no listening sockets available, shutting down
janv. 19 10:05:06 raspberrypi apachectl[11851]: AH00015: Unable to open logs
janv. 19 10:05:06 raspberrypi apachectl[11851]: Action 'start' failed.
janv. 19 10:05:06 raspberrypi apachectl[11851]: The Apache error log may have more information.
janv. 19 10:05:06 raspberrypi systemd[1]: apache2.service: Control process exited, code=exited status=1
janv. 19 10:05:06 raspberrypi systemd[1]: Failed to start The Apache HTTP Server.
janv. 19 10:05:06 raspberrypi systemd[1]: apache2.service: Unit entered failed state.
janv. 19 10:05:06 raspberrypi systemd[1]: apache2.service: Failed with result 'exit-code'.
 



pi@raspberrypi:/var/log/apache2 $ sudo journalctl -xe
-- L'unité (unit) apache2.service a commencé à démarrer.
janv. 19 10:05:06 raspberrypi apachectl[11851]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive g
janv. 19 10:05:06 raspberrypi apachectl[11851]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
janv. 19 10:05:06 raspberrypi apachectl[11851]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
janv. 19 10:05:06 raspberrypi apachectl[11851]: no listening sockets available, shutting down
janv. 19 10:05:06 raspberrypi apachectl[11851]: AH00015: Unable to open logs
janv. 19 10:05:06 raspberrypi apachectl[11851]: Action 'start' failed.
janv. 19 10:05:06 raspberrypi apachectl[11851]: The Apache error log may have more information.
janv. 19 10:05:06 raspberrypi systemd[1]: apache2.service: Control process exited, code=exited status=1
janv. 19 10:05:06 raspberrypi systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: L'unité (unit) apache2.service a échoué
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- L'unité (unit) apache2.service a échoué, avec le résultat failed.
janv. 19 10:05:06 raspberrypi systemd[1]: apache2.service: Unit entered failed state.
janv. 19 10:05:06 raspberrypi systemd[1]: apache2.service: Failed with result 'exit-code'.
janv. 19 10:05:06 raspberrypi sudo[11819]: pam_unix(sudo:session): session closed for user root
janv. 19 10:05:46 raspberrypi sudo[12057]:       pi : TTY=pts/0 ; PWD=/var/log/apache2 ; USER=root ; COMMAND=/usr/sbin/service apache2 status
janv. 19 10:05:46 raspberrypi sudo[12057]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
janv. 19 10:05:46 raspberrypi sudo[12057]: pam_unix(sudo:session): session closed for user root
janv. 19 10:06:33 raspberrypi sudo[12304]:       pi : TTY=pts/0 ; PWD=/var/log/apache2 ; USER=root ; COMMAND=/bin/journalctl -xe
janv. 19 10:06:33 raspberrypi sudo[12304]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
 



pi@raspberrypi:/var/log/apache2 $ cat error.log
[Fri Jan 18 19:58:23.494056 2019] [mpm_event:notice] [pid 24180:tid 1996382208] AH00489: Apache/2.4.25 (Raspbian) configured -- resuming normal operations
[Fri Jan 18 19:58:23.494480 2019] [core:notice] [pid 24180:tid 1996382208] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jan 18 19:59:13.785270 2019] [mpm_event:notice] [pid 24180:tid 1996382208] AH00491: caught SIGTERM, shutting down
[Fri Jan 18 19:59:13.940894 2019] [mpm_prefork:notice] [pid 27300] AH00163: Apache/2.4.25 (Raspbian) configured -- resuming normal operations
[Fri Jan 18 19:59:13.941255 2019] [core:notice] [pid 27300] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jan 18 19:59:14.930358 2019] [mpm_prefork:notice] [pid 27300] AH00169: caught SIGTERM, shutting down
[Fri Jan 18 19:59:15.716223 2019] [mpm_prefork:notice] [pid 27360] AH00163: Apache/2.4.25 (Raspbian) configured -- resuming normal operations
[Fri Jan 18 19:59:15.716421 2019] [core:notice] [pid 27360] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jan 18 20:00:31.808270 2019] [mpm_prefork:notice] [pid 27360] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Fri Jan 18 20:00:31.974983 2019] [mpm_prefork:notice] [pid 27360] AH00163: Apache/2.4.25 (Raspbian) configured -- resuming normal operations
[Fri Jan 18 20:00:31.975056 2019] [core:notice] [pid 27360] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jan 18 20:00:32.922753 2019] [mpm_prefork:notice] [pid 27360] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Fri Jan 18 20:00:33.098243 2019] [mpm_prefork:notice] [pid 27360] AH00163: Apache/2.4.25 (Raspbian) configured -- resuming normal operations
[Fri Jan 18 20:00:33.098299 2019] [core:notice] [pid 27360] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jan 18 20:07:44.121851 2019] [mpm_prefork:notice] [pid 27360] AH00169: caught SIGTERM, shutting down
[Fri Jan 18 20:07:53.605650 2019] [mpm_prefork:notice] [pid 534] AH00163: Apache/2.4.25 (Raspbian) configured -- resuming normal operations
[Fri Jan 18 20:07:53.607655 2019] [core:notice] [pid 534] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jan 18 21:27:37.076068 2019] [:error] [pid 19909] [client 192.168.1.68:60356] Erreur de la base de donn\xc3\xa9es WordPress Unknown column 'wp_' in 'field list' pour la requ\xc3\xaate SELECT wp_, referer: http://192.168.1.85/wp-admin/setup-config.php?step=1&language=fr_FR
sh: 1: /usr/sbin/sendmail: not found
[Fri Jan 18 22:00:51.031256 2019] [mpm_prefork:notice] [pid 534] AH00169: caught SIGTERM, shutting down
[Fri Jan 18 22:01:00.718046 2019] [mpm_prefork:notice] [pid 532] AH00163: Apache/2.4.25 (Raspbian) configured -- resuming normal operations
[Fri Jan 18 22:01:00.730908 2019] [core:notice] [pid 532] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jan 18 22:29:13.558152 2019] [mpm_prefork:notice] [pid 532] AH00169: caught SIGTERM, shutting down
[Fri Jan 18 22:29:21.636379 2019] [mpm_prefork:notice] [pid 472] AH00163: Apache/2.4.25 (Raspbian) configured -- resuming normal operations
[Fri Jan 18 22:29:21.637910 2019] [core:notice] [pid 472] AH00094: Command line: '/usr/sbin/apache2'
[Sat Jan 19 09:29:43.374554 2019] [mpm_prefork:notice] [pid 472] AH00169: caught SIGTERM, shutting down
 



réinstallation de apache2 :

pi@raspberrypi:~ $ sudo apt install --reinstall php7.0 php7.0-mysql
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances      
Lecture des informations d'état... Fait
0 mis à jour, 0 nouvellement installés, 2 réinstallés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de prendre 157 ko dans les archives.
Après cette opération, 0 o d'espace disque supplémentaires seront utilisés.
Réception de:1 http://mirrors.ircam.fr/pub/raspbian/raspbian stretch/main armhf php7.0 all 7.0.33-0+deb9u1 [53,8 kB]
Réception de:2 http://mirrors.ircam.fr/pub/raspbian/raspbian stretch/main armhf php7.0-mysql armhf 7.0.33-0+deb9u1 [103 kB]
157 ko réceptionnés en 0s (296 ko/s)  
(Lecture de la base de données... 85628 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../php7.0_7.0.33-0+deb9u1_all.deb ...
Dépaquetage de php7.0 (7.0.33-0+deb9u1) sur (7.0.33-0+deb9u1) ...
Préparation du dépaquetage de .../php7.0-mysql_7.0.33-0+deb9u1_armhf.deb ...
Dépaquetage de php7.0-mysql (7.0.33-0+deb9u1) sur (7.0.33-0+deb9u1) ...
Paramétrage de php7.0-mysql (7.0.33-0+deb9u1) ...
Paramétrage de php7.0 (7.0.33-0+deb9u1) ...
Traitement des actions différées (« triggers ») pour libapache2-mod-php7.0 (7.0.33-0+deb9u1) ...
Traitement des actions différées (« triggers ») pour php7.0-fpm (7.0.33-0+deb9u1) ...
NOTICE: Not enabling PHP 7.0 FPM by default.
NOTICE: To enable PHP 7.0 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.0-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
 



pi@raspberrypi:~ $ sudo service apache2 start
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
 



pi@raspberrypi:~ $ systemctl start apache2.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentification requise pour démarrer « apache2.service ».
Multiple identities can be used for authentication:
 1.  ,,, (pi)
 2.  root
Choose identity to authenticate as (1-2): Failed to start apache2.service: Connexion terminée par expiration du délai d'attente
See system logs and 'systemctl status apache2.service' for details.



je n'ai pas su quoi mettre .

pi@raspberrypi:~ $ systemctl start apache2.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentification requise pour démarrer « apache2.service ».
Multiple identities can be used for authentication:
 1.  ,,, (pi)
 2.  root
Choose identity to authenticate as (1-2): 1
Password:
==== AUTHENTICATION COMPLETE ===
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

pi@raspberrypi:~ $ systemctl status apache2.service
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2019-01-19 10:19:02 GMT; 37s ago
  Process: 17417 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

janv. 19 10:19:02 raspberrypi apachectl[17417]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
janv. 19 10:19:02 raspberrypi apachectl[17417]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
janv. 19 10:19:02 raspberrypi apachectl[17417]: no listening sockets available, shutting down
janv. 19 10:19:02 raspberrypi apachectl[17417]: AH00015: Unable to open logs
janv. 19 10:19:02 raspberrypi apachectl[17417]: Action 'start' failed.
janv. 19 10:19:02 raspberrypi apachectl[17417]: The Apache error log may have more information.
janv. 19 10:19:02 raspberrypi systemd[1]: apache2.service: Control process exited, code=exited status=1
janv. 19 10:19:02 raspberrypi systemd[1]: Failed to start The Apache HTTP Server.
janv. 19 10:19:02 raspberrypi systemd[1]: apache2.service: Unit entered failed state.
janv. 19 10:19:02 raspberrypi systemd[1]: apache2.service: Failed with result 'exit-code'.

pi@raspberrypi:~ $ journalctl -xe
janv. 19 10:19:02 raspberrypi systemd[1]: Starting The Apache HTTP Server...
-- Subject: L'unité (unit) apache2.service a commencé à démarrer
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- L'unité (unit) apache2.service a commencé à démarrer.
janv. 19 10:19:02 raspberrypi apachectl[17417]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
janv. 19 10:19:02 raspberrypi apachectl[17417]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
janv. 19 10:19:02 raspberrypi apachectl[17417]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
janv. 19 10:19:02 raspberrypi apachectl[17417]: no listening sockets available, shutting down
janv. 19 10:19:02 raspberrypi apachectl[17417]: AH00015: Unable to open logs
janv. 19 10:19:02 raspberrypi apachectl[17417]: Action 'start' failed.
janv. 19 10:19:02 raspberrypi apachectl[17417]: The Apache error log may have more information.
janv. 19 10:19:02 raspberrypi systemd[1]: apache2.service: Control process exited, code=exited status=1
janv. 19 10:19:02 raspberrypi systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: L'unité (unit) apache2.service a échoué
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- L'unité (unit) apache2.service a échoué, avec le résultat failed.
janv. 19 10:19:02 raspberrypi systemd[1]: apache2.service: Unit entered failed state.
janv. 19 10:19:02 raspberrypi systemd[1]: apache2.service: Failed with result 'exit-code'.
janv. 19 10:19:02 raspberrypi polkitd(authority=local)[756]: Unregistered Authentication Agent for unix-process:17355:294156 (system bus name :1.34, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale fr_FR.UTF-8) (disconnected from bus)

 

Dernière modification par Debian Alain (31-01-2019 15:23:07)

Hors ligne

#2 20-01-2019 14:13:48

yole1
Membre
Distrib. : Debian9
(G)UI : Cinnamon
Inscription : 08-08-2017

Re : [clos] apache2 et nginx sur rpi

W.P c'est quoi?

Nginx et Apache écoutent tous les deux sur le port 80

systemctl stop nginx


et pour éviter le redémarrage au reboot s'il reste des fichiers de configuration

systemctl disable nginx

  et si tu as utilisé [apt remove] par contre

sudo apt purge nginx

désinstalle complètement nginx.

Revoir les VirtualHost et PHP-FPM pour qu'il écoute sur un sockets car "no listening sockets available"...
https://buzut.fr/configuration-dun-serveur-linux-php/

Dernière modification par yole1 (21-01-2019 21:56:10)

Hors ligne

#3 20-01-2019 14:19:52

Debian Alain
Membre
Lieu : Bretagne
Distrib. : sid (unstable) / bullseye (stable)
Noyau : Linux sid 6.4.0-3-amd64
(G)UI : Gnome X.org (X11) / GDM3
Inscription : 11-03-2017
Site Web

Hors ligne

Pied de page des forums