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

[BUG] Domoticz not working properly #446

Open
joschaschultze opened this issue Dec 31, 2024 · 9 comments
Open

[BUG] Domoticz not working properly #446

joschaschultze opened this issue Dec 31, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@joschaschultze
Copy link

joschaschultze commented Dec 31, 2024

Describe the bug
Domoticz (Homeautomation Software) is not working properly with zoraxy. Browsers console is reporting 404 errors for resource files (images, js, css) even though they load if opened separate in browser window.

Screenshots
Screenshot 2024-12-31 at 11 30 28

Host Environment:

  • Arch: zoraxy_linux_amd64
  • OS: ubuntu
  • Version 3.1.4 and 3.1.5

Additional context
Same applies to octoprint.

@joschaschultze joschaschultze added the bug Something isn't working label Dec 31, 2024
@tobychui
Copy link
Owner

Can you screenshot your HTTP Proxy & Vdir rules here? I guess this might be related to a misconfiguration.

@joschaschultze
Copy link
Author

joschaschultze commented Dec 31, 2024

I don't have special rules or vdir-settings.

Screenshot 2024-12-31 at 12 31 02

Screenshot 2024-12-31 at 12 32 22

@tobychui
Copy link
Owner

Ok, here are a few things you can try.

  1. According to their wiki, it seems you will need to use HTTP instead of HTTPS for reverse proxying.
  2. I am seeing their example uses a virtual directory endpoint /domoticz instead of / for reverse proxy. I am not sure if that is intentially done because their app actually rooted at /domoticz. If that is the case, you will need to add /domoticz to your upstream endpoint as well so Zoraxy will do the rewrite for you. i.e. 192.168.11.100:443/domoticz (or 192.168.11.100:80/domoticz)
  3. Seeing that you set this as 3x weight, I assume you have other load balanced upstream? If yes, can you try narrow it down to a single upstream and see if this is a problem with the load balancer?

@joschaschultze
Copy link
Author

Thanks for your help. I have done a lot of things to make domoticz working with zoraxy already. I want to switch from npm where everything is working as expected.

Having it running though http makes no difference and the path is just their example. In my setup it is working on the root path ("/").

The weight is just a result of my trials. If you have only one upstream and you click on "increase weight" you can't decrease it :-) That's why there is a 3.

What I don't really understand is that if I load domoticz through zoraxy, I'll get all those 404 errors. But if I click on one of the 404-urls they load like they should. If I manually load all 404 links manually I get everything working after a while because the files are loaded into the browsers cache. But on different browsers it is not working.

Here it is loading through the frontend of domoticz:
Screenshot 2024-12-31 at 13 06 45

Here is a manual load of the same url which was a 404 before:
Screenshot 2024-12-31 at 13 08 31

@tobychui
Copy link
Owner

@joschaschultze Just to be sure, you are not using Cloudflare right?

But if I click on one of the 404-urls they load like they should

This happens to me a few times when I forgot to turn on the Cloudflare developer mode.

@joschaschultze
Copy link
Author

I use cloudflare just for the certificate and DNS to my local ip address.

Screenshot 2024-12-31 at 13 20 57

@tobychui
Copy link
Owner

Hmm that is strange, as if you can directly access those resources, then it means it is correctly proxied. It defintely feel like a caching problem to me, but currently Zoraxy do not support cache, so it must be something else.

Can you send me the link of your testing site via email ([email protected])? I will see if I can reproduce it on my side.

@joschaschultze
Copy link
Author

I'm sorry, but my entire setup is only accessible locally or via my VPN. This means that unfortunately I cannot give you access to test by yourself.

@tobychui
Copy link
Owner

Well ok, I will see if I got time to try out octoprint later, but for now there is nothing I can help. In the mean time, if you discover anything new, please feel free to let me know.

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