-
Notifications
You must be signed in to change notification settings - Fork 54
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
No connection to backend: Gateway Timeout - ECONNREFUSED #608
Comments
Hey @SpartanBit, sorry for the late reply. Still figuring out what might be the problem. It can be that JM creates a config file at first startup and subsequently exits. Have you tried restarting
curl "https://localhost:28183/api/v1/session" --show-error --insecure Sorry for shooting in the dark. |
Thanks for your feedback @theborakompanioni Also tried your curl request before and after updating to the version 1.5, but obtained the same output, not sure if that could help: {"session": false, "maker_running": false, "coinjoin_in_process": false, "schedule": null, "wallet_name": "None", "offer_list": null, "nickname": null} At this point the only conclusion I can think is that it's more likely to be an issue related to Raspibolt or the Raspibolt guide. I wanted to thinker with either the .env file or the src/setupProxy.js and point it manually to 127.0.0.1 instead of localhost, but I'm not sure if that could cause any problem. I'm making this observation solely on the comparison with some other Raspibolt guides linked previously, that seems to specify 127.0.0.1 instead of localhost (perhaps in some cases Raspibolt can't always resolve localhost??? - I remember having some problem with it in the past, although not sure if related) You think that could work? I'm out of ideas, so any input is much appreciated. |
I was getting the same errors while attempting to setup joinmarket + jam on freebsd. I solved it by replacing all occurrences of "localhost" to "127.0.0.1" in src/setupProxy.js". |
Thank you @bektar yea I was planning on doing that as well, but not sure of the security implication of doing so (silly point ik, but better be safe than sorry). Might try it anyway just to see if that's the underlying issue for me as well. |
Hey, thanks @bektar and @SpartanBit . It seems this can be addressed here, see #611 for a fix. Might be included in the upcoming version and should do away with any manual adaptions on the user side. Regarding security considerations, if anything, it should actually be safer now (localhost can theoretically resolve to remote machines, instead of the local one). Thank you for bringing it up 🧡 The issue remains open till it is confirmed to work on your side. |
@SpartanBit Would you be able to try adapting the nginx config according to raspibolt/raspibolt#1235 (comment) ? |
Hey @theborakompanioni
p.s. after each step i did make sure to reload both nginx and jam So your advice did solve the apparent problem, but for unknown reason JAM is still unreachable As for the Tor issue, the very first time I installed JAM i was able to interact with the .onion link, although I was still facing the no connection to backend error. After the first reinstall, I've not been able to connect to it (Error: The connection was reset) ever again, but again not sure why. |
I had the same problem (ECONNREFUSED). My problem was configuring |
It looks that Here is the tested solution, which uses nginx to forward the ports:
sudo nano /etc/nginx/conf.d/jam-ipv6to4-forwarding.conf
sudo nginx -t
sudo nginx -s reload |
@SpartanBit for As for your Tor issue, there is a problem in the RaspiBolt Jam guide were Tor is setup:
Jam is listening on SSL port (4020), hence Tor should listen on and forward port 443 rather than 80: HiddenServicePort 443 127.0.0.1:4020 I've done PR: [UPDATE BONUS GUIDE] JoinMarket webui (Jam) v0.1.5, which is waiting for review. |
Thanks. @jambolo I double checked it, and it's in the right directory, so likely not the underlying problem @dutu changing the port to 443 worked! Jam is now reachable on TOR. Much appreciated!
Mhhh, out of curiosity, do you know what could be the cause of this? |
@SpartanBit, I'm glad Tor is working now. Generally, it is possible for one application to resolve "localhost" to IPv4 and another to IPv6 on the same system. The actual behavior depends on the application and the underlying system libraries it uses, as well as the system's address resolution preferences. In general, when an application resolves "localhost," it queries the system's DNS resolver, which then checks the /etc/hosts file and other system-specific configurations to determine the IP addresses associated with "localhost." The system might return both IPv4 and IPv6 addresses for "localhost" depending on the configuration. However, applications and libraries might have different preferences when selecting which IP version to use. For example, some applications might prefer IPv6 over IPv4 when both are available, while others might prefer IPv4. This preference could be hard-coded in the application or configurable by the user. |
Hi all, I have followed the JAM installation guide for Raspibolt described here:
https://raspibolt.org/guide/bonus/bitcoin/Jam.html
however the webui on the local network shows the following message: No connection to backend: Gateway Timeout.
This seems a very similar issue, but on Raspiblitz: #88
If I have a look at the logs, every time I try to reach JAM I get the following:
Error occurred while proxying request 192.168.1.18:4020 to undefined [ECONNREFUSED] (https://nodejs.org/api/errors.html#errors_common_system_errors)
Error occurred while proxying request 192.168.1.18:4020/api/v1/session to https://localhost:28183/ [ECONNREFUSED] (https://nodejs.org/api/errors.html#errors_common_system_errors)
Error occurred while proxying request 192.168.1.18:4020/api/v1/wallet/all to https://localhost:28183/ [ECONNREFUSED] (https://nodejs.org/api/errors.html#errors_common_system_errors)
Not sure what's causing it, but i tried to get to the root cause of this, and the only thing I've found is that some of the other guides do specify in the .env file not only the port but also the host/server at 127.0.0.1:...
see https://raspibolt.org/guide/bonus/lightning/thunderhub.html#configuration or https://raspibolt.org/guide/bitcoin/blockchain-explorer.html#configuration
Could that be the cause behind this problem, and if so, how can i resolve it?
I would be truly grateful if someone could help.
Thanks!
The text was updated successfully, but these errors were encountered: