MinimServer Forum

Full Version: Error launching MinimServer on Raspberry Pi
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

I followed this guide to install MinimServer on a Raspberry Pi 3B:
Installing MinimServer 2 on the Raspberry Pi

The System is a MoodeOS 8.1.2 which is based on Raspian Bullseye Lite (2022-04-04; Linux kernel 5.15; 32 Bit).

I've also installed BubbleUPnP-Server which requires OpenJDK.

While trying to run MinimServer i get the following error:
Code:
java -version
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10-post-Raspbian-1deb11u1)
OpenJDK Server VM (build 11.0.15+10-post-Raspbian-1deb11u1, mixed mode)
pi@MoodeOS:~ $ sudo minimserver/bin/startc
MinimServer 2.1.2, Copyright (c) 2012-2022 Simon Nash. All rights reserved.
OpenJDK Server VM warning: You have loaded library /home/pi/minimserver/tmp/native/libohNet.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
java.lang.UnsatisfiedLinkError: /home/pi/minimserver/tmp/native/libohNet.so: /home/pi/minimserver/tmp/native/libohNet.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
        at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
        at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2445)
        at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2501)
        at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2700)
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2643)
        at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
        at java.base/java.lang.System.loadLibrary(System.java:1873)
        at org.jminim.lib.OhNetService.createLibrary(OhNetService.java:680)
        at org.jminim.lib.OhNetService.createDeviceStack(OhNetService.java:583)
        at org.jminim.lib.OhNetService.createDeviceFactory(OhNetService.java:486)
        at org.jminim.lib.OhNetService.access$2100(OhNetService.java:52)
        at org.jminim.lib.OhNetService$Proxy.createDeviceFactory(OhNetService.java:1132)
        at org.jminim.lib.MonitorService$Monitor.createDevice(MonitorService.java:289)
        at org.jminim.lib.MonitorService$Monitor.listenerAdded(MonitorService.java:366)
        at org.jminim.core.RuntimeImpl.addEventListener(RuntimeImpl.java:2501)
        at org.jminim.lib.RuntimeService$Proxy.addEventListener(RuntimeService.java:232)
        at com.minimserver.Server.doStart(Server.java:1843)
        at com.minimserver.Server.start(Server.java:1380)
        at org.jminim.core.ContextImpl.startComponent(ContextImpl.java:230)
        at org.jminim.core.ContextImpl.start(ContextImpl.java:118)
        at org.jminim.core.RootContextImpl.startComponent(RootContextImpl.java:80)
        at org.jminim.core.ContextImpl.start(ContextImpl.java:118)
        at org.jminim.core.RuntimeImpl.run(RuntimeImpl.java:2734)
        at org.jminim.core.LauncherImpl.run(LauncherImpl.java:1316)
        at org.jminim.core.LauncherImpl.launch(LauncherImpl.java:124)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja​va:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso​rImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.jminim.mlaunch.MinimLaunch.doLaunch(MinimLaunch.java:525)
        at org.jminim.mlaunch.MinimLaunch.launch(MinimLaunch.java:150)
        at org.jminim.mlaunch.MinimLaunch.launch(MinimLaunch.java:90)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja​va:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso​rImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.jminim.launch.Launcher.launch(Launcher.java:88)
        at com.minimserver.launch.LaunchServer.main(LaunchServer.java:38)
MinimServer error: now stopped, use 'restart' or 'exit'
Enter command (? for help):
>restart
>Module ohnet(linux-arm64)-1.32.4280.zip is incompatible with Java platform                                         MinimServer failure: now stopped, use 'relaunch' or 'exit'

What can I do to get MinimServer running here?
The "wrong ELF class: ELFCLASS64" error is caused by installing the MinimServer-2.1.2-linux-arm64.tar.gz package (ARM 64-bit). Because you are using a 32-bit version of OpenJDK and/or MoodeOS, you need to uninstall this package and install the MinimServer-2.1.2-linux-armhf.tar.gz package (ARM hard float 32-bit).

Also, you should not be using sudo to run the minimserver/bin/startc command. You should install MinimServer as a regular user and run it as a regular user. This prevents file permission problems.

I think the stack guard message will go away after you have fixed these two issues. If it doesn't, please let me know.
(16-07-2022 21:06)simoncn Wrote: [ -> ]The "wrong ELF class: ELFCLASS64" error is caused by installing the MinimServer-2.1.2-linux-arm64.tar.gz package (ARM 64-bit). Because you are using a 32-bit version of OpenJDK and/or MoodeOS, you need to uninstall this package and install the MinimServer-2.1.2-linux-armhf.tar.gz package (ARM hard float 32-bit).

Also, you should not be using sudo to run the minimserver/bin/startc command. You should install MinimServer as a regular user and run it as a regular user. This prevents file permission problems.

I think the stack guard message will go away after you have fixed these two issues. If it doesn't, please let me know.
Shame on me.
At first I had MoodeOS in operation as a 64-bit version.
Therefore I had also downloaded MinimServer in the 64 bit version.
In the meantime, however, it turned out that one of the other programmes I need is not 64-bit compatible.
So I started again with MoodeOS in the 32 bit version, but then forgot to download MinimServer in the 32 bit version.

Many thanks also for the hint regarding sudo.

Everything works fine now!
I also use the Raspberry on which MinimServer was installed as a WLAN hotspot via RaspAP.
MinimServer connects to all available interfaces.
However, I would like to use MinimServer only via the WLAN provided by Raspberry.

Can MinimServer be restricted to certain interfaces here?
You can restrict MinimServer to a specific subnet but not to a specific interface. To do this, you need to set the MinimServer ohnet.subnet property as described in this section.
Thank you so much!
This also worked brilliantly Smile
Now I have another problem regarding MinimServer on wlan0 interface on that Raspberry:

After a restart of the Raspberry, MinimServer says "Subnet 10.0.0.0 not found".
But the subnet is right. And after a restart of MinimServer everything works fine.

So I think it might be a timing problem when MinimServer is started before the wlan0 interface is ready.

Is thera a way to delay the startup of MinimServer?
There is a delayStart property but this would add a delay after MinimServer has already produced the subnet error message. I will think about other possible solutions for this.
Maybe the minimserver service could be adjusted.?

Or an automatic restart after initial startup...

Certainly there are more elegant solutions.
(19-07-2022 07:55)Music-Guy Wrote: [ -> ]Now I have another problem regarding MinimServer on wlan0 interface on that Raspberry:

After a restart of the Raspberry, MinimServer says "Subnet 10.0.0.0 not found".
But the subnet is right. And after a restart of MinimServer everything works fine.

So I think it might be a timing problem when MinimServer is started before the wlan0 interface is ready.

Is thera a way to delay the startup of MinimServer?

I've had this for a while, running 2 instances of MinimServer on a Pi4 2GB, the first start after a reboot fails. A relaunch is fine. I'm running a full desktop, watching via VNC, and I have a good connection long before any sign of Minimserver shows. This is with Ethernet only, WiFi disabled

For now I have ohnet.subnet left blank and it's all working well.

Colin
Pages: 1 2
Reference URL's