You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using puma-dev to run a rails app under a custom domain. For instance, my app is running under the host: https://myapp.localhost. Through the browser, I can access my application using this URL and everything works fine. My headache starts when I try to connect with this app from another app (both running on WSL and in the same Ubuntu instance).
My second app is not under puma-dev and is running on localhost:3000, we use the CURB library to connect via code with the application on myapp.localhost but in that case, I get this error message:
Couldn't resolve host name: Could not resolve host: myapp.localhost
I'm asking the puma-dev team about this issue too but it's important to mention this is just happening on WSL. My colleagues don't use WSL and they don't have this issue.
Any tip about what might be causing this issue specifically for the WSL environment?
Expected Behavior
The apps should be able to connect as happens in non WSL environments.
Actual Behavior
The apps can't connect. Curl error happens:
Curl::Err::HostResolutionError: Couldn't resolve host name: Could not resolve host: myapp.localhost
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered:
Thanks for reporting this @rogeraraujo90. How does puma-dev actually expose this custom domain name ? Is it running a custom DNS server, or editing /etc/hosts maybe ?
I would imagine that the issue is that the DNS configuration is different between your two environments.
Thanks for reporting this @rogeraraujo90. How does puma-dev actually expose this custom domain name ? Is it running a custom DNS server, or editing /etc/hosts maybe ?
I would imagine that the issue is that the DNS configuration is different between your two environments.
I'm not into the puma-dev code but I can confirm it doesn't edit the /etc/hosts file.
If I can access the URL through the browser (and ping it using the Ubuntu console) but can't by using the rails curl, does that means it might be a DNS problem?
Unfortunately I don't have any rails or puma-dev knowledge so I can't answer this question. I.
I see that you raised the issue on puma-dev, which I think is the best place since we'd need inside knowledge of how puma-dev works to root cause this.
Closing since this doesn't appear to be a WSL issue.
Windows Version
Microsoft Windows [Version 10.0.22621.1702]
WSL Version
1.2.5.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.90.1
Distro Version
Ubuntu-22.04
Other Software
rails: 3.2.0
puma-dev: 0.18.3 (go1.20.1)
curb: curb (0.9.10, 0.9.8)
Repro Steps
I'm using puma-dev to run a rails app under a custom domain. For instance, my app is running under the host:
https://myapp.localhost
. Through the browser, I can access my application using this URL and everything works fine. My headache starts when I try to connect with this app from another app (both running on WSL and in the same Ubuntu instance).My second app is not under puma-dev and is running on localhost:3000, we use the CURB library to connect via code with the application on
myapp.localhost
but in that case, I get this error message:Couldn't resolve host name: Could not resolve host: myapp.localhost
I'm asking the puma-dev team about this issue too but it's important to mention this is just happening on WSL. My colleagues don't use WSL and they don't have this issue.
Any tip about what might be causing this issue specifically for the WSL environment?
Expected Behavior
The apps should be able to connect as happens in non WSL environments.
Actual Behavior
The apps can't connect. Curl error happens:
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: