🔧 Aktualisiert: setup.sh zur Verbesserung der Fehlerbehandlung und zur Optimierung der Ausgabe von Modus-Erkennungsinformationen, um die Funktionalität vor der Initialisierung der Logging-Funktionen zu gewährleisten. 🚀
This commit is contained in:
@@ -491,4 +491,92 @@ echo "0 2 * * * find /opt/myp/logs -name '*.log' -size +100M -exec truncate -s 5
|
||||
sudo tar -czf /tmp/myp_backup_$(date +%Y%m%d_%H%M%S).tar.gz /opt/myp/
|
||||
```
|
||||
|
||||
### Connection Refused (Kiosk-Modus)
|
||||
|
||||
**Problem:**
|
||||
```
|
||||
Connection refused
|
||||
ERR_CONNECTION_REFUSED
|
||||
Kiosk startet aber kann sich nicht mit MYP-Server verbinden
|
||||
```
|
||||
|
||||
**Ursachen:**
|
||||
- MYP-Server läuft nicht (myp-https/myp-app Service)
|
||||
- Ports 443/5000 sind blockiert oder nicht belegt
|
||||
- SSL-Zertifikate fehlen oder sind ungültig
|
||||
- Python-Module fehlen oder sind defekt
|
||||
- Firewall blockiert Verbindungen
|
||||
|
||||
**🚀 Schnelle Lösung:**
|
||||
```bash
|
||||
# Quick Fix ausführen
|
||||
cd /opt/myp
|
||||
sudo chmod +x quick_fix_connection.sh
|
||||
sudo ./quick_fix_connection.sh
|
||||
|
||||
# Services manuell neu starten
|
||||
sudo systemctl restart myp-https
|
||||
sudo systemctl restart myp-app
|
||||
sudo systemctl status myp-https
|
||||
```
|
||||
|
||||
**🔍 Detaillierte Diagnose:**
|
||||
```bash
|
||||
# Vollständige Diagnose ausführen
|
||||
cd /opt/myp
|
||||
sudo chmod +x debug_connection_refused.sh
|
||||
sudo ./debug_connection_refused.sh
|
||||
|
||||
# Service-Logs prüfen
|
||||
journalctl -u myp-https -f
|
||||
journalctl -u myp-app -f
|
||||
|
||||
# Port-Status prüfen
|
||||
netstat -tulpn | grep -E ':(443|5000|80)'
|
||||
```
|
||||
|
||||
**🔧 Manuelle Reparatur:**
|
||||
```bash
|
||||
# 1. Services stoppen und neu starten
|
||||
sudo systemctl stop myp-kiosk myp-https myp-app
|
||||
sudo systemctl start myp-app myp-https myp-kiosk
|
||||
|
||||
# 2. Firewall-Ports öffnen
|
||||
sudo ufw allow 443
|
||||
sudo ufw allow 5000
|
||||
sudo ufw allow 80
|
||||
|
||||
# 3. SSL-Zertifikate regenerieren
|
||||
cd /opt/myp
|
||||
sudo ./fix_ssl_raspberry.sh
|
||||
|
||||
# 4. Python-Module neu installieren
|
||||
cd /opt/myp
|
||||
sudo python3 -m pip install -r requirements.txt --break-system-packages --force-reinstall
|
||||
|
||||
# 5. App manuell testen
|
||||
cd /opt/myp
|
||||
python3 app.py
|
||||
```
|
||||
|
||||
**🎯 Verbindungstest:**
|
||||
```bash
|
||||
# Teste lokale Verbindungen
|
||||
curl -k https://localhost:443
|
||||
curl http://localhost:5000
|
||||
curl -k https://m040tbaraspi001.de040.corpintra.net
|
||||
|
||||
# Teste von anderem System
|
||||
curl -k https://192.168.1.XXX:443
|
||||
```
|
||||
|
||||
**📋 Häufige Lösungen:**
|
||||
- **Service läuft nicht**: `sudo systemctl enable --now myp-https`
|
||||
- **Port blockiert**: `sudo ufw allow 443 && sudo ufw allow 5000`
|
||||
- **SSL-Fehler**: `sudo ./fix_ssl_raspberry.sh`
|
||||
- **Python-Fehler**: `sudo python3 -m pip install flask --break-system-packages`
|
||||
- **Kiosk-URL falsch**: Prüfe `/etc/systemd/system/myp-kiosk.service`
|
||||
|
||||
---
|
||||
|
||||
**📞 Support:** Bei ungelösten Problemen alle relevanten Logs und die Ausgabe der Debugging-Tools sammeln.
|
||||
Reference in New Issue
Block a user