[BUG] Apache Logverzeichnis wird gelöscht

Verbesserungsvorschläge zum Revolution Pi? Immer her damit!
Post Reply
jacob
Posts: 1
Joined: 13 Nov 2021, 23:51
Answers: 0

[BUG] Apache Logverzeichnis wird gelöscht

Post by jacob »

Hallo, habe heute zum ersten Mal den RevPi Core in Betrieb genommen und gleich einen Bug gefunden. Wenn man den Speicherort vom eMMC auf ein tmpfs in der Konfiguration verlegt startet der apache und damit das Webinterface nicht mehr, weil der Ordner /var/log/apache2/revpi/ gelöscht wird. Neuanlegen des Ordners hat es direkt behoben.
User avatar
nicolaiB
KUNBUS
Posts: 869
Joined: 21 Jun 2018, 10:33
Answers: 7
Location: Berlin
Contact:

Re: [BUG] Apache Logverzeichnis wird gelöscht

Post by nicolaiB »

Hallo Jacob,

danke für deinen Hinweis. Wir arbeiten daran diesen Fehler mit einem Update in kürze zu beheben.

Gruß Nicolai
EngelTom
Posts: 1
Joined: 13 Jan 2022, 00:17
Answers: 0

Re: [BUG] Apache Logverzeichnis wird gelöscht

Post by EngelTom »

Hallo,

ich möchte dieses Thema nochmals anschneiden, denn bei mir verschwindet das Verzeichnis nach einem Neustart ebenfalls erneut (bei aktiviertem tmpfs).
Ein Workarround von mir, folgende Zeilen in das Startscript von apache2 hinzugefügt:

/usr/sbin/apache2ctl:

Code: Select all

#
# |||||||||||||||||||| START CONFIGURATION SECTION  ||||||||||||||||||||
# --------------------                              --------------------
#
# main configuration directory
if [ ! -d /var/log/apache2/revpi ];
then
        # echo "revpi logdirectory not found...!"
        mkdir /var/log/apache2/revpi
fi
Irgend wo muss diese Structur aller Verzeichnisse hinterlegt sein, damit sie nach einem Neustart wieder existieren...?
Mein Workarround entspricht sicher nicht den Vorstellungen der Erfinder, aber es funktioniert :-)

Gibt es dafür eine elegantere Lösung (ich weiss sie arbeiten eh schon an einem Update - Danke...!)?

vielen Dank im Voraus,

mfg

EngelTom
----
RevPi Core 3, RevPi Core 3+
User avatar
nicolaiB
KUNBUS
Posts: 869
Joined: 21 Jun 2018, 10:33
Answers: 7
Location: Berlin
Contact:

Re: [BUG] Apache Logverzeichnis wird gelöscht

Post by nicolaiB »

Hallo EngelTom,

welche Image Version setzt du ein? Sind alle aktuellen Updates installiert? Das ursprüngliche Verhalten, bei dem vergessen wurde das apache Verzeichnis anzulegen ist mit den letzten Updates behoben worden. Ich habe es auf einem Testsystem noch mal ausprobiert und dort wird alles korrekt anlegt:

Code: Select all

 ✘  ~  ssh pi@revpi4233 -4
Linux RevPi4233 5.10.74-rt54-v7+ #1 SMP PREEMPT_RT Thu, 16 Dec 2021 11:50:47 +0000 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Jan 13 17:31:17 2022 from 172.30.30.133
pi@RevPi4233:~ $ mount | grep log
tmpfs on /var/log type tmpfs (rw,size=51200k)
pi@RevPi4233:~ $ ls /var/log/
apache2  apt  auth.log  btmp  daemon.log  fsck  kern.log  lastlog  lightdm  messages  ntpstats  private  samba  user.log  wtmp
pi@RevPi4233:~ $ sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-01-13 17:31:04 CET; 32s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 1144 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 1219 (apache2)
      Tasks: 6 (limit: 2059)
        CPU: 345ms
     CGroup: /system.slice/apache2.service
             ├─1219 /usr/sbin/apache2 -k start
             ├─1220 /usr/sbin/apache2 -k start
             ├─1221 /usr/sbin/apache2 -k start
             ├─1222 /usr/sbin/apache2 -k start
             ├─1223 /usr/sbin/apache2 -k start
             └─1224 /usr/sbin/apache2 -k start

Jan 13 17:31:04 RevPi4233 systemd[1]: Starting The Apache HTTP Server...
Jan 13 17:31:04 RevPi4233 apachectl[1169]: 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
Jan 13 17:31:04 RevPi4233 systemd[1]: Started The Apache HTTP Server.
pi@RevPi4233:~ $ sudo reboot
Connection to revpi4233 closed by remote host.
Connection to revpi4233 closed.
 ✘  ~  ssh pi@revpi4233 -4
Linux RevPi4233 5.10.74-rt54-v7+ #1 SMP PREEMPT_RT Thu, 16 Dec 2021 11:50:47 +0000 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
pi@RevPi4233:~ $ mount | grep log
tmpfs on /var/log type tmpfs (rw,size=51200k)
pi@RevPi4233:~ $ ls /var/log
apache2  apt  auth.log  btmp  daemon.log  fsck  kern.log  lastlog  lightdm  messages  ntpstats  private  samba  user.log  wtmp
pi@RevPi4233:~ $ sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-01-13 17:32:35 CET; 1min 19s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 1133 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 1203 (apache2)
      Tasks: 6 (limit: 2059)
        CPU: 384ms
     CGroup: /system.slice/apache2.service
             ├─1203 /usr/sbin/apache2 -k start
             ├─1220 /usr/sbin/apache2 -k start
             ├─1221 /usr/sbin/apache2 -k start
             ├─1222 /usr/sbin/apache2 -k start
             ├─1223 /usr/sbin/apache2 -k start
             └─1224 /usr/sbin/apache2 -k start

Jan 13 17:32:35 RevPi4233 systemd[1]: Starting The Apache HTTP Server...
Jan 13 17:32:35 RevPi4233 apachectl[1164]: 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
Jan 13 17:32:35 RevPi4233 systemd[1]: Started The Apache HTTP Server.
Nicolai
Post Reply