GET /api2/json: 401 Unauthorized

mkaatman

Renowned Member
Apr 22, 2016
21
0
66
124
After the 4.x upgrade, I can't connect to the web interface from the browser. SSH is working fine.

I see this in the logs for each attempt.
Aug 25 21:40:24 pbs proxmox-backup-proxy[1465]: authentication failure; rhost=[::1]:36534 msg=no authentication credentials provided.
Aug 25 21:40:27 pbs proxmox-backup-proxy[1465]: GET /api2/json: 401 Unauthorized: [client [::1]:36534] authentication failed - no authentication credentials provided.

Any thoughts on where I should start troubleshooting?
 
Did you make sure to reboot the server and refresh the user interface with CTRL+SHIFT+R?

What does your journal say when you try to log in and load a page?

Could you also tell me whether you have any errors in the browser's consoles? That is typically accessible by pressing F12 and selecting the console tab.
 
Yeah I cleared cookies and app cache. Definitely rebooted several times. Those logs above are from journal.

Dev tools essentially showed the same error.

I think I should probably just do a fresh pbs install. I thought about maybe trying to reinstall the pbs packages in place too. It's an odd issue.
 
Well this is interesting. I just tried accessing it from my laptop while on my work guest network through tailscale and it worked immediately.

I'm further confused. I'll do some more testing.
 
I tried it again from home tonight. Cleared cache. Brave browser works fine. Chrome fails. I'm ditching chrome so I'm okay with the results but I can't help but think there's something strange with this install. I may blow it away and start over anyway.
 
Sounds a bit like Chrome is not handling the cookies correctly there. Maybe something is interfering there, but hard to tell from the information provided. You need to check what exactly each request is doing in the network tab of the developer tools of the browser. It's a bit tricky to walk you through it over the forum though.

I tried to reproduce the issue a bit here, but could not. Can you tell me what Chrome version you use and whether you installed any extensions or plugins?
 
Hey Sterzy,

I was looking through dev tools a bit. I have it happening sporadically in brave as well.

One thing I noticed is that the first three attempts worked and the fourth and beyond hung.

If I look in network tab, and filter by socket, I see an additional websocket connection each time I click on shell after clicking on another item. After that success the next attempt failed. 10 more attempts and it started working again.

Here's a screenshot to give you an idea of what it looks like. Maybe you can confirm if this is completely normal.

I'm continuing to click on and off and it's working every time.

Now I tried hitting the browser refresh button, and the single websocket is stuck in status of pending as pbs shows the yellow "Connecting bar". Size is 0.0 bytes. I waited for it to timeout and it has a status of 101 and I get the red "Connection failed (Code: 1006) in PBS.

I click off shell and back on and it works.

This may not be helpful information at all and honestly, if you think my install is just borked, the simplest solution to this may be to reinstall. But if there's value in tracking this down I'm happy to try if you can give me a bit of guidance.

1756521125000.png