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

Jam 0.2.0 nginx issue on Raspberry Pi 5 (umbrelOS) #123

Closed
nmfretz opened this issue May 4, 2024 · 5 comments · Fixed by #124
Closed

Jam 0.2.0 nginx issue on Raspberry Pi 5 (umbrelOS) #123

nmfretz opened this issue May 4, 2024 · 5 comments · Fixed by #124
Assignees
Labels
bug Something isn't working

Comments

@nmfretz
Copy link

nmfretz commented May 4, 2024

Expected behavior

Expected Jam 0.2.0 to work when installed on a Raspberry Pi 5 running umbrelOS 1.x.

Actual behavior

The joinmarket-webui/jam-standalone Docker container shows that nginx exits with an error a few times and is then stopped:

$ sudo docker logs jam_web_1   
[WARN  tini (7)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
Remove leftover wallet lockfiles before startup...
~/.joinmarket/ssl /src/scripts
Generating a RSA private key
........................................................................................................++++
................................................................................................................++++
writing new private key to 'key.pem'
-----
/src/scripts
Waiting for bitcoind to accept RPC requests...
Successfully waited for bitcoind to accept RPC requests.
Creating wallet jam_default if missing...
Loading wallet jam_default...
[  OK  ] nginx
[  OK  ] tor
[  OK  ] ob-watcher
[  OK  ] jmwalletd
[  OK  ] boot
dinit: Service nginx process terminated with exit code 1
[STOPPD] nginx
[  OK  ] nginx
dinit: Service nginx process terminated with exit code 1
[STOPPD] nginx
[  OK  ] nginx
dinit: Service nginx process terminated with exit code 1
[STOPPD] nginx
[  OK  ] nginx
dinit: Service nginx process terminated with exit code 1
dinit: Service nginx restarting too quickly; stopping.
[STOPPD] nginx

This prevents access to the UI.

The specific nginx error is related to the amount of memory allocated to a shared memory zone named "upstreams" in the default.conf:

$ sudo docker exec jam_web_1 nginx -t
nginx: [emerg] zone "upstreams" is too small in /etc/nginx/conf.d/default.conf:3
nginx: configuration file /etc/nginx/nginx.conf test failed

Currently this is set to 64K:

$ sudo docker exec jam_web_1 cat /etc/nginx/conf.d/default.conf

upstream jmwalletd_api_backend {
    zone upstreams 64K;
    server 127.0.0.1:28183;
    keepalive 16;
}

If I change the memory allocation to 128K and start nginx, then the Jam UI is accessible.

Steps to reproduce the problem

  1. install Jam 0.2.0 from umbrel app store on a Raspberry Pi 5 running umbrelOS
  2. click on app to access UI
  3. UI is inaccessible

Specifications

  • Version: Jam 0.2.0
  • Platform: umbrelOS for Raspberry Pi 5 (based on Debian Bookworm)
  • Browser: any

Additional context

Jam docker-compose.yml on umbrel app store for reference: https://github.com/getumbrel/umbrel-apps/blob/master/jam/docker-compose.yml

This issue is only occurring on the Raspberry Pi 5. I tested and Jam is working successfully on a Raspberry Pi 4, Umbrel Home, and custom x86 install. Have you received any reports of this error for Raspberry Pi 5 users?

One quick fix could be to increase the memory allocation of "upstreams" to, say, something like 128K, but I have not explored the full implications of doing so. Ideally, we're trying to avoid bind mounting the default.conf nginx file to the host and including our own modified version, because we would then not inherit any changes that Jam may make to this default config file in the future unless we realize the default behaviour has changed and modify it ourselves.

@nmfretz nmfretz added the bug Something isn't working label May 4, 2024
@AchimDN
Copy link

AchimDN commented May 4, 2024

@theborakompanioni I am the one who is affected from this issue on my new RPi 5. I think we have discussed that before in Telegram. Seems that the issue can only be solved by Jam developers. Thank you in advance for taking a look into it!

@josephtyler
Copy link

josephtyler commented May 4, 2024

This is happening to me as well. Thanks for posting the issue!

Confirming that setting zone upstreams 128K; worked for me as well.

@ro-le
Copy link

ro-le commented May 6, 2024

I have exact same issue - RPi 5, UmbrelOS 1.1, Jam 0.2.0

@theborakompanioni
Copy link
Collaborator

Hey guys! Thanks for reporting. I will transfer this issue to the docker repo. Fix will follow shortly.

@theborakompanioni theborakompanioni transferred this issue from joinmarket-webui/jam May 6, 2024
@theborakompanioni theborakompanioni self-assigned this May 6, 2024
@nmfretz
Copy link
Author

nmfretz commented May 6, 2024

Thanks @theborakompanioni, sorry for opening this issue in the wrong place!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants