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

Docker Image connection issue over TLS in Firefox #198

Closed
flumpt opened this issue Sep 22, 2021 · 8 comments · Fixed by #199 or #202
Closed

Docker Image connection issue over TLS in Firefox #198

flumpt opened this issue Sep 22, 2021 · 8 comments · Fixed by #199 or #202

Comments

@flumpt
Copy link

flumpt commented Sep 22, 2021

Hi,

i ran into another problem using the docker image. Apparently Firefox has an issue connecting to websockets via HTTP2. There is a workaround by disabling HTTP2 in libwebsockets.

Can you maybe apply the same fix to your Dockerfile that they did over at https://github.com/eclipse/mosquitto

Link to the PR with the fix: eclipse-mosquitto/mosquitto#2255

Thanks in advance!

@iegomez
Copy link
Owner

iegomez commented Sep 22, 2021

Hi again!
Sure, I'll try to do the change later today.

@iegomez
Copy link
Owner

iegomez commented Sep 23, 2021

@flumpt just opened a PR, I'm waiting for checks to pass and I'll merge to master. I won't release yet because I wanna take a look at your other issue first and then release a patch for both in case I fin a bug.

@flumpt
Copy link
Author

flumpt commented Sep 24, 2021

@iegomez Thanks for adding the option! Sadly it is still not working. In the comments of eclipse-mosquitto/mosquitto#1211 they also suggest to add -DLWS_WITH_EXTERNAL_POLL=ON.
I've not been able to try it myself because of errors when building the Docker image. I'm actually not sure what the external poll does and don't want to bother you anymore with this. So if you're to busy to try it just let me know and i will try to fix the errors on my end building the Docker image and provide you a PR if i get it to work.

@iegomez iegomez reopened this Sep 24, 2021
@iegomez
Copy link
Owner

iegomez commented Sep 24, 2021

@flumpt could you give adding that flag a try? I don't have my personal machine with me and thus nos etup available to quickly test it.
If it works, feel free to open a PR or ping me and I'll add it.

@flumpt
Copy link
Author

flumpt commented Sep 27, 2021

Hey @iegomez,
i got to work on this issue and recognized some problems in the Dockerfile. I created a PR #201 with some changes which fix this issue but also change a few other things.

  1. libwebsockets are only built for mosquitto v2 so the change you made has no effect when v1.6 is used. I removed the check so that they are also built for v1.6.
  2. I don't quite understand why you are starting from a new image i n the middle of the Dockerfile but i ran into a problem with building the libwebsockets the second time because wget, cmake and libssl-dev were missing.
  3. I also ran into a problem that libwebsockets could not be found when running make for mosquitto because CFLAGS and LDFLAGS provided for v2 were missing for v1.6

Maybe you can have a look at the PR and ping me if somethings unclear.
Thanks!

@iegomez
Copy link
Owner

iegomez commented Sep 27, 2021

Hey, @flumpt!

The quick answer is that I didn't create the Dockerfile nor do I use it, it's been a contribution by several others users and all I did last time was patch it to build libwebsockets from source because it was failing to find the package in Debian. It seemed to start building cleanly again, but clearly I messed something up. Hopefully your PR remedies it.

I'm looking at it and I found no mention of -DLWS_WITH_EXTERNAL_POLL=ON, so was it not the problem?

@flumpt
Copy link
Author

flumpt commented Sep 28, 2021

@iegomez Apparently it seems to work without the flag. When i added it i recognized that i don't even get to the point that the flag is used because debians internal libwebsockets were used for the mosquitto version i am using. So i removed the flag and instead ensured that the libwebsockets are also built for mosquitto v1.6 and your fix with deactivating HTTP2 did have an effect.

@iegomez
Copy link
Owner

iegomez commented Sep 28, 2021

Cool, thanks for that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants