Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wow. I'm really impressed! Freenas?
09-12-2014, 23:13 (This post was last modified: 09-12-2014 23:14 by airflow.)
Post: #11
RE: Wow. I'm really impressed! Freenas?
Quote:This should give you the same failure. Press Enter to exit MinimServer, then zip and attach the minimserver/data/minimserver.log file to a post here.

Edit: It would also be worth looking at the file minimserver/data/minimserver.out to see if it contains any error messages.

Thanks for the suggestions! I tried the steps you gave. There were several files created, not only minimserver.log, but also heap and thread dumps, but no .out file. I attach the log-file, the other files are too big.

Perhaps you can interpret the contents of the file better, I read it but it wasn't obvious to me.

Thanks & Greetings,
airflow


Attached File(s)
.log  minimserver.log (Size: 17.2 KB / Downloads: 2)
Find all posts by this user
Quote this message in a reply
10-12-2014, 08:26
Post: #12
RE: Wow. I'm really impressed! Freenas?
(09-12-2014 23:13)airflow Wrote:  Thanks for the suggestions! I tried the steps you gave. There were several files created, not only minimserver.log, but also heap and thread dumps, but no .out file. I attach the log-file, the other files are too big.

Perhaps you can interpret the contents of the file better, I read it but it wasn't obvious to me.

Thanks & Greetings,
airflow

Thanks for this. There is some useful information in the log file:

ohNet: Os/OsWrapper.cpp:188: Os::NetworkListAdapters RETURN VALUE = -1

The ohNet runtime is using the Linux API call getifaddrs() to list all network adapters in the machine. This API call is failing with a return code of -1. Can you think of any reason why this is happening?
Find all posts by this user
Quote this message in a reply
10-12-2014, 15:39
Post: #13
RE: Wow. I'm really impressed! Freenas?
(10-12-2014 08:26)simoncn Wrote:  The ohNet runtime is using the Linux API call getifaddrs() to list all network adapters in the machine. This API call is failing with a return code of -1. Can you think of any reason why this is happening?

Thanks for the pointer. Indeed I could find out that there are some problems within the Linux-jail of FreeBSD (I use FreeBSD, as it's the underlying OS for FreeNAS), which is why this functionality will be removed alltogether in the upcoming release 9.3 of FreeNAS.

Because of this, I have another idea - Simon can you please tell me if this is possible to your mind and understanding: Would it also be a viable way to build/compile the OH-libraries myself on my native FreeBSD-system? And could I then replace the libraries that you provide with Minimserver with the BSD-compiled ones?

Thanks,
airflow
Find all posts by this user
Quote this message in a reply
10-12-2014, 15:52 (This post was last modified: 10-12-2014 15:53 by simoncn.)
Post: #14
RE: Wow. I'm really impressed! Freenas?
(10-12-2014 15:39)airflow Wrote:  Thanks for the pointer. Indeed I could find out that there are some problems within the Linux-jail of FreeBSD (I use FreeBSD, as it's the underlying OS for FreeNAS), which is why this functionality will be removed alltogether in the upcoming release 9.3 of FreeNAS.

Because of this, I have another idea - Simon can you please tell me if this is possible to your mind and understanding: Would it also be a viable way to build/compile the OH-libraries myself on my native FreeBSD-system? And could I then replace the libraries that you provide with Minimserver with the BSD-compiled ones?

Thanks,
airflow

You might be able to do that but I think there are likely to be other Linux dependencies/assumptions in MinimServer and/or ohNet. If you want to pursue this, you can download the ohNet source code from the ohNet project on Github (see this page).
Find all posts by this user
Quote this message in a reply
13-12-2014, 17:25
Post: #15
RE: Wow. I'm really impressed! Freenas?
(10-12-2014 15:52)simoncn Wrote:  dependencies/assumptions in MinimServer and/or ohNet. If you want to pursue this, you can download the ohNet source code from the ohNet project on Github (see this page).

I tried that and I failed so far. I have not given up yet! :-) I try to investigate what has to be done to achieve building the libs. See also my thread here: http://forum.openhome.org/showthread.php?tid=1320

Kind Regards,
airflow
Find all posts by this user
Quote this message in a reply
08-02-2015, 12:29
Post: #16
RE: Wow. I'm really impressed! Freenas?
Hi! You know that I could compile the ohNet-libraries with somewhat reduced functionality on FreeBSD. I thought that I'll give these libs a try. So I copied the following file "libohNet.so" over from the ohnet-directory to the installation of minimserver:

Code:
cp -av /usr/local/share/ohnet/Build/Obj/Posix/Release/libohNet.so /usr/local/share/minimserver/data/tmp/native/libohNet.so

I used the files from MinimServer-0.8.3b-linux-x64.tar.gz as the basis for MinimServer-installation on FreeBSD. Is this the right way of tackling this? I did this because this was the only location of "libohNet.so" within the MinimSever-directory I could find. When I start MinimServer with "bin/startc", I get the same error-message as before:

Code:
java.lang.UnsatisfiedLinkError: /usr/local/share/minimserver/data/tmp/native/libohNet.so: Shared object "libm.so.6" not found, required by "libohNet.so"

Could that be another dependency I'm missing?
Find all posts by this user
Quote this message in a reply
08-02-2015, 16:14
Post: #17
RE: Wow. I'm really impressed! Freenas?
(08-02-2015 12:29)airflow Wrote:  Hi! You know that I could compile the ohNet-libraries with somewhat reduced functionality on FreeBSD. I thought that I'll give these libs a try. So I copied the following file "libohNet.so" over from the ohnet-directory to the installation of minimserver:

Code:
cp -av /usr/local/share/ohnet/Build/Obj/Posix/Release/libohNet.so /usr/local/share/minimserver/data/tmp/native/libohNet.so

Copying your FreeBSD version of libohNet.so to the /usr/local/share/minimserver/data/tmp/native directory won't make any difference because this file is overwritten when you start MinimServer.

For this test, you would need to replace the libohNet.so and libohNetJni.so files within the archive file /usr/local/share/minimserver/libext/ohnet(linux-x86)-1.1.1452.zip by your FreeBSD versions, assuming that you have MinimServer update 57 installed.
Find all posts by this user
Quote this message in a reply
09-02-2015, 00:07
Post: #18
RE: Wow. I'm really impressed! Freenas?
(08-02-2015 16:14)simoncn Wrote:  Copying your FreeBSD version of libohNet.so to the /usr/local/share/minimserver/data/tmp/native directory won't make any difference because this file is overwritten when you start MinimServer.

For this test, you would need to replace the libohNet.so and libohNetJni.so files within the archive file /usr/local/share/minimserver/libext/ohnet(linux-x86)-1.1.1452.zip by your FreeBSD versions, assuming that you have MinimServer update 57 installed.

OK, I see! I tried the following steps:
  • I cannot install MinimServer update 57, as this version is not available directly on your webpage. I installed MinimServer 0.8.3b instead. I guess that update 57 is only available via the online update function?
  • The libext-directory doesn't contain any files. I didn't find ohnet(linux-x86)-1.1.1452.zip anywhere else, but I found ohnet(linux-x64)-1.0.1356.zip in the lib-directory instead.
  • I should replace the libohNet.so and libohNetJni.so files within this archive. The problem is that the compilation of the ohnet-project (as documented in this thread) does indeed output a file called libohNet.so, but no libohNetJni.so. Is this a problem? I hope it's not, as the extensive test-suite completed successfully.
  • So I just replaced the file libohNet.so within the archive, and left the other file as it was. I want to mention that my version of libohNet.so is much larger than the existing file within the archive of MinimServer (12.810 KB vs. 1.803 KB).
  • When I try to start MinimServer now by executing ./bin/startc, it throws a different error than before:
Code:
root@testus_1:/usr/local/share/minimserver # bin/startc
MinimServer 0.8.3 update 50, Copyright (c) 2012-2014 Simon Nash. All rights reserved.
java.lang.UnsatisfiedLinkError: no ohNet in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
        at java.lang.Runtime.loadLibrary0(Runtime.java:849)
        at java.lang.System.loadLibrary(System.java:1088)
        at org.jminim.lib.OhNetService.createLibrary(OhNetService.java:569)
        at org.jminim.lib.OhNetService.createDeviceStack(OhNetService.java:476)
        at org.jminim.lib.OhNetService.createDeviceFactory(OhNetService.java:379)
        at org.jminim.lib.OhNetService.access$1800(OhNetService.java:47)
        at org.jminim.lib.OhNetService$Proxy.createDeviceFactory(OhNetService.java:945)
        at org.jminim.lib.MonitorService$Monitor.createDevice(MonitorService.java:259)
        at org.jminim.lib.MonitorService$Monitor.listenerAdded(MonitorService.java:333)
        at org.jminim.core.RuntimeImpl.addEventListener(RuntimeImpl.java:1258)
        at org.jminim.lib.RuntimeService$Proxy.addEventListener(RuntimeService.java:212)
        at com.minimserver.Server.doStart(Server.java:676)
        at com.minimserver.Server.start(Server.java:508)
        at org.jminim.core.ContextImpl.startComponent(ContextImpl.java:167)
        at org.jminim.core.ContextImpl.start(ContextImpl.java:92)
        at org.jminim.core.RootContextImpl.startComponent(RootContextImpl.java:47)
        at org.jminim.core.ContextImpl.start(ContextImpl.java:92)
        at org.jminim.core.RuntimeImpl.run(RuntimeImpl.java:1382)
        at org.jminim.core.LauncherImpl.run(LauncherImpl.java:975)
        at org.jminim.core.LauncherImpl.launch(LauncherImpl.java:107)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav​a:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.jminim.launch.Launcher.doLaunch(Launcher.java:621)
        at org.jminim.launch.Launcher.launch(Launcher.java:204)
        at com.minimserver.launch.LaunchServer.main(LaunchServer.java:30)
MinimServer error: now stopped, use 'restart' or 'exit'
Enter command (? for help), or null to exit:
>
Find all posts by this user
Quote this message in a reply
09-02-2015, 09:00
Post: #19
RE: Wow. I'm really impressed! Freenas?
(09-02-2015 00:07)airflow Wrote:  I cannot install MinimServer update 57, as this version is not available directly on your webpage. I installed MinimServer 0.8.3b instead. I guess that update 57 is only available via the online update function?

Yes, that's correct. You won't be able to install this update until you have MinimServer running.

Quote:The libext-directory doesn't contain any files. I didn't find ohnet(linux-x86)-1.1.1452.zip anywhere else, but I found ohnet(linux-x64)-1.0.1356.zip in the lib-directory instead.

This is the correct file to modify.

Quote:I should replace the libohNet.so and libohNetJni.so files within this archive. The problem is that the compilation of the ohnet-project (as documented in this thread) does indeed output a file called libohNet.so, but no libohNetJni.so. Is this a problem? I hope it's not, as the extensive test-suite completed successfully.

To build libohNetJni.so, use:

gmake nocpp11=yes ohNetJni

You need to have a JDK installed on your build machine to do this. The default build of ohNet doesn't build or test the ohNet Java bindings.

However, this isn't the cause of the problem you are seeing (see below).

Quote:So I just replaced the file libohNet.so within the archive, and left the other file as it was. I want to mention that my version of libohNet.so is much larger than the existing file within the archive of MinimServer (12.810 KB vs. 1.803 KB).

The larger size is caused by debug symbols within the library. I am stripping these symbols when I build this library for MinimServer. This difference shouldn't cause any problems.

Quote:When I try to start MinimServer now by executing ./bin/startc, it throws a different error than before:
Code:
root@testus_1:/usr/local/share/minimserver # bin/startc
MinimServer 0.8.3 update 50, Copyright (c) 2012-2014 Simon Nash. All rights reserved.
java.lang.UnsatisfiedLinkError: no ohNet in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
        at java.lang.Runtime.loadLibrary0(Runtime.java:849)
        at java.lang.System.loadLibrary(System.java:1088)
        at org.jminim.lib.OhNetService.createLibrary(OhNetService.java:569)

From this stack trace, this is happening when MinimServer tries to load the libohNet.so library (not the libohNetJni.so library). I suspect something has gone wrong when you modified or replaced the .zip file. Please upload your modified .zip file to my FTP server and I will take a look at it. I will PM you the server details.
Find all posts by this user
Quote this message in a reply
09-02-2015, 23:04
Post: #20
RE: Wow. I'm really impressed! Freenas?
(09-02-2015 09:00)simoncn Wrote:  From this stack trace, this is happening when MinimServer tries to load the libohNet.so library (not the libohNetJni.so library). I suspect something has gone wrong when you modified or replaced the .zip file. Please upload your modified .zip file to my FTP server and I will take a look at it. I will PM you the server details.

Thanks to your hint I could find out what the problem with the zip-file was. All the files were in it, but inside a folder, which shouldn't be there. I corrected that and now the next error-message points to libohNetJni.so, which I haven't compiled yet.

Code:
java.lang.UnsatisfiedLinkError: /usr/local/share/minimserver/data/tmp/native/libohNetJni.so: Shared object "libm.so.6" not found, required by "libohNetJni.so"

So I have to compile libohNetJni.so too for FreeBSD. Before I tried that, I compiled and installed openjdk8 successfully (because you mentioned that an java-SDK is needed). Unluckily, compilation of libohNetJni.so fails with the following message:

Code:
gcc -o Build/Obj/Posix/Release/JniAction.o -c -fexceptions -Wall   -Werror -pipe -D_GNU_SOURCE -D_REENTRANT -DDEFINE_LITTLE_ENDIAN -DDEFINE_TRACE -g -O2   -fPIC -IBuild/Include/  -I/include -I/include/linux OpenHome/Net/Bindings/Java/Action.c
OpenHome/Net/Bindings/Java/Action.c:1:17: error: jni.h: No such file or directory
In file included from OpenHome/Net/Bindings/Java/Action.c:2:
OpenHome/Net/Bindings/Java/Action.h:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'jlong'
OpenHome/Net/Bindings/Java/Action.h:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
OpenHome/Net/Bindings/Java/Action.h:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
OpenHome/Net/Bindings/Java/Action.h:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
OpenHome/Net/Bindings/Java/Action.h:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'jstring'
OpenHome/Net/Bindings/Java/Action.c:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'jlong'
OpenHome/Net/Bindings/Java/Action.c:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
OpenHome/Net/Bindings/Java/Action.c:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
OpenHome/Net/Bindings/Java/Action.c:61: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
OpenHome/Net/Bindings/Java/Action.c:77: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'jstring'
Common.mak:992: recipe for target 'Build/Obj/Posix/Release/JniAction.o' failed
gmake: *** [Build/Obj/Posix/Release/JniAction.o] Error 1

Should I ask the other Simon in the OpenHome-forum for support or do you have an idea already? For your information, I chose openjdk8 for the Java-SDK. I would also have linux-sun-jdk17. Should I try that instead?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)