Closed s4en closed 10 months ago
Hi there,
Can you try to remove:
hostname: PiAlert
From your docker-compose?
Is there anything else in the log file? If not it also could be permission related. Try specifying UID/GUID as per instructions:
https://github.com/jokob-sk/Pi.Alert/tree/main/dockerfiles#docker-environment-variables
J
hostname: PiAlert
Removed the above. Same Issue
I use a NFS Share for the external volume. Maybe this is a problem?
hummm, I don't use an NFS share, but I still think this is permissions related. Could you please try to map the DB and config file directly? If this works then the issue is permissions related. You can also try to start the container without mapping the the DB/config for testing purposes, if it starts up that way.
I'm also facing the same issue. I've attempted to start the container without mapping the volumes, but it doesn't create anything in the config or db directories. I am not using NFS. I'm trying to run this on x86_64.
version: "3.9"
services:
pialert:
container_name: pialert
image: "jokobsk/pi.alert:latest"
network_mode: "host"
environment:
TZ: $TZ
HOST_USER_ID: $PUID
HOST_USER_GID: $PGID
PORT: 20211
# volumes:
# - $DOCKERDIR/appdata/pialert/config:/home/pi/pialert/config
# - $DOCKERDIR/appdata/pialert/db:/home/pi/pialert/db
# # (optional) useful for debugging if you have issues setting up the container
# - $DOCKERDIR/appdata/pialert/logs:/home/pi/pialert/front/log
Hi @coltondick ,
I just deployed an instance with the simplified below config without issues:
version: "3.9"
services:
pialert_test:
container_name: pialert_test
image: "jokobsk/pi.alert:latest"
network_mode: "host"
environment:
PORT: 20213
can you provide me with the last few log lines?
@jokob-sk
I just used the simplified config as a test and the issue still persists.
Time | Action |
---|---|
02:15:53 PM | [INSTALL] Run start.sh |
02:15:53 PM | [INSTALL] Run setup scripts |
02:15:53 PM | [INSTALL] Run user-mapping.sh |
02:15:53 PM | Nothing to do here. |
02:15:53 PM | [INSTALL] Run install_dependencies.sh |
02:16:01 PM | Reading package lists... |
Building dependency tree... | |
Reading state information... | |
02:16:03 PM | Packages tini , snmp , ca-certificates , curl , |
libwww-perl , arp-scan , perl , apt-utils , cron , |
|
sudo , nginx-light , php , php-cgi , php-fpm , |
|
php-sqlite3 , php-curl , sqlite3 , dnsutils , |
|
net-tools , python3 , iproute2 , nmap , python3-pip , |
|
zip , systemctl , usbutils , traceroute are all |
|
already at the newest version. | |
02:16:03 PM | 0 upgraded, 0 newly installed, 0 to remove, and 2 not upgraded. |
02:16:04 PM | Packages nginx , nginx-core , mtr , php-fpm , |
php8.2-fpm , php-cli , php8.2 , php8.2-sqlite3 are |
|
already at the newest version. | |
02:16:04 PM | 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. |
02:16:05 PM | Package python3.11-venv is already the newest version. |
02:16:05 PM | python3.11-venv set to manually installed. |
02:16:05 PM | 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. |
02:16:25 PM | Requirements already satisfied in /myenv/lib/python3.11/site-packages : requests , paho-mqtt , scapy , cron-converter , pytz , json2table , dhcp-leases , pyunifi , speedtest-cli , chardet , charset-normalizer , idna , urllib3 , certifi , python-dateutil . |
02:16:26 PM | [INSTALL] Setup NGINX |
Disabling default NGINX site, removing sym-link in /etc/nginx/sites-enabled |
|
Setting webserver to user-supplied port (20213) | |
02:16:26 PM | [INSTALL] Run the hardware vendors update |
The file ieee-oui.txt exists. Skipping update_vendors.sh ... |
|
02:16:26 PM | [INSTALL] Fixing file permissions |
Once this build finishes (https://github.com/jokob-sk/Pi.Alert/actions/runs/7373252577), can you try to spin up the dev container?
version: "3.9"
services:
pialert_test:
container_name: pialert_test
image: "jokobsk/pi.alert_dev:latest"
network_mode: "host"
environment:
PORT: 20213
I've added a couple of logging lines to see where the script fails + re-ordered a sequence of calls that might cause the script to fail.
It must bei a permission Issue. I've change the permission of the pialert folder to everyone. After that pi.alert runs. Even on the nfs share.
@jokob-sk I've tried the latest dev container and the issue persists. However, after leaving it for an hour it does come online. I think this could be related to my environment. I've got a Truenas Scale server running docker inside of a jail, which is essentially docker within docker.
I have deployed this successfully on a Raspberry Pi 4.
@s4en - great - glad it's working :) @coltondick - ah, I haven't tested such a setup but glad to hear you found a workaround. With network scanning software, especially if you want to use NMAP or ARP-SCAN, I think you need to run it on the host network where the scans are performed.
unfortunately i seem to be running in the same issue. Please note that i a fairly new to this topic so it´s not of the table that i misconfigured something.
No need to rush, thanks for the help in advance :)
docker-compose.yml:
version: "3" services: pialert: container_name: pialert image: "jokobsk/pi.alert:latest" network_mode: "host" restart: unless-stopped volumes:
PORT=20211
Here are some logs:
Portainer Log: 2024-01-02T23:24:20.974980130Z ;pi@pialert: ~pi@pialert:~$ 2024-01-02T23:24:21.551171400Z --------------------------------------------------------- 2024-01-02T23:24:21.551244825Z [INSTALL] Run start.sh 2024-01-02T23:24:21.551263695Z --------------------------------------------------------- 2024-01-02T23:24:21.558781400Z [INSTALL] Run setup scripts 2024-01-02T23:24:21.564247473Z --------------------------------------------------------- 2024-01-02T23:24:21.564329675Z [INSTALL] Run user-mapping.sh 2024-01-02T23:24:21.564345656Z --------------------------------------------------------- 2024-01-02T23:24:21.568420253Z USER_ID : 1000 2024-01-02T23:24:21.568494345Z USER_GID : 1000 2024-01-02T23:24:21.568510085Z USER_HOME: 2024-01-02T23:24:21.568649231Z TZ : Europe/Berlin 2024-01-02T23:24:21.580386326Z chown: missing operand after '1000:1000 ' 2024-01-02T23:24:21.580647211Z Try 'chown --help' for more information.
PiAlert Log:
@raspberrypi:/docker/pialert/logs $ cat pialert.log 00:11:11 [MAIN] Setting up ... 00:11:11 [conf.tz] Setting up ... 00:11:11
00:11:11 The container restarted (started). If this is unexpected check https://bit.ly/PiAlertDebug for troubleshooting tips. 00:11:11
00:11:11 Permissions check (All should be True) 00:11:11 ------------------------------------------------ 00:11:11 /config/pialert.conf | READ | True 00:11:11 /config/pialert.conf | WRITE | True 00:11:11 /db/pialert.db | READ | True 00:11:11 /db/pialert.db | WRITE | True 00:11:11 ------------------------------------------------ 00:11:11 [Setup] Attempting to fix permissions. 00:11:11 [Setup] Attempting to fix permissions. 00:11:11 [Database] Opening DB 00:11:11 [upgradeDB] Adding dev_Network_Node_MAC_ADDR to the Devices table 00:11:11 [upgradeDB] Adding dev_Network_Node_port to the Devices table 00:11:11 [upgradeDB] Adding dev_Icon to the Devices table 00:11:11 [upgradeDB] Re-creating Settings table 00:11:11 [upgradeDB] Re-creating Pholus_Scan table 00:11:11 [upgradeDB] Re-creating Parameters table 00:11:11 [Config] reading config file 00:11:11 [Config] Plugins: Number of dynamically loaded plugins: 25 00:11:11 [Plugin utils] --------------------------------------------- 00:11:11 [Plugin utils] display_name: Internet-Check 00:11:11 [Plugin utils] description: A plugin to check your internet connectivity and IP. 00:11:11 [Plugin utils] --------------------------------------------- 00:11:11 [Plugin utils] display_name: Rogue DHCP 00:11:11 [Plugin utils] description: This plugin is to use NMAP to monitor for rogue DHCP servers. 00:11:11 [Plugin utils] --------------------------------------------- 00:11:11 [Plugin utils] display_name: NTFY publisher 00:11:11 [Plugin utils] description: A plugin to publish a notification via the NTFY gateway. 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: SNMP discovery 00:11:12 [Plugin utils] description: This plugin is used to discover devices via the arp table(s) of a RFC1213 compliant router or switch. 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: CSV backup 00:11:12 [Plugin utils] description: A plugin to auto-generate devices.csv backups. 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: DDNS update 00:11:12 [Plugin utils] description: A plugin update the DDNS record. 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: Pushsafer publisher 00:11:12 [Plugin utils] description: A plugin to publish a notification via the Pushsafer gateway. 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: New Devices 00:11:12 [Plugin utils] description: The template used for new devices. 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: MQTT publisher 00:11:12 [Plugin utils] description: A plugin to publish a notification via the Apprise gateway. 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: Email publisher (SMTP) 00:11:12 [Plugin utils] description: A plugin to publish a notification via Email (SMTP) gateway. 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: Set password 00:11:12 [Plugin utils] description: A simple plugin to set the web ui password on app start. 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: Arp-Scan (Network scan) 00:11:12 [Plugin utils] description: This plugin is to execute an arp-scan on the local network 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: Services & Ports (NMAP) 00:11:12 [Plugin utils] description: This plugin shows all services discovered by NMAP scans. 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: DHCP Leases (Device import) 00:11:12 [Plugin utils] description: This plugin is to import devices from dhcp.leases files. 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: Maintenance 00:11:12 [Plugin utils] description: A plugin for maintenance tasks. 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: Internet speedtest 00:11:12 [Plugin utils] description: A plugin to perform a scheduled internet speedtest. 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: Un-Discoverable Devices 00:11:12 [Plugin utils] description: This plugin is to import undiscoverable devices from a file. 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: Website monitor 00:11:12 [Plugin utils] description: This plugin is to monitor status changes of services or websites. 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: PiHole (Device sync) 00:11:12 [Plugin utils] description: This plugin syncs devices from the PiHole database 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: Vendor update 00:11:12 [Plugin utils] description: A plugin to schedule vendor database updates for mac based vendor resolution. 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: Pholus-Scan (Name discovery) 00:11:12 [Plugin utils] description: This plugin is to execute a Pholus-scan (name discovery) on the local network 00:11:12 [Plugin utils] --------------------------------------------- 00:11:12 [Plugin utils] display_name: Apprise publisher 00:11:12 [Plugin utils] description: A plugin to publish a notification via the Apprise gateway. 00:11:13 [Plugin utils] --------------------------------------------- 00:11:13 [Plugin utils] display_name: DB cleanup 00:11:13 [Plugin utils] description: A plugin to schedule database cleanup & upkeep tasks. 00:11:13 [Plugin utils] --------------------------------------------- 00:11:13 [Plugin utils] display_name: UniFi import 00:11:13 [Plugin utils] description: This plugin is used to import devices from an UNIFI controller. 00:11:13 [Plugin utils] --------------------------------------------- 00:11:13 [Plugin utils] display_name: Webhook publisher 00:11:13 [Plugin utils] description: A plugin to publish a notification via Webhooks. 00:11:13 [API] Updating table_settings.json file in /front/api 00:11:13 [Config] Imported new config 00:11:13 [API] Updating table_devices.json file in /front/api 00:11:13 [API] Updating table_events_pending_alert.json file in /front/api 00:11:13 [API] Updating table_plugins_events.json file in /front/api 00:11:13 [API] Updating table_plugins_history.json file in /front/api 00:11:13 [API] Updating table_plugins_objects.json file in /front/api 00:11:13 [API] Updating table_plugins_language_strings.json file in /front/api 00:11:13 [Database] - SQL ERROR: no such table: Notifications 00:11:13 [API] Updating table_notifications.json file in /front/api 00:11:13 [API] Updating table_custom_endpoint.json file in /front/api 00:11:13 [Notification] Check if something to report 00:11:13 [Notification] Open text Template 00:11:13 [Notification] Open html Template 00:11:13 [Notification] Using template/back/report_template.html 00:11:13 [Notification] included sections: ['internet', 'new_devices', 'downdevices', 'events'] 00:11:13 [Notification] New Devices sections done. 00:11:13 [Notification] Down Devices sections done. 00:11:13 [Notification] Events sections done. 00:11:13 [Notification] Udating API files 00:11:13 [Send API] Updating notification files in /home/pi/pialert/front/api/ 00:11:13 [Notification] No changes to report 00:11:13 [MAIN] Process: Wait 00:11:18 [API] Updating table_notifications.json file in /front/api 00:11:18 [MAIN] waiting to start next loop 00:11:23 [MAIN] waiting to start next loop 00:11:28 [MAIN] waiting to start next loop 00:11:34 [MAIN] waiting to start next loop 00:11:39 [MAIN] waiting to start next loop 00:11:44 [MAIN] waiting to start next loop 00:11:49 [MAIN] waiting to start next loop 00:11:54 [MAIN] waiting to start next loop 00:11:59 [MAIN] waiting to start next loop 00:12:04 [MAIN] waiting to start next loop 00:12:09 [MAIN] waiting to start next loop 00:12:14 [Notification] Check if something to report 00:12:14 [Notification] Open text Template 00:12:14 [Notification] Open html Template 00:12:14 [Notification] Using template/back/report_template.html 00:12:15 [Notification] included sections: ['internet', 'new_devices', 'downdevices', 'events'] 00:12:15 [Notification] New Devices sections done. 00:12:15 [Notification] Down Devices sections done. 00:12:15 [Notification] Events sections done. 00:12:15 [Notification] Udating API files 00:12:15 [Send API] Updating notification files in /home/pi/pialert/front/api/ 00:12:15 [Notification] No changes to report 00:12:15 [MAIN] Process: Wait 00:12:20 [MAIN] waiting to start next loop 00:12:25 [MAIN] waiting to start next loop 00:12:30 [MAIN] waiting to start next loop 00:12:35 [MAIN] waiting to start next loop 00:12:40 [MAIN] waiting to start next loop 00:12:45 [MAIN] waiting to start next loop 00:12:50 [MAIN] waiting to start next loop 00:12:55 [MAIN] waiting to start next loop 00:13:00 [MAIN] waiting to start next loop 00:13:05 [MAIN] waiting to start next loop 00:13:11 [MAIN] waiting to start next loop
Hi @lzsix ,
It seems like your issue is different so I opened a new thread. Let's continue the discussion over there: https://github.com/jokob-sk/Pi.Alert/issues/525
Thanks, j
Hi, I've tried more than one Compose File, and also new Volumes I can't install pi.alert No idea why, i use the latest image of pi.alert and external volumes
My Docker Compose:
Error: