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

Adding peer by bulk do crash dashboard #160

Closed
zverstal opened this issue Mar 20, 2022 · 36 comments
Closed

Adding peer by bulk do crash dashboard #160

zverstal opened this issue Mar 20, 2022 · 36 comments
Labels
bug Something isn't working

Comments

@zverstal
Copy link

Hello WGDashboard contributors,

When I try to add peer (even 1) by bulk everything is crash and wg-dashboard.service is go down.

image
Снимок экрана 2022-03-20 142648

OS Information:

  • OS: Ubuntu 20.04.4
  • Python Version: 3.8.10
@zverstal zverstal added the bug Something isn't working label Mar 20, 2022
@zverstal zverstal changed the title Adding peer by bulk crash dashboard Adding peer by bulk crashing dashboard Mar 20, 2022
@zverstal zverstal changed the title Adding peer by bulk crashing dashboard Adding peer by bulk do crash dashboard Mar 20, 2022
@donaldzou
Copy link
Owner

Hi, do you mind running the dashboard with ./wgd.sh debug and try to add peers by bulk, to see that the error message is?

@zverstal
Copy link
Author

Снимок экрана 2022-03-20 231508

Снимок экрана 2022-03-20 231737

Debug mod

@zverstal
Copy link
Author

zverstal commented Mar 20, 2022

Also if I try to add another DNS to peer sometimes it's crash with EMPTY RESPONSE ERROR too.

@donaldzou
Copy link
Owner

Hmm, could you please post the terminal output when you're adding DNS and add bulk peers?

@zverstal
Copy link
Author

Hello,

I'm back with logs.

So, i have 2 situations:

  1. I get unlogin when try to add peers by bulk:

Снимок экрана 2022-03-23 171924

  1. If I login again and try to add peers:
    I have this. Just stopping of ./wgd.sh
    image

@donaldzou
Copy link
Owner

Hmmmmm this is interesting, I will look into it. Could you tell me if you're running the dashboard behind any network settings, such as proxy?

@donaldzou
Copy link
Owner

Also I'm thinking, did you block your browser to set cookies? Because that's how the user info store.

@zverstal
Copy link
Author

No proxy setting in my dashboard. I'm running it by default way (on my server external IP).

And i don't block any cookies. Just tried to add peers on Edge with default settings - result the same, dashboard is go down(

@donaldzou
Copy link
Owner

This is super weird... seems like your browser did not send the username and password successfully. Maybe did you have javascript disabled? or maybe your system is blocking it to fetch 3rd party libraries. This issue is kind of related to your issue: #137 (comment)

@zverstal
Copy link
Author

I haven't disabled Javascript, checked it in browser setting (i haven't changed any default settings in Chrome|Edge btw). I turned off any extensions and it's not help me either :(
And I don't have any blocklist on my Ubuntu... Even don't know how to set up it :)

@zverstal
Copy link
Author

zverstal commented Mar 25, 2022

ipconfig /release.
ipconfig /flushdns.
ipconfig /renew.
netsh winsock reset.

Delete browser history, cookies etc done too, not helping :(

@donaldzou
Copy link
Owner

This is weird... could you take a screen shot of your browser console output when you visit your dashboard?

@zverstal
Copy link
Author

  1. Log in, no errors, 200 status of JS components

1

2. Trying to add peers

2

3. Errors in JS

3

@donaldzou
Copy link
Owner

This tells me that net::ERR_EMPTY_RESPONSE usually occur on the browser side... Do you mind try another browser, like Edge or Opera?

@zverstal
Copy link
Author

Same situation in Edge and Opera (this one installed right now without any imports, just clean installation)

@zverstal
Copy link
Author

zverstal commented Mar 26, 2022

I think there's something in searching available IPs in database maybe?

@donaldzou
Copy link
Owner

I don't think so, because you can load peers. Just wondering, which version of dashboard you're using?

@zverstal
Copy link
Author

3.0.6

@zverstal
Copy link
Author

And yeah, i updated it from 2.3.8 and have new database.

Also I have another server with clean installation of your dashboard (3.0.6), same errors in it :(

@donaldzou
Copy link
Owner

Hmmmmmm does your server exist locally? or is on the cloud?

@zverstal
Copy link
Author

Cloud server.

@zverstal
Copy link
Author

image
Should I see here available IPs?

@donaldzou
Copy link
Owner

Yes, you should be. Do you mind tell me what Address you have for this configuration? the dashboard might crash when it is trying to generate too much IP.

@donaldzou
Copy link
Owner

the dashboard will generate available IP based on your configuration's address, if you have your subnet's mask less than 20, it will take a long time to generate them.
Screen Shot 2022-03-26 at 10 37 27 AM

@donaldzou
Copy link
Owner

the dashboard will generate available IP based on your configuration's address, if you have your subnet's mask less than 20, it will take a long time to generate them.

I forked this wonderful document on WireGuard: https://github.com/donaldzou/wireguard-docs

@zverstal
Copy link
Author

I have 10.66.66.Х/32 for my configuration.

@zverstal
Copy link
Author

https://github.com/angristan/wireguard-install

Maybe you know this popular installation script for Wireguard.
It's default network in this script 10.66.66.Х/32.

@donaldzou
Copy link
Owner

Ohhhhhh, you might use the wrong file lol. This script will generate 2 files (i think), one for server, one for client. The server's .conf's [Interface] have Address = xx.xx.xx.xx/24, and your client's .conf will have Address = xx.xx.xx.xx/32

@donaldzou
Copy link
Owner

For a server, the address should have at least 1 available IP for the client, so if your server's configuration have Address = xx.xx.xx.xx/32, you should change it to /24, then it should be good, remember to switch off the configuration first. I'll look into the install script you used to see what is going on in there lol

@zverstal
Copy link
Author

image
from my wg0.conf
it's 24 mask

@zverstal
Copy link
Author

And peers have 32 mask, yeah

@donaldzou
Copy link
Owner

donaldzou commented Mar 26, 2022

image from my wg0.conf it's 24 mask

This is the first time i'm seeing 2 lines of Address, usually they exist all on the same line like Address = 10.66.66.1/24, fd42:42:42::1/4, can you switch wg0 off with wg-quick down wg0, and remove the 2nd line of Address, save it, and bring it back up to see if that solve everything lol. I know my dashboard did not designed on handle 2 lines of Address. I need to put that into my next release.

@zverstal
Copy link
Author

zverstal commented Mar 26, 2022

It WORKS!!!
image
Thank you a lot!

But problem here:
image
this one is not working

If I delete IPv6, everything works well.

@donaldzou
Copy link
Owner

Yessss!!! I do notice it does not handle IPv6 well. I will continue to look into that.

@zverstal
Copy link
Author

Could I close this issue? For me it's solved :)

@donaldzou
Copy link
Owner

I'll close it ;) Have a great day/night!

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

2 participants