diff --git a/Spezifikation_TPSH.md b/Spezifikation_TPSH.md index 4496c5d1fe874ff84bfa40447e982cd1957d67a2..da158b1480430066622e510b89ccbd8e2ea1071c 100644 --- a/Spezifikation_TPSH.md +++ b/Spezifikation_TPSH.md @@ -156,3 +156,110 @@ Keine Angaben zu EoL and Support. Support nur durch Dritte. Es existiert schon PostGis 3.0.0 + + +## Für den Betrieb benötigte Services +Auf den Servern Master und Slave müssen die folgenden Services laufen: ++ `redis-server` für die Nutzer-Session-Verwaltung, ++ `solr` für den Suchindex, ++ `apache2` als Webserver, ++ `supervisor` für Harvester, Volltextsuche und andere Hintergrundprozesse (nur Master-Server), ++ `cron` für Harvester (nur Master-Server). + +Auf einer virtuellen Maschine des Entwicklers ergibt das Kommando `service --status-all` nach einer vollständigen Installation folgenden Output: +```shell +service --status-all + [ + ] apache-htcacheclean + [ + ] apache2 + [ + ] apparmor + [ - ] bootmisc.sh + [ - ] checkfs.sh + [ - ] checkroot-bootclean.sh + [ - ] checkroot.sh + [ + ] console-setup + [ + ] cron + [ + ] dbus + [ + ] grub-common + [ - ] hostname.sh + [ - ] hwclock.sh + [ + ] irqbalance + [ + ] keyboard-setup + [ - ] killprocs + [ + ] kmod + [ - ] mountall-bootclean.sh + [ - ] mountall.sh + [ - ] mountdevsubfs.sh + [ - ] mountkernfs.sh + [ - ] mountnfs-bootclean.sh + [ - ] mountnfs.sh + [ + ] networking + [ + ] ondemand + [ - ] plymouth + [ - ] plymouth-log + [ + ] postfix + [ + ] procps + [ + ] rc.local + [ + ] redis-server + [ + ] resolvconf + [ - ] rsync + [ + ] rsyslog + [ - ] sendsigs + [ + ] solr + [ + ] ssh + [ + ] supervisor + [ + ] udev + [ + ] ufw + [ - ] umountfs + [ - ] umountnfs.sh + [ - ] umountroot + [ + ] urandom + [ - ] uuidd + [ + ] vmware-tools + [ - ] x11-common +``` + + +## Log-Dateien +### Pfade zu den Log-Dateien +Die folgende Tabelle gibt einen Überblick über die Log-Dateien auf den Servern Master und Slave: + +| Beschreibung | Dateipfad | +|-------------------------------------------------------|-----------------------------------------------| +| Apache `CustomLog` | /data/logs/apache2/ckan_default.custom.log | +| Apache `ErrorLog` | /data/logs/apache2/ckan_default.error.log | +| Harvester (Gather Stage, läuft über Supervisor) | /data/logs/harvester/gather_consumer.log | +| Harvester (Fetch Stage, läuft über Supervisor) | /data/logs/harvester/fetch_consumer.log | +| Solr | /data/logs/solr/solr.log | +| Supervisor, ckan-bulk (Hintergrundprozesse in CKAN) | /data/logs/supervisor/bulk.log | +| Supervisor, ckan-priority (Hintergrundprozesse in CKAN)| /data/logs/supervisor/priority.log | +| Supervisor, ckan-worker (Hintergrundprozess Volltextsuche)| /data/logs/supervisor/ckan-worker.log | +| Redis | /var/log/redis/redis-server.log | + +Die Log-Dateien im Ordner `data/logs/` liegen in folgender Struktur vor: + +```shell +/data/logs$ tree +. +├── apache2 +│ ├── ckan_default.custom.log +│ ├── ckan_default.error.log +│ ├── error.log +│ └── other_vhosts_access.log +├── harvester +│ ├── fetch_consumer.log +│ └── gather_consumer.log +├── solr -> /data/solr/logs +└── supervisor + ├── bulk.log + ├── ckan-worker.log + └── priority.log + +3 directories, 10 files +``` + +### Fehleranalyse +#### Log-Dateien +Tritt ein unerwarteter interner Server-Fehler auf (HTML Status-Code 500), so ist der erste Anlaufpunkt für die Fehleranalyse das Apache `ErrorLog`. Darin findet sich meist ein zuerst der Call Stack der Python-Funktionen und daran anschließen ein Block mit der Überschrift `CGI Variables` sowie ein weiterer Block mit der Überschrift `WSGI Variables`. Der Call Stack enthält aus Sicht des Python-Entwicklers meist in der letzten Zeile die entscheidenden Hinweise auf die Ursache des Fehlers. + +#### Status der Services +Es muss sichergestellt werden, dass alles Services laufen (siehe oben).