Skip to content
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

cap_activate: eth1: No such device exists #190

Closed
AndreaMazzoletti opened this issue Feb 26, 2023 · 12 comments
Closed

cap_activate: eth1: No such device exists #190

AndreaMazzoletti opened this issue Feb 26, 2023 · 12 comments
Labels
Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress.

Comments

@AndreaMazzoletti
Copy link

Hello,

I am running Pi.Alert on docker via docker-compose with the latest tag, the compose file is the same one as the dockerhub example 1.

Pi.Alert is not reachable at all and it doens't start, looking at the container logs i see this

Scan: Nmap SUCCESS for mynetwork (1/1)
  Check if something to report
    sys.exit(main())       
  File "/home/pi/pialert/back/pialert.py", line 544, in main
    send_notifications()
  File "/home/pi/pialert/back/pialert.py", line 2018, in send_notifications
    if isNewVersion():
  File "/home/pi/pialert/back/pialert.py", line 3125, in isNewVersion
    if len(data) > 0 and "published_at" in data[0]:        
KeyError: 0
mkdir: cannot create directory '/run/php': File exists
Starting nginx: nginx.
pcap_activate: eth1: No such device exists
(SIOCGIFHWADDR: No such device)

Any tips on what to do?

Thanks in advance.

@jokob-sk
Copy link
Owner

Hi there!

Can you please follow the advice in this thread?

https://github.com/jokob-sk/Pi.Alert/issues/163

Also, make sure eth1 is the correct interface. If unsure, Run iwconfig in your container to find your interface name(s) (e.g.: eth0, eth1). Post the result of iwconfig here to help with debugging if you still have troubles.

Thanks,
J

@AndreaMazzoletti
Copy link
Author

Hello and thanks for the reply,
I followed the solution in the thread you mentioned but apparently that was not the issue, the problem unfortunately persists.
I've also taken a look to which interfaces are present in the container and eth1 is indeed not there, the container has the same interfaces as the host machine since it is running in network_mode: host.
How can I make Pi.Alert target a specific interface that is present other than eth1 and eth0? (e.g. wlan0)

Thanks

@jokob-sk
Copy link
Owner

Hi,

Please follow the instructions here : https://github.com/jokob-sk/Pi.Alert/blob/main//dockerfiles/README.md#config-pialertconf

Thanks,
J

@jokob-sk jokob-sk added the Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress. label Feb 27, 2023
@AndreaMazzoletti
Copy link
Author

Sorry, I didn't see that part of the documentation, i set that variable as follows:

SCAN_SUBNETS=['192.168.1.0/24 --interface=wlan0']

I see from the logs that nmap successfuly scan the network but another error occours and the gui is ureachable

skipping repeated notifications
[2023-02-28 00:06:31] Scan: Nmap for max 150s (2.5min) per device
        Estimated max delay: 150s (2.5min)
[2023-02-28 00:06:31] Scan: Nmap SUCCESS for 192.168.1.45 (1/1)
  Check if something to report
    sys.exit(main())       
  File "/home/pi/pialert/back/pialert.py", line 599, in main
    send_notifications()
  File "/home/pi/pialert/back/pialert.py", line 2172, in send_notifications
    if isNewVersion():
  File "/home/pi/pialert/back/pialert.py", line 3416, in isNewVersion
    if len(data) > 0 and "published_at" in data[0]:        
KeyError: 0
mkdir: cannot create directory '/run/php': File exists
Starting nginx: nginx.

This segment keeps repeating itself many times

@jokob-sk
Copy link
Owner

Hi there!

Can you please follow the advice in this thread?

https://github.com/jokob-sk/Pi.Alert/issues/163

@AndreaMazzoletti
Copy link
Author

AndreaMazzoletti commented Feb 28, 2023

I did follow the thread, I've already set

ENABLE_API=False

and the url to my http://192.168.1.58:20211 (if the field is the REPORT_DASHBOARD_URL) but now the container logs display just

Starting nginx: nginx.

I've also tried to ssh into the container and create the /home/pi/pialert/front/api folder and set ENABLE_API to true but the problem in my previous comment persists

@jokob-sk
Copy link
Owner

Thanks for the information.

Can you try to stop your container and start it after a few hours? It's possible your IP was temporarily blacklisted as it tried to retrieve the new version of the container too often from github.

@AndreaMazzoletti
Copy link
Author

No luck, sorry

@AndreaMazzoletti
Copy link
Author

I'm really sorry to have bothered you, it was a firewall issue on my end, thank you for your time anyway!

@jokob-sk
Copy link
Owner

jokob-sk commented Mar 1, 2023

Thank you for the update. Glad to hear it's working now 😉👍

@jzawacki
Copy link

jzawacki commented Apr 20, 2023

Not sure if I should add on to this issue or create a new one, but is there a reason for completely changing the pialert.conf file? The old one had SCAN_SUBNETS=["--localnet'] so that the config file didn't need to be manually configured, it just worked.

From the old config:

# arp-scan options & samples
# ----------------------
#
# Scan local network (default)
# SCAN_SUBNETS    = '--localnet'
#
# Scan two subnets
# SCAN_SUBNETS    = '192.168.11.0/24 192.168.144.0/24'
#
# Scan using interface eth0
# SCAN_SUBNETS    = '--localnet --interface=eth0'
#
# Scan multiple interfaces (eth1 and eth0):
# SCAN_SUBNETS    = [ '192.168.1.0/24 --interface=eth1', '192.168.1.0/24 --interface=eth0' ]

SCAN_SUBNETS            = '--localnet'

EDIT: Trying to fix the formatting.

@jokob-sk
Copy link
Owner

Hi!

There were cases where this didn't work and was not desired, but feel free to use --localnet yourself if t that works!

j

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress.
Projects
None yet
Development

No branches or pull requests

3 participants