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

[BUG] UpSnap Doesn't WOL With IP Address #583

Open
firefly2442 opened this issue May 23, 2024 · 6 comments
Open

[BUG] UpSnap Doesn't WOL With IP Address #583

firefly2442 opened this issue May 23, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@firefly2442
Copy link

The bug

I was having trouble getting UpSnap to wake a machine. I tested to make sure I could get it working outside UpSnap.

wakeonlan <macaddress>

This works. Then I tried within the container.

docker exec -it <id> sh
apk update
apk add awake
awake <macaddress>

This worked. However, when I try adding the IP address, anything I try fails.

awake -d 192.168.1.112 <macaddress>
awake -d 192.168.1.1 <macaddress>
awake -d 192.168.0.1 <macaddress>

In the UI, the IP address is marked as required. I wonder if perhaps this may not be needed and it should be optional?

The OS that UpSnap is running on

Ubuntu 22.04 (pi4)

Version of UpSnap

4.2.9

Your docker-compose.yml content

version: "3"
services:
  upsnap:
    container_name: upsnap
    image: ghcr.io/seriousm4x/upsnap:4
    network_mode: host
    restart: unless-stopped
    volumes:
      - ./data:/app/pb_data
    environment:
      - TZ=America/Chicago # Set container timezone for cron schedules
    healthcheck:
      test: curl -fs "http://localhost:8090/api/health" || exit 1
      interval: 10s

Reproduction steps

See above steps for testing using `awake`.

Additional information

Thanks

@firefly2442 firefly2442 added the bug Something isn't working label May 23, 2024
@firefly2442
Copy link
Author

I should also note, all machines are on the same subnet.

@firefly2442
Copy link
Author

See also #557

@firefly2442
Copy link
Author

As a work-around, I was able to use the custom wake command feature to enter my own command after adding a custom Dockerfile to add the awake binary. Custom command:

awake <macaddress>

@seriousm4x
Copy link
Owner

The IP is marked as a required field because of 2 things:

  • for the ping to check if the device is online or not
  • for calculating the broadcast address to which the wol packet will be send

So an awake equivalent to what upsnap does would be awake -b 192.168.1.255 -p 9 <macaddress>.
If that awake command works but upsnap doesn't, there might be an issue.

@ax42
Copy link

ax42 commented May 30, 2024

I don't need the awake checking, just the WoL. Would it be possible to make the IP field non-mandatory and then a) not do awake checking and b) assume a standard broadcast mask?

@jordancrawfordnz
Copy link

This may not be relevant - but I thought I was having this issue. I confirmed the awake -b 192.168.1.255 -p 9 <macaddress> command from @seriousm4x above worked but it still wouldn't WOL from UpSnap directly.

But then I realised that I'd incorrectly configured my netmask as 255.255.255.255 rather than 255.255.255.0
I think I had done this because 255.255.255.255 is the placeholder value so I didn't really think about it and just entered this value. After fixing this value my WOL works perfectly.

My guess is that if this is misconfigured it was picking the wrong broadcast URL to fire the UDP packet to?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants