New installation, can't start as non root user

I have a new installation of upstart on a new Ubuntu machine. There is a user on the machine called youtrack which runs all the jetbrains services. upsource is installed in /home/youtrack/upsource/. I can start upsource as root with no problems. When I try to start upsource as the youtrack user, the Frontend fails to load with the following error:

 

upsource-frontend: Failed to invoke "main" method of the class "com.jetbrains.launcher.ep.AppConfigurator": null

upsource-frontend: java.lang.reflect.InvocationTargetException

upsource-frontend: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

upsource-frontend: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

upsource-frontend: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

upsource-frontend: at java.lang.reflect.Method.invoke(Method.java:498)

upsource-frontend: at com.jetbrains.launcher.ep.AppWrapperBootstrap2.main2(AppWrapperBootstrap2.java:35)

upsource-frontend: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

upsource-frontend: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

upsource-frontend: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

upsource-frontend: at java.lang.reflect.Method.invoke(Method.java:498)

upsource-frontend: at com.jetbrains.launcher.util.BootstrapUtil.doCallMain2(BootstrapUtil.java:51)

upsource-frontend: at com.jetbrains.launcher.util.BootstrapUtil.callMain2(BootstrapUtil.java:18)

upsource-frontend: at com.jetbrains.launcher.ep.Bootstrap.main(Bootstrap.java:15)

upsource-frontend: at com.jetbrains.launcher.ep.AppWrapperBootstrap.main(AppWrapperBootstrap.java:11)

upsource-frontend: Caused by: java.lang.UnsatisfiedLinkError: /home/youtrack/upsource/upsource-2017.1.1821/internal/java/linux-x64/jre/lib/amd64/libmanagement.so: /home/youtrack/upsource/upsource-2017.1.1821/internal/java/linux-x64/jre/lib/amd64/libmanagement.so: failed to map segment from shared object

upsource-frontend: at java.lang.ClassLoader$NativeLibrary.load(Native Method)

upsource-frontend: at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)

upsource-frontend: at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)

upsource-frontend: at java.lang.Runtime.loadLibrary0(Runtime.java:870)

upsource-frontend: at java.lang.System.loadLibrary(System.java:1122)

upsource-frontend: at sun.management.ManagementFactoryHelper$4.run(ManagementFactoryHelper.java:451)

upsource-frontend: at sun.management.ManagementFactoryHelper$4.run(ManagementFactoryHelper.java:449)

upsource-frontend: at java.security.AccessController.doPrivileged(Native Method)

upsource-frontend: at sun.management.ManagementFactoryHelper.<clinit>(ManagementFactoryHelper.java:448)

upsource-frontend: at java.lang.management.ManagementFactory.getRuntimeMXBean(ManagementFactory.java:350)

upsource-frontend: at com.jetbrains.launcher.util.ProcessUtil.getCurrentPidFromJVMName(ProcessUtil.java:94)

upsource-frontend: at com.jetbrains.launcher.util.ProcessUtil.doGetCurrentPid(ProcessUtil.java:69)

upsource-frontend: at com.jetbrains.launcher.util.ProcessUtil.getCurrentPid(ProcessUtil.java:58)

upsource-frontend: at com.jetbrains.launcher.util.ProcessUtil.getCurrentPidDescription(ProcessUtil.java:49)

upsource-frontend: at com.jetbrains.launcher.AppWrapperArguments.<init>(AppWrapperArguments.java:53)

upsource-frontend: at com.jetbrains.launcher.ep.AppConfigurator$1.run(AppConfigurator.java:25)

upsource-frontend: at com.jetbrains.launcher.Initializer.runWithContext(Initializer.java:16)

upsource-frontend: at com.jetbrains.launcher.ep.AppConfigurator.main(AppConfigurator.java:21)

upsource-frontend: ... 13 more

 

The libmanagement.so file exists and youtrack has permission to access it (in fact even setting permissions to 777 doesn't solve the issue). I configured the limits.conf file as follows:

 

#Upsource settings

youtrack        -       memlock         7000000

youtrack        -       nofile          100000

youtrack        -       nproc           32768

youtrack        -       as              7000000

 

Oddly enough if I give my own user permissions over the upsource installation directory, I can start upsource just fine. The only difference between my own user account and the youtrack account is my account has sudo access and the youtrack account was created as a system user (but has a shell in /etc/passwd). The youtrack user is successfully able to launch hub and youtrack. Can anyone help steer me in the right direction. 

2 comments
Comment actions Permalink

Hey,

Not sure why, but seems that Upsource is sensitive to the type of account (regular user account or system one).. We'll be investigating it. 

Meanwhile please create a dedicated standard user account to run Upsource.

0
Comment actions Permalink

Thanks for the help. Tried deleting the account and recreating as a standard user with the same name. Same issue.

For laughs, created a new standard user with a different name, and it would start as normal. Suggested a difference between the youtrack user and any other, which leaves just the /etc/security/limits.conf settings.

Finally narrowed it down to this line:

youtrack        -       as              7000000

Not sure why that's the problem, as it doesn't look like when it's running upsource needs anywhere close to that much memory, unless I'm misunderstanding what that limit is supposed to do.

0

Please sign in to leave a comment.