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

Failed to restrict 1 peer(s) #581

Closed
samvel2406 opened this issue Jan 18, 2025 · 19 comments · Fixed by #584
Closed

Failed to restrict 1 peer(s) #581

samvel2406 opened this issue Jan 18, 2025 · 19 comments · Fixed by #584

Comments

@samvel2406
Copy link

samvel2406 commented Jan 18, 2025

Hi! Thanks for the convenient and functional dashboard. But I have a problem:

When I try to restrict peer, it gives an error. WGDashboard 4.1.3.
Image

I started the dashboard in debugging mode and got this error right after launch:

Exception in thread Thread-2 (peerJobScheduleBackgroundThread):
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/root/WGDashboard/src/dashboard.py", line 2591, in peerJobScheduleBackgroundThread
    AllPeerJobs.runJob()
  File "/root/WGDashboard/src/dashboard.py", line 354, in runJob
    JobLogger.log(job.JobID, s["status"],
UnboundLocalError: local variable 's' referenced before assignment
@donaldzou donaldzou linked a pull request Jan 18, 2025 that will close this issue
@samvel2406
Copy link
Author

samvel2406 commented Jan 18, 2025

Now I understand that peer is restricted, but i can't unrestrict him.
I can unrestrict it after I delete it and create the same peer with the same private key.

@donaldzou
Copy link
Owner

We are fixing this issue :)

@samvel2406
Copy link
Author

@donaldzou The linked pull request does not fix the problem. When clicking on the "restrict access" button, an error appears on the dashboard "Restricted 0 peer(s) successfully...", but now the file ./log/error_2025_01_19_12_41_36.log is empty

@donaldzou
Copy link
Owner

Hi, did you stop WGDashboard before pulling the PR?

@samvel2406
Copy link
Author

I manually edited the file dashboard.py. And yes, I restarted wgd.sh after making the changes

@samvel2406
Copy link
Author

In fact, access is restricted, but it is no longer possible to remove the restriction, because dashboard thinks that access is still open.

@donaldzou
Copy link
Owner

That's weird.. do you see the peer under the configuration if you run wg?

@samvel2406
Copy link
Author

If I have restricted his access, no

@donaldzou
Copy link
Owner

And when you unrestrict it, you still see the error? by unrestrict i mean by clicking the 3 "dots" on the peer and click "Allow Access"

@samvel2406
Copy link
Author

I don't have an "Allow Access" button.

@donaldzou
Copy link
Owner

you mind posting a screenshot?

@donaldzou
Copy link
Owner

Image

should looks like this

@samvel2406
Copy link
Author

Image

@samvel2406
Copy link
Author

If I click "Restrict access" nothing changes and the error appears on a red background "Restricted 0 peer(s) successfully...".
And the peer disappears inside the wg.

@samvel2406
Copy link
Author

After execute job to restrict:
Image

And job not removed automatically

@donaldzou
Copy link
Owner

Do you have any IM or if you're in our Discord channel? If you'd like we can debug this together. I suspect it might due to some edge case...

@samvel2406
Copy link
Author

I checked the database wg dashboard.db -> wg-internal_restrict_access, the table is empty after pressing restrict peer

@samvel2406
Copy link
Author

Yes, I can connect to discord, give me link please, but I won't be able to use voice communication because I don't know English well.

@donaldzou
Copy link
Owner

No problem, here: https://discord.gg/72TwzjeuWm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants