Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Hardware requirements for Kura and JVM
Hardware requirements for Kura and JVM [message #1709484] Mon, 28 September 2015 20:27 Go to next message
Dave Rathnow is currently offline Dave RathnowFriend
Messages: 25
Registered: March 2014
Junior Member
We are in the process of doing an evaluation of Kura to see if it will run on our own proprietary device. Here are the spec:

ARM9 Processor (ARM926EJ-S)
64MB DRAM
2 RS-232 ports (1 RJ-45, 1 terminal block)
1 RS-485 port (terminal block)
500M of flash.
HSPA/GSM/GPRS/EDGE modem.
OS: GNU Linux

The device was designed for application in the Energy Industry and will run in a hazardous environments in either fully powered, or low powered (battery/solar panel) conditions. It has the ability to speak with a variety of flow meters using MODBUS or ROC.

The device does not currently have a JVM running on it so we would need to install one, so my first question is whether or not this device has sufficient resource to run a version of Java SE suitable for Kura and if so, which one? Oracle? OpenJDK? Other?

Once we have a JVM, is there enough juice to run Kura?

Thanks,
Dave.
Re: Hardware requirements for Kura and JVM [message #1709499 is a reply to message #1709484] Tue, 29 September 2015 00:15 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

I think it would be possible to run Kura on your board, but I would recommend:

1. For Java, look into Java 8 Embedded [1]. In particular take a look at the compact profiles [2]. We have had success running Kura on the Compact 2 profile.
2. For Kura, you likely will not be able to use all the features of Kura. There are installations on the download site [3] under the standard Eclipse distribution channels (not the "Extended Downloads") that are labeled as "No net". You should try these as they will not have the web UI or network management. These are two big resource consumers in Kura and this will save considerable space both on disk and in memory execution. You can start with the Raspberry Pi installers (armv6 or armv7) to get an idea of flash/DRAM footprint. The architecture differences will only become a problem when you begin using the underlying JNI libraries. This is not an issue, you would just need to do your own build of Kura.

Hopefully this is enough to get you started. Please keep us posted, it sounds like an interesting project. We would love to see how things progress.

[1] http://www.oracle.com/technetwork/java/embedded/embedded-se/documentation/javase-embedded-sysreq-2043454.html
[2] https://blogs.oracle.com/jtc/entry/a_first_look_at_compact
[3] http://www.eclipse.org/kura/downloads.php

Thanks,
--Dave

[Updated on: Tue, 29 September 2015 00:18]

Report message to a moderator

Re: Hardware requirements for Kura and JVM [message #1709629 is a reply to message #1709499] Tue, 29 September 2015 16:47 Go to previous messageGo to next message
Dave Rathnow is currently offline Dave RathnowFriend
Messages: 25
Registered: March 2014
Junior Member

Thanks Dave,

That's a good starting point but could you explain what is meant by "no network management"?

D
Re: Hardware requirements for Kura and JVM [message #1709632 is a reply to message #1709629] Tue, 29 September 2015 18:12 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

Kura provides a collection of services that assist in managing network interfaces (eth0, wlan0, etc.). For example, if you specify your WiFi settings, Kura will handle writing to the various system files (wpa_supplicant, interfaces, etc.), starting the appropriate system processes, and monitoring the status of the interface. The "no network management" simply means you would have to configure your interfaces yourself.

Thanks,
--Dave
Re: Hardware requirements for Kura and JVM [message #1709730 is a reply to message #1709632] Wed, 30 September 2015 14:50 Go to previous messageGo to next message
Dave Rathnow is currently offline Dave RathnowFriend
Messages: 25
Registered: March 2014
Junior Member
Thanks again Dave.

I'll keep you posted on my progress.

Dave.
Re: Hardware requirements for Kura and JVM [message #1709994 is a reply to message #1709730] Fri, 02 October 2015 14:16 Go to previous messageGo to next message
Dave Rathnow is currently offline Dave RathnowFriend
Messages: 25
Registered: March 2014
Junior Member

I got Java SE Embedded installed and running and copied over the Kura installation kit Raspbien Model 2, No net. Had some problems with the install but managed to sort thing out to a point where I could try starting Kura from the command line. I'm getting the exception below, which is likely due to native library not matching the OS. I've got the source code for Kura but the build fails. I'm not sure if I've set everything up properly to build. Is there some documentation on how to build Kura?

!ENTRY org.eclipse.equinox.ds 4 0 2015-10-01 22:09:10.774
!MESSAGE [SCR] Exception while activating instance org.eclipse.kura.linux.usb.UsbServiceImpl@f52e5 of component org.eclipse.kura.usb.UsbService
!STACK 0
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:235)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:347)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:473)
at org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:217)
at org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:816)
at org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:783)
at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
at org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:70)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.kura.linux.usb.LinuxUdevNative
at org.eclipse.kura.linux.usb.UsbServiceImpl.activate(UsbServiceImpl.java:51)
... 15 more
Root exception:
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.kura.linux.usb.LinuxUdevNative
at org.eclipse.kura.linux.usb.UsbServiceImpl.activate(UsbServiceImpl.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:235)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:347)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:473)
at org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:217)
at org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:816)
at org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:783)
at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
at org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:70)
Re: Hardware requirements for Kura and JVM [message #1710272 is a reply to message #1709994] Mon, 05 October 2015 16:18 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

Yes, that is a native library issue. I forgot the UsbService starts automatically, sorry about that. Instructions on building Kura are here [1]. The native library code you will need to build for the UsbService is here [2].

[1] http://wiki.eclipse.org/Kura/Getting_Started
[2] https://github.com/eclipse/kura/tree/develop/kura/org.eclipse.kura.linux.usb/src/main/c/udev

Thanks,
--Dave
Re: Hardware requirements for Kura and JVM [message #1710432 is a reply to message #1710272] Tue, 06 October 2015 15:14 Go to previous messageGo to next message
Dave Rathnow is currently offline Dave RathnowFriend
Messages: 25
Registered: March 2014
Junior Member
Hi Dave,

I have to apologies because the instructions to build Kura where there (as you pointed out) but I missed them. It turns out that the important exception was higher up in the log:

java.lang.reflect.InvocationTargetException
       <---snip--->
        at org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:816)
        at org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:783)
        at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
        at org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:70)
Caused by: java.lang.UnsatisfiedLinkError: /tmp/.kura/configuration/org.eclipse.osgi/bundles/62/1/.cp/lib/linux/armv6_hf/libEurotechLinuxUdev.so: libudev.so.0: cannot open shared object file: No such file or directory


I believe the binaries are fine. The problem is that we use devfsd instead of udev so the library libudev doesn't exist on our device. Don't ask me why, I wasn't involved with building the kernel.

We don't need USB support so is there a way to disable that part of Kura so I can move on?
Re: Hardware requirements for Kura and JVM [message #1710442 is a reply to message #1710432] Tue, 06 October 2015 16:27 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

For a permanent fix in the build, you will need to edit these files [1][2][3]. Search for org.eclipse.kura.linux.usb in these files and comment/delete the relevant code. For testing purposes, you can manually edit /opt/eclipse/kura/kura/config.ini on the target device and remove the entry for the org.eclipse.kura.linux.usb bundle.

[1] https://github.com/eclipse/kura/blob/develop/kura/distrib/pom.xml
[2] https://github.com/eclipse/kura/blob/develop/kura/distrib/src/main/ant/build_equinox_distrib.xml
[3] https://github.com/eclipse/kura/blob/develop/kura/distrib/src/main/osgi/equinox_3.8.1/configuration/config.ini

Thanks,
--Dave
Re: Hardware requirements for Kura and JVM [message #1710579 is a reply to message #1710442] Wed, 07 October 2015 16:43 Go to previous messageGo to next message
Dave Rathnow is currently offline Dave RathnowFriend
Messages: 25
Registered: March 2014
Junior Member
Thanks Dave,

I edited config.ini, removed the entry for org.eclipse.kura.linux.usb and was able to get Kura to start...sort of. There is one exception, which is likely because I'm using the Embedded version of Java, and a warning. I'm not sure how important they are, likely more of a nuisance than anything else. Here is the exception and warning:

!ENTRY org.eclipse.osgi 4 0 2015-10-07 15:30:17.294
!MESSAGE Bundle reference:file:../plugins/jdk.dio_1.0.1.jar@3 not found.
log4j:WARN Error during default initialization
java.lang.NoClassDefFoundError: java/beans/IntrospectionException
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:805)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:253)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:265)
at org.eclipse.kura.core.system.SystemAdminServiceImpl.<clinit>(SystemAdminServiceImpl.java:30)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.createInstance(ServiceComponent.java:493)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.createInstance(ServiceComponentProp.java:272)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:333)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:473)
at org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:217)
at org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:816)
at org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:783)
at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
at org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:70)
Caused by: java.lang.ClassNotFoundException: java.beans.IntrospectionException
at java.lang.ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:420)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more
log4j:WARN No appenders could be found for logger (org.eclipse.kura.core.certificates.CertificatesManager).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.


However, the bigger problem I have now is that Kura is consuming about 40mb of memory. With the other things running on the device, that only leaves about 2mb free. Is there a way to trim out portions of Kura that may not be required?

Dave.
Re: Hardware requirements for Kura and JVM [message #1710691 is a reply to message #1710579] Thu, 08 October 2015 12:37 Go to previous messageGo to next message
Alessandro Da Rugna is currently offline Alessandro Da RugnaFriend
Messages: 43
Registered: December 2014
Member
You can remove the Bluetooth bundle to save some memory.

My project: Kura web log level changer https://github.com/darugnaa/kura-web-log
My blog: http://darugnaa.github.io
Re: Hardware requirements for Kura and JVM [message #1710849 is a reply to message #1710691] Fri, 09 October 2015 17:23 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

You may want to try creating the smallest bundle set possible to achieve your goals. You can do this by commenting out or deleting bundle entries in the /opt/eclipse/kura/kura/config.ini file. At a minimum you will need the API and core bundles. You may also want to try removing all the Kura bundles, to see how much memory the Equinox OSGi container uses by itself. There is another Eclipse project , Concierge [1][2], that aims to be a smaller footprint OSGi container. We haven't fully verified functionality in Kura, but there are instructions in this Readme [3] on running Kura on Concierge.

[1] http://projects.eclipse.org/projects/rt.concierge
[2] http://git.eclipse.org/c/concierge/org.eclipse.concierge.git
[3] https://github.com/JochenHiller/concierge-tests

Thanks,
--Dave
Re: Hardware requirements for Kura and JVM [message #1712164 is a reply to message #1710849] Wed, 21 October 2015 16:10 Go to previous messageGo to next message
Dave Rathnow is currently offline Dave RathnowFriend
Messages: 25
Registered: March 2014
Junior Member
Looks like this project may be dead in the water.

After playing around with the emulator and building a plugin to do some simple Modbus requests to an RTU, I went back to Kura on our little device. As I said, I remove the UsbService from the config.ini and Kura will start. But when I do a "list", I get the following:

ID      State                   Component Name                  Located in bundle
1       Active          org.eclipse.equinox.event                       org.eclipse.equinox.event(bid=7)
2       Active          org.eclipse.kura.deployment.agent                       org.eclipse.kura.deployment.agent(bid=48)
3       Unsatisfied             org.eclipse.kura.core.data.transport.mqtt.MqttDataTransport                     org.eclipse.kura.core(bid=50)
4       Unsatisfied             org.eclipse.kura.system.SystemService                   org.eclipse.kura.core(bid=50)
5       Unsatisfied             org.eclipse.kura.data.DataService                       org.eclipse.kura.core(bid=50)
6       Unsatisfied             org.eclipse.kura.ssl.SslManagerService                  org.eclipse.kura.core(bid=50)
7       Unsatisfied             org.eclipse.kura.db.DbService                   org.eclipse.kura.core(bid=50)
8       Active          org.eclipse.kura.system.SystemAdminService                      org.eclipse.kura.core(bid=50)
9       Active          org.eclipse.kura.certificate.CertificatesService                        org.eclipse.kura.core.certificates(bid=51)
10      Unsatisfied             org.eclipse.kura.cloud.app.command.CommandCloudApp                      org.eclipse.kura.core.cloud(bid=52)
11      Unsatisfied             org.eclipse.kura.cloud.CloudCallService                 org.eclipse.kura.core.cloud(bid=52)
12      Unsatisfied             org.eclipse.kura.cloud.CloudService                     org.eclipse.kura.core.cloud(bid=52)
13      Active          org.eclipse.kura.core.comm.CommConnectionFactory                        org.eclipse.kura.core.comm(bid=53)
14      Unsatisfied             org.eclipse.kura.configuration.ConfigurationService                     org.eclipse.kura.core.configuration(bid=54)
15      Active          org.eclipse.kura.crypto.CryptoService                   org.eclipse.kura.core.crypto(bid=55)
16      Unsatisfied             org.eclipse.kura.core.deployment                        org.eclipse.kura.core.deployment(bid=56)
17      Active          org.eclipse.kura.log.LoggerService                      org.eclipse.kura.core.log(bid=57)
18      Unsatisfied             org.eclipse.kura.clock.ClockService                     org.eclipse.kura.linux.clock(bid=59)
19      Registered              org.eclipse.kura.command.CommandService                 org.eclipse.kura.linux.command(bid=60)
20      Unsatisfied             org.eclipse.kura.net.NetworkService                     org.eclipse.kura.linux.net(bid=61)
21      Unsatisfied             org.eclipse.kura.position.PositionService                       org.eclipse.kura.linux.position(bid=62)
22      Unsatisfied             org.eclipse.kura.watchdog.WatchdogService                       org.eclipse.kura.linux.watchdog(bid=63)
23      Unsatisfied             org.eclipse.kura.net.WifiMonitorService                 org.eclipse.kura.net.admin(bid=64)
24      Unsatisfied             org.eclipse.kura.net.EthernetMonitorService                     org.eclipse.kura.net.admin(bid=64)
25      Unsatisfied             org.eclipse.kura.net.admin.NetworkAdminService                  org.eclipse.kura.net.admin(bid=64)
26      Unsatisfied             org.eclipse.kura.net.admin.NetworkConfigurationService                  org.eclipse.kura.net.admin(bid=64)
27      Unsatisfied             org.eclipse.kura.net.dns.DnsMonitorService                      org.eclipse.kura.net.admin(bid=64)
28      Unsatisfied             org.eclipse.kura.net.CellularMonitorService                     org.eclipse.kura.net.admin(bid=64)

Not a lot of useful stuff left. Removing UsbService bricks Kura because a lot of services have a dependency on the NetworkService, which has a dependency on the UsbService. So unless there is a way to remove NetworkService's dependency on UsbService, there doesn't appear to be much chance of getting Kura to run on this little device.
Re: Hardware requirements for Kura and JVM [message #1712282 is a reply to message #1712164] Thu, 22 October 2015 15:52 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Thanks for the feedback. We are very interested in getting Kura running on these smaller footprint devices. You have certainly hit some issues that I have logged and will add to our development plan. A couple of things:

1. It appears we have a bug in our build process. The "no-networking" installer should not be including the org.eclipse.net.admin bundle. This is why you are seeing all the monitoring bundles related to networking. We will review and address this in our next release. For now, I would remove that bundle from your config.ini file. Although, due to the next item, it won't help much.

2. Your are correct, SystemService depends on NetworkService which depends on UsbService. SystemService is a core bundle you need to run Kura. I reviewed the the UsbService Manifest and the intent is that the bundle should start even if the native library is not available. I have confirmed however that this is not the case.

So, unless you can build the UDEV native libraries for your hardware, you are a bit stuck. We are doing a release of Kura this week, but next week we will start our next development cycle. These issues will certainly be addressed. I will keep this post updated as we find solutions or temporary work arounds.

--Dave
Re: Hardware requirements for Kura and JVM [message #1713642 is a reply to message #1712282] Thu, 05 November 2015 16:34 Go to previous message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

For those still tracking this issue, we have created a bug to track a feature request that would remove native library dependencies on the core bundles of Kura. The bug can be tracked here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=481529 .

Thanks,
--Dave
Previous Topic:Kura doesn't start on IDP XT 3.0 64 bit
Next Topic:update installed package remotely
Goto Forum:
  


Current Time: Thu Apr 25 21:40:37 GMT 2024

Powered by FUDForum. Page generated in 0.04114 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top