jam icon indicating copy to clipboard operation
jam copied to clipboard

500 internal error

Open rookey opened this issue 1 year ago • 12 comments

Expected behavior

Opening web address in my browser opens JAM

Actual behavior

Opening https://192.168.0.101:7501/jam displays "500 Internal Server Error / nginx"

Steps to reproduce the problem

  1. JAM is installed and running on latest version of Raspiblitz node
  2. run JAM from Raspiblitz menu, it displays the required web address (see above) to open
  3. error 500 (See above for exact message) is given

Specifications

  • Version: JAM 0.1.0?
  • Platform: Raspiblitz 1.10.0
  • Browser: Firefox latest

Additional context

rookey avatar Feb 25 '24 23:02 rookey

ping @openoms

theborakompanioni avatar Feb 25 '24 23:02 theborakompanioni

Will try to reproduce.

Does the problem persist after the restart of the node?

openoms avatar Feb 26 '24 08:02 openoms

Yes, it does unfortunately. I have little stuff activated on my node - only LND and 'run behind TOR', RPC Explorer, JM and JAM.

rookey avatar Feb 26 '24 23:02 rookey

@rookey Could you run netstat -lntp | grep 8080 command in terminal and paste output here? It will show which process binds on port 8080.

kristapsk avatar Feb 27 '24 11:02 kristapsk

@kristapsk here:

root@raspberrypi:/home/admin# netstat -lntp | grep 8080
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      19850/lnd

rookey avatar Feb 27 '24 18:02 rookey

@kristapsk this will be an issue on all raspiblitzes. 8080 is the LND REST port. Need to find a way to avoid the collusion.

openoms avatar Feb 27 '24 18:02 openoms

@rookey can you try to set:

onion_serving_port = 8080

to something else like:

onion_serving_port = 8181

the easiest on the raspiblitz is to enter the joininbox menu -> JM -> CONFIG -> JMCONF, press down to find the line and change it

EDIT: it is already taken care of in joininbox if you just enter the menu once: https://github.com/openoms/joininbox/blob/11c2e0dacd4196a21a6affe9249a7929d656a39d/scripts/start.joininbox.sh#L182C1-L183C1 Will add it to the Jam install script for the ones only using the webui.

The patch is the part of this PR, in good time for the next Raspiblitz release:

  • [ ] https://github.com/raspiblitz/raspiblitz/pull/4443

openoms avatar Feb 27 '24 20:02 openoms

Thanks @openoms and @kristapsk for the amazingly fast response. Also thanks to @rookey for report :pray: May the port issues all be resolved soon : -)

theborakompanioni avatar Feb 28 '24 10:02 theborakompanioni

Here's experimental branch of JM with support for automatic random free port selection (just specify onion_serving_port = auto in joinmarket.cfg), waiting for some feedback, then may open a PR. https://github.com/kristapsk/joinmarket-clientserver/tree/onion_serving_port-auto

kristapsk avatar Feb 28 '24 10:02 kristapsk

Here's experimental branch of JM with support for automatic random free port selection (just specify onion_serving_port = auto in joinmarket.cfg), waiting for some feedback, then may open a PR. https://github.com/kristapsk/joinmarket-clientserver/tree/onion_serving_port-auto

Nice. Providing first feedback here directly: Often 0 is used for "random free port" - maybe this is applicable here too? But this is just a minor detail. Small but great improvement. However, I won't be able to test in the next Two Weeks™ :grimacing:

theborakompanioni avatar Feb 28 '24 11:02 theborakompanioni

Hello @openoms, thanks for the quick response! Strangely, I had port 8090 defined in there, changed it to 8091, restarted the raspi and JM, but still have the same problem. Unfortunately, I have no idea how to manually update with the above patch, otherwise I'd be happy to try and give feedback.

rookey avatar Feb 28 '24 17:02 rookey

@rookey now that that the port is set restart the node or just the jm api:

sudo systemctl restart joinmarket-api

see if runs.

Logs are at:

sudo journalctl -fu joinmarket-api -n50

I see you restarted, so just check the logs and paste it here if possible.

openoms avatar Feb 29 '24 08:02 openoms

Closing due to inactivity. Please reopen if you think this is a mistake. :pray:

theborakompanioni avatar Sep 12 '24 08:09 theborakompanioni