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

WebUI is not working from remote host #526

Closed
pashagolub opened this issue Aug 27, 2024 Discussed in #523 · 10 comments · Fixed by #527
Closed

WebUI is not working from remote host #526

pashagolub opened this issue Aug 27, 2024 Discussed in #523 · 10 comments · Fixed by #527
Assignees
Labels
bug Something isn't working webui Admin UI related issues

Comments

@pashagolub
Copy link
Collaborator

pashagolub commented Aug 27, 2024

Discussed in #523

Originally posted by ondar August 26, 2024

When I log in from another computer on the network, I get Undefined error after pressing login:
image
Seems UI is requesting response from localhost and not the remote server I run it from.

Backend and Grafana seems to be working just fine. What am I doing wrong?

@ondar
Copy link
Contributor

ondar commented Aug 27, 2024

You can delete the 1st part about blank screen. That was already solved by you. Problem here is only 2nd part. Maybe next time I report errors I should do that separately 😁 Sorry for the confusion.

@pashagolub pashagolub added bug Something isn't working webui Admin UI related issues labels Aug 27, 2024
@pashagolub
Copy link
Collaborator Author

Would you please provide steps to reproduce the error? Thanks

@ondar
Copy link
Contributor

ondar commented Aug 27, 2024

Steps to reproduce:

  1. run pgwatch by included docker compose file on 1 computer in network
  2. connect to pgwatch UI from different computer on the network

@pashagolub
Copy link
Collaborator Author

Ough, now I need to buy one more computer.... ;-)

@ondar
Copy link
Contributor

ondar commented Aug 27, 2024

I tried that again with freshly built docker image about an hour ago.

@ondar
Copy link
Contributor

ondar commented Aug 27, 2024

I did that using 2 virtual computers on 1 physical. Maybe you can try it from phone connected to the same wifi?

@ondar
Copy link
Contributor

ondar commented Aug 27, 2024

I guess there is some setting in UI that represent endpoint of backend pgwatch that is currently set to http://localhost:8080. This setting needs to be dynamicaly derived from host you call UI from or maybe set manually when deployed by env variable to host's external IP and port? Calling backend from frontend is tricky 😁

@pashagolub
Copy link
Collaborator Author

ok, thanks. There was an easier way to reproduce the issue: http://127.0.0.1:8080/

@ondar
Copy link
Contributor

ondar commented Aug 27, 2024

But I guess it still works if it finds backend at localhost:8080, if you run it from different device where there is nothing on port 8080 it will throw timeout but this timeout just show error message "Undefined" (as there is nothing in response body I guess)?

@ondar
Copy link
Contributor

ondar commented Aug 27, 2024

Thanks for quick fix. It is working now.

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

Successfully merging a pull request may close this issue.

3 participants