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

Cannot configure puma-dev to use ipv6 proxy #336

Open
ybart opened this issue May 26, 2023 · 0 comments
Open

Cannot configure puma-dev to use ipv6 proxy #336

ybart opened this issue May 26, 2023 · 0 comments

Comments

@ybart
Copy link

ybart commented May 26, 2023

For some reason my webpack-dev-server was listening only on ipv6 instead of both ipv4 and ipv6.

netstat -an | grep "[.]3035 .*LISTEN"
tcp6       0      0  ::1.3035               *.*                    LISTEN

A web browser has typically no big issue with this as it would try both ipv4 and ipv6.

For instance, http://localhost:3035/packs/js/runtime.js correctly works in a browser or with curl when webpack-dev-server is only listening to ipv6.

However, when only specifying '3035' in ~/.puma-dev/webpack, I only get the following entry in logs :

14:05:00 puma-dev.1 | 2023/05/26 14:05:00 http: proxy error: dial tcp 127.0.0.1:3035: connect: connection refused

And the browser logs a 502 (Bad Gateway) error.

The log clearly indicated it tried to connect with ipv4, whereas all system actually uses ipv6 elsewhere.

I think it would be nice if we were able to have a similar behaviour, so the fact webpacker-dev-server is not listening on ipv4 would cause no issue and puma-dev would be transparently proxying to ipv6 without the user noticing any issue.

Alternatively, it might also be useful in some situations to redirect explicitly to ipv6 address.

I tried to specify other values in ~/.puma-dev/webpack like '[::1]:3035' or 'http://[::1]:3035' but this only caused parser errors (I had to run puma-dev -uninstall and puma-dev -install to see the error in the log). However http://localhost:3035 worked around the issue.

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

No branches or pull requests

1 participant