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

debian upgrade to 3.0 hangs daemon due to privilege issue #2205

Closed
olaf7 opened this issue Feb 7, 2024 · 3 comments
Closed

debian upgrade to 3.0 hangs daemon due to privilege issue #2205

olaf7 opened this issue Feb 7, 2024 · 3 comments

Comments

@olaf7
Copy link

olaf7 commented Feb 7, 2024

After upgrading to 3.x from 2.x using apt upgrade on Debian Bookworm scm-server semi works.
When you start scm-server it starts and runs but Jetty does not serve a webapp at /scm
I run it at port 8084.
This can be confirmed using lynx from localhost: lynx http://localhost:8084 want to redirect to http://localhost:8084/scm which gives a 404.
Same is true when starting the bin/scm-server from commandline as system-user 'scm'
It works fine when bin/scm-server is started as root

When I change debugging (level and/or to logging.xml) I do not get more information. Logging stops at a fixed point. See below.
Also nothing can be found in syslog

/opt/scm-server$ bin/scm-server
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
Set http request header size to 16384
Set http response header size to 16384
Set forward request customizer: true
Set http address binding to 0.0.0.0
Set http port to 8084
Set webapp war file to /opt/scm-server/var/webapp/scm-webapp.war
Set webapp temp directory to /var/cache/scm/work/webapp
Set docroot temp directory to /var/cache/scm/work/work/docroot

When running as root it continues:

/opt/scm-server# bin/scm-server
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
Set http request header size to 16384
Set http response header size to 16384
Set forward request customizer: true
Set http address binding to 0.0.0.0
Set http port to 8084
Set webapp war file to /opt/scm-server/var/webapp/scm-webapp.war
Set webapp temp directory to /var/cache/scm/work/webapp
Set docroot temp directory to /var/cache/scm/work/work/docroot
23:22:58.007 [main] INFO sonia.scm.lifecycle.classloading.ClassLoaderLifeCycle - create new simple ClassLoaderLifeCycle
23:22:58.021 [main] INFO sonia.scm.lifecycle.BootstrapContextFilter - register for restart events
23:22:58.025 [main] INFO sonia.scm.event.LegmanScmEventBus - create new event bus ScmEventBus-1
23:22:58.118 [main] DEBUG com.github.legman.shiro.ShiroExecutorDecoratorFactory - register class com.github.legman.shiro.ShiroExecutorDecoratorFactory as interface com.github.legman.ExecutorDecoratorFactory for legman
23:22:58.124 [main] DEBUG io.micrometer.common.util.internal.logging.InternalLoggerFactory - Using SLF4J as the default logging framework
23:22:58.160 [main] INFO sonia.scm.event.ScmEventBus - use sonia.scm.event.LegmanScmEventBus as event bus implementation
23:22:58.244 [main] INFO sonia.scm.lifecycle.BootstrapContextListener - start scm-manager initialization
23:22:58.244 [main] DEBUG sonia.scm.lifecycle.classloading.SimpleClassLoaderLifeCycle - init classloader sonia.scm.lifecycle.classloading.BootstrapClassLoader@7203c7ff

As there is no logging debugging this is hard.

When I change the user in systemd to root it works again. So it must be a pure privilege issue. When I change back to user scm the problem persists.
I also looked for a sudden impact of apparmor although this did not happen in the past. However I did not see anything reported by apparmor.

@pfeuffer
Copy link
Member

pfeuffer commented Feb 7, 2024

Hi @olaf7 ,

could you please check your permissions for /var/cache/scm/work? This directory (and all subdirectories) have to be writable by scm. By default, this should look like this:

vagrant@bullseye:~$ ls -ld /var/cache/scm/work
drwxr-xr-x 4 scm scm 4096 Feb  7 06:53 /var/cache/scm/work

When I change the owner of this directory to root, I get the 404 you are reporting, too.

Please let us know, whether this helps.

Thanks
René

@olaf7
Copy link
Author

olaf7 commented Feb 7, 2024 via email

@pfeuffer
Copy link
Member

pfeuffer commented Feb 7, 2024

Hi,

glad that it works now, thanks for the update. And we will definitely consider your suggestions. They can save (and would have saved) some debugging time.

Regards
René

@pfeuffer pfeuffer closed this as completed Feb 7, 2024
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

2 participants