deso-protocol / run

Run your own DeSo node
https://docs.deso.org
190 stars 94 forks source link

Getting an error when I set the ADMIN_PUBLIC_KEYS to my public key #68

Closed payini closed 3 years ago

payini commented 3 years ago

When I set my public key to the ADMIN_PUBLIC_KEYS field in the dev.env I get the error below.

I have tried clearing the cache. Setting 1 public key, multiple separated by commas, and one per line. No matter what I get the error.

Oops... Error global params: {"headers":{"normalizedNames":{},"lazyUpdate":null},"status":502,"statusText":"Bad Gateway","url":"http://13.77.183.42/api/v0/admin/get-global-params","ok":false,"name":"HttpErrorResponse","message":"Http failure response for http://13.77.183.42/api/v0/admin/get-global-params: 502 Bad Gateway","error":"\r\n502 Bad Gateway\r\n\r\n

502 Bad Gateway

\r\n
nginx/1.21.0
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"}

image

maebeam commented 3 years ago

You should be seeing an exception in the server logs. If you could share that it would be helpful!

payini commented 3 years ago

Hello @maebeam, thanks for your response.

Some extra information.

I am running the node, in a Docker container in an Ubuntu machine. I checked the nginx, frontend and backend logs, and I can't find any exception information about the error.

If I set the ADMIN_PUBLIC_KEY the admin page fails, if I remove my public key the admin pages works, but obviously for all users.

What kind of server logs, are you suggesting for me to look at?

Thanks again.

tijno commented 3 years ago

@payini are you using Brave browser ? If so can you try in Safari, Edge or Chrome ?

I have this issue with Brave.

Re logs - the nginx container logs should show a non 200 http code line when access admin.

But i think the one that maebeam is asking for are the logs from backend container.

You should be able to use (from memory, am on mobile)

docker logs --follow backend

then access the admin section and watch for error output - most likely a trace.

maebeam commented 3 years ago

I just looked into this and it seems that Identity is returning an empty or invalid JWT token.

Like @tijno mentioned, are you running Brave or Edge? Identity is currently slightly broken on those browsers

payini commented 3 years ago

I am not using Brave, I am using Chrome and Edge. Latest versions for both. It seems the issue actually happens in Edge to. I went to Chrome and tested there, and I'm not getting the error there, at the moment.

maebeam commented 3 years ago

Yep this is an issue with Identity. Tracking here: https://github.com/bitclout/identity/issues/46

payini commented 3 years ago

Got it. Thanks for the help!