SCM Manager returning various error after Migration to v2

Good evening,

Today I upgraded scm from version 1.60 to 2.30 only that it returns a 404 error from Google console (the browser just keeps loading until the request times out).

running journalctl -u scm-server returns the following error:

Exception in thread "ScmEventBus-1-0" java.lang.UnsatisfiedLinkError: /tmp/jna6511840250923886855.tmp: /tmp/jna6511840250923886855.tmp: failed to map segment from shared object`
at java.lang.ClassLoader$NativeLibrary.load(Native Method)`
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1817)
at java.lang.Runtime.load0(Runtime.java:810)
at java.lang.System.load(System.java:1088)
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1018)
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:988)
at com.sun.jna.Native.<clinit>(Native.java:195)
at com.sun.akuma.CLibrary.<clinit>(CLibrary.java:89)
at com.sun.akuma.JavaVMArguments.resolvePID(JavaVMArguments.java:128)
at com.sun.akuma.JavaVMArguments.ofLinux(JavaVMArguments.java:116)
at com.sun.akuma.JavaVMArguments.of(JavaVMArguments.java:104)
at com.sun.akuma.JavaVMArguments.current(JavaVMArguments.java:92)
at sonia.scm.lifecycle.PosixRestartStrategy.restart(PosixRestartStrategy.java:57)
at sonia.scm.lifecycle.PosixRestartStrategy.executeRestart(PosixRestartStrategy.java:47)
at sonia.scm.lifecycle.RestartStrategy.restart(RestartStrategy.java:67)
at sonia.scm.lifecycle.BootstrapContextFilter.handleRestartEvent(BootstrapContextFilter.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.github.legman.InvocationContext.invoke(InvocationContext.java:108)
at com.github.legman.InvocationContext.proceed(InvocationContext.java:101)
at com.github.legman.micrometer.MicrometerInvocationInterceptor.invoke(MicrometerInvocationInterceptor.java:47)
at com.github.legman.InvocationContext.proceed(InvocationContext.java:99)
at com.github.legman.EventHandler.handleEvent(EventHandler.java:103)
at com.github.legman.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:52)
at com.github.legman.EventBus.dispatchSynchronous(EventBus.java:452)
at com.github.legman.EventBus.lambda$dispatch$1(EventBus.java:444)
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)`*

From google chrome console I get the following error:

GET http://serverip/scm/api/v2/ 404 (Not Found) ApiClient.request @ apiclient.ts?718f:307

If I force restart from the server with service scm-server restart , scm manager returns up and running, and with the plugin installed.

Now it seems like the browser is finding it difficult to successfully restart SCM service even if in scm-manager.log I can see the jvm service was restarted.

I also checked the apache log error_log and found an error as follows:

[proxy:error] [pid 32822] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed
[proxy_http:error] [pid 32822] [client 10.12.173.165:62193] AH01114: HTTP: failed to make connection to backend: localhost
[proxy:error] [pid 32821] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed

The thing is with version 1.60 I never got any of these errors, the reverse proxy settings in httpd.conf works until this restart from console activity.

I really apologize for the long story, I am only trying to make it comprehensive as much as possible.

Thanks to anyone willing to help a brother.

Regards

Hey @igwuborchuks,

we will have a look and come back to you asap.

Regards, Eduard

1 Like

I’m not sure yet whether this is related but could you please describe your environment a little more?

Which operating system, which architecture, which Java version do you use? Does this error also occur if you start SCM-Manager 2.30.0 clean (without migration)?

Also: Could you check if the user running SCM-Manager have proper permissions?

Hello eheimbuch,

I run a: rhel 8

openjdk version "1.8.0_302"
OpenJDK Runtime Environment (build 1.8.0_302-b08)
OpenJDK 64-Bit Server VM (build 25.302-b08, mixed mode)

I followed your suggestion and installed a clean version of scm 2.30, everything worked fine, installed a plugin and the page refreshed without any problems.

I still get the proxy-error but I think that is related to the httpd reverse proxy configuration which the security team is currently verifying as apache was also recently updated to 2.24

I think the issue might be the process of migrating from version 1.60 to 2.30.
My procedure for the migration from v1.60:

  1. remove the /opt/scm-server directory (v1.60 installation)

  2. I do not touch the /var/lib/scm/ folder (where repos and plugins ecc are stored)

  3. update /etc/yum.repos.d/SCM-Manager.repo:

    [scm-manager]
    name=SCM-Manager Repository
    baseurl=https://packages.scm-manager.org/repository/yum-v2-releases/
    enabled=1
    gpgcheck=1
    priority=1
    gpgkey=file:///etc/pki/rpm-gpg/SCM-Manager
    
  4. executed:
    curl -o /etc/pki/rpm-gpg/SCM-Manager https://packages.scm-manager.org/repository/keys/gpg/oss-cloudogu-com.pub

  5. dnf install scm-server : which installs scm-server 2.30.1 and mercurial 4.8.2-1

I started scm-server service and in the migration window, selected the move method, the window starts the migration but then does not refresh the page.

Am I missing a process in the migration flow?.

Thank you once again.

Regards

Thanks for the details. We assume that our restart mechanism somehow doesn’t work on your machine. Could you try to simply restart the server manually?

Manually restarting the scm service works.

However, I did a fresh installation of the v1.60 and then an upgrade to 2.30 and surprisingly the service did restart via web (during migration and even during plugin installation) .

At this point it works on a fresh installation of 1.60… I observed that the permission after the migration to 2.30 for /var/lib/scm changed to drwxr-xr-x rather than the drwx------ for version 1.
Is there a standard permission needed for /scm directory??.. I mean a 775 for everything in the /var/lib/scm directory.

Thank you once again.

Hi,

I fixed it.
After installation, I just ran chmod -R 775 scm and scm was able to restart service from browser

1 Like

I have closed this thread since there was no activity in the last 30 days.