-
-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stuck on AVAHISCAN after Docker install #921
Comments
Hi,
It could be a permission issue.
If you have the /app/log folder mapped, try to remove it to test if that
works.
Try checking these docs as well
https://github.com/jokob-sk/NetAlertX/blob/main/docs/FILE_PERMISSIONS.md
Hope this helps,
J
…On Fri, 27 Dec 2024, 22:36 netExtra, ***@***.***> wrote:
Is there an existing issue for this?
- I have searched the existing open and closed issues and I checked
the docs https://github.com/jokob-sk/NetAlertX/tree/main/docs
The issue occurs in the following browsers. Select at least 2.
- Firefox
- Chrome
- Edge
- Safari (unsupported) - PRs welcome
- N/A - This is an issue with the backend
Current Behavior
I'm using Opera and Safari, both of which have been working with NetalertX
for weeks. Today I tried a new install and it's just stuck on avahiscan
with applog error messages;
Expected Behavior
It works.
Steps To Reproduce
docker compose up
app.conf
No changes to default
docker-compose.yml
No changes to default
What branch are you running?
Production
app.log
11:23:15 [Plugin utils] display_name: AVAHISCAN (Name discovery)
11:23:15 [Plugins] Executing: python3
/app/front/plugins/avahi_scan/avahi_scan.py
11:23:18 [plugin_helper] reading config file
11:23:18 [AVAHISCAN] In script
11:23:18 [Database] Opening DB
11:23:18 [AVAHISCAN] Unknown devices count: 0
Traceback (most recent call last):
File "/app/front/plugins/avahi_scan/avahi_scan.py", line 212, in
main()
File "/app/front/plugins/avahi_scan/avahi_scan.py", line 91, in main
plugin_objects.write_result_file()
File "/app/front/plugins/plugin_helper.py", line 240, in write_result_file
with open(self.result_file, mode="w") as fp:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory:
'/app/log/plugins/last_result.AVAHISCAN.log'
11:23:18 [Plugins] ⚠ ERROR - enable LOG_LEVEL=debug and check logs
Debug enabled
- I have read and followed the steps in the wiki link above and
provided the required debug logs and the log section covers the time when
the issue occurs.
—
Reply to this email directly, view it on GitHub
<#921>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AW5URDH2RIQL2S36FU26ZIT2HU3STAVCNFSM6AAAAABUIQHTD6VHI2DSMVQWIX3LMV43ASLTON2WKOZSG43DANZXGQZTKMI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
It works without volumes so it is a permissions issue but I'm not sure why. I've installed this on my Pi micro SD card many times and it works. Now I'm installing it on a freshly formatted external SSD card and it doesn't. sudo groupadd -g 82 www-data |
Hi @netExtra , Glad to hear it is working without mapping the I'm not a permissions wizard so I'd try to grant everyone You can also try to SSH into the container and inspect permissions in there, they might not be mapped as expected. Please report back and I can update the guide with more details. Hope this helps, |
I'm encountering the same issue for some reason. When I run it directly through Docker, it works, but it doesn’t function with Docker Compose even if I remove all the volumes. container_name: netalertx
# use the below line if you want to test the latest dev image
# image: "jokobsk/netalertx-dev:latest"
image: "jokobsk/netalertx:latest"
network_mode: "host"
restart: unless-stopped
environment:
- TZ=Europe/Berlin
- PORT=20211 |
Hi @syerad , I just tried spinning up a fresh container with this compose file and it seems to come up without issues: services:
netalertx_prod:
container_name: netalertx_prod
image: "jokobsk/netalertx:latest"
network_mode: "host"
# volumes:
# - ${APP_DATA_LOCATION}/netalertx_prod/config:/app/config
# - ${APP_DATA_LOCATION}/netalertx_prod/db:/app/db
environment:
- TZ=Europe/Berlin
- PORT=22224
- APP_CONF_OVERRIDE={"SCAN_SUBNETS":"['192.168.1.0/24 --interface=eth1']","GRAPHQL_PORT":"20225"}
Thanks, |
Same problem here. Fresh Debian 12 VM, Deployed using docker compose with portainer. Stack:
Env:
|
Thanks @jokob-sk ! I tried the same and it seems to work now. I guess the volumes were acting up. In the next step I'll try re-attach the volumes one by one. Pretty sure it's a permission issue but not yet sure how to resolve it. Thanks again for your support! |
@syerad - thanks for the info! @akorb90 , can you try the following:
|
The issue is here: Looks like the container is not creating the /app/log/plugins folder.
|
Hi @ingoratsdorf , I just checked a fresh installation and the folders seem to be created fine: Here's my compose: version: "3"
services:
netalertx_fresh:
container_name: netalertx_fresh
image: "jokobsk/netalertx-dev"
network_mode: "host"
volumes:
- ${APP_DATA_LOCATION}/netalertx_fresh/config:/app/config
- ${APP_DATA_LOCATION}/netalertx_fresh/db:/app/db
environment:
- TZ=Australia/Sydney
- HOST_USER_ID=1036
- HOST_USER_GID=1000
- PORT=22222
- ALWAYS_FRESH_INSTALL=true
- APP_CONF_OVERRIDE={"SCAN_SUBNETS":"['192.168.1.0/24 --interface=eth1']","GRAPHQL_PORT":"20223","UI_theme":"Light"} |
Maybe so. But @ingoratsdorf has the exact same error message I was receiving so I will try his solution. I'm sure it is a file permissions issue that is happening because I am using an external SSD and not the main internal SSD card in my Rasberry Pi. I just don't understand why this app has this permissions problem. |
Is there an existing issue for this?
The issue occurs in the following browsers. Select at least 2.
Current Behavior
I'm using Opera and Safari, both of which have been working with NetalertX for weeks. Today I tried a new install and it's just stuck on avahiscan with applog error messages;
Expected Behavior
It works.
Steps To Reproduce
docker compose up
app.conf
docker-compose.yml
What branch are you running?
Production
app.log
11:23:15 [Plugin utils] display_name: AVAHISCAN (Name discovery)
11:23:15 [Plugins] Executing: python3 /app/front/plugins/avahi_scan/avahi_scan.py
11:23:18 [plugin_helper] reading config file
11:23:18 [AVAHISCAN] In script
11:23:18 [Database] Opening DB
11:23:18 [AVAHISCAN] Unknown devices count: 0
Traceback (most recent call last):
File "/app/front/plugins/avahi_scan/avahi_scan.py", line 212, in
main()
File "/app/front/plugins/avahi_scan/avahi_scan.py", line 91, in main
plugin_objects.write_result_file()
File "/app/front/plugins/plugin_helper.py", line 240, in write_result_file
with open(self.result_file, mode="w") as fp:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/app/log/plugins/last_result.AVAHISCAN.log'
11:23:18 [Plugins] ⚠ ERROR - enable LOG_LEVEL=debug and check logs
Debug enabled
The text was updated successfully, but these errors were encountered: