Giter VIP home page Giter VIP logo

eclipse / kura Goto Github PK

View Code? Open in Web Editor NEW
485.0 61.0 305.0 367.99 MB

Eclipse Kura™ is a versatile framework to supercharge your edge devices, streamlining the process of configuring your gateway, connecting sensors, and IoT devices to seamlessly collect, process, and send data to the cloud.

Home Page: https://eclipse.dev/kura/

License: Eclipse Public License 2.0

HTML 9.62% Shell 1.16% Java 85.05% Makefile 0.07% C 3.27% CSS 0.09% C++ 0.53% Batchfile 0.01% JavaScript 0.12% Dockerfile 0.03% Python 0.07%
eclipseiot gateway iot internet-of-things java

kura's Introduction

Eclipse Kura™

Kura™ logo

GitHub Tag GitHub

Jenkins Jenkins

What is Eclipse Kura™?

From the maori word for tank/container, Eclipse Kura™ is a versatile software framework designed to supercharge your edge devices. With an intuitive web interface, Eclipse Kura™ streamlines the process of configuring your gateway, connecting sensors, and IoT devices to seamlessly collect, process, and send data to the cloud. Eclipse Kura™ provides an extensible Java API for developing custom plugins within the framework. Additionally, it offers a REST API, enabling the use of Eclipse Kura™ as a backend service in your application.

Eclipse Kura™ runs on an edge gateway, which can be anything from a small SBC(single-board computer) like a Raspberry Pi, or a powerful high-performance computer.

What can Eclipse Kura™ do for me?

  • Kura™ Services: Provision and set up features to run on your gateway, such as an MQTT broker.
  • Kura™ Networking: Manage Network connectivity, including
  • Kura™ Wires: Design data flows and data processing streams effortlessly with a drag-and-drop visual editor.
  • Kura™ Cloud Connectors: Extendable cloud connector system.
  • Kura™ Drivers: Extendable service that handles reading data off of external devices.
  • Kura™ Snapshots: Securely store and re-apply gateway settings for convenience.
  • Kura™ Security: Easily and safely store your secrets.
  • Kura™ Container Orchestrator: Manage Docker or Podman containers on your gateway for ultimate flexibility.
  • Kura™ AI Inference: Run Nvidia Triton Models on the edge.
  • Kura™ Plugins: Add and Extend the framework by adding your own Services, and Drivers.
  • Kura™ REST Service: Embed the framework as a backend in your own edge applications.

I have used Eclipse Kura™ to make a small-scale Edge deployment, how do I scale now?

If you want to scale, and manage many instances of Eclipse Kura™, check out Eclipse Kapua™. Eclipse Kapua™ is a Eclipse Kura™ compatible cloud command and control service that allows you to aggregate data and configure many Eclipse Kura™ devices.

Documentation

  • User Documentation: here you'll find information on how to use Eclipse Kura™ i.e. installation instructions, informations on how to use the web UI and tutorials.
  • Developer Documentation: the Eclipse Kura™ Github Wiki serves as a reference for developers who want to contribute to the Eclipse Kura™ project and/or develop new add-ons. Here you'll find Eclipse Kura™ development/release model, guidelines on how to import internal packages, creating new bundles and development environment tips & tricks.
  • Docker Containers Documentation: the Eclipse Kura™ team also provides Docker containers for the project. Information on how to build and run them are available at the project's Docker Hub page.
  • Developer Quickstart Guide: a quick guide on how to setup the development environment and build the project is also provided in this README.

Additionally, we provide two channels for reporting any issue you find with the project

  • Github Issues: for bug reporting.
  • Github Discussions: for receiving feedback, asking questions, making new proposals and generally talking about the project.

Install

Eclipse Kura™ is compatible with Java 8 and Java 17.

Target Gateways Installers

Eclipse Kura™ provides pre-built installers for common development boards. Check the following link to download the desired installers. Take a look at our documentation for further information on supported platforms and installer types.

Docker Image

Eclipse Kura™ is also available as a Docker container.

Build

Prerequisites

In order to be able to build Eclipse Kura™ on your development machine, you need to have the following programs installed in your system:

  • JDK 1.8
  • Maven 3.5.x

Installing Prerequisites in Mac OS

To install Java 8, download the JDK tar archive from the Adoptium Project Repository.

Once downloaded, copy the tar archive in /Library/Java/JavaVirtualMachines/ and cd into it. Unpack the archive with the following command:

sudo tar -xzf <archive-name>.tar.gz

The tar archive can be deleted afterwards.

Depending on which terminal you are using, edit the profiles (.zshrc, .profile, .bash_profile) to contain:

# Adoptium JDK 8
export JAVA_8_HOME=/Library/Java/JavaVirtualMachines/<archive-name>/Contents/Home
alias java8='export JAVA_HOME=$JAVA_8_HOME'
java8 

Reload the terminal and run java -version to make sure it is installed correctly.

Using Brew you can easily install Maven from the command line:

brew install [email protected]

Run mvn -version to ensure that Maven has been added to the PATH. If Maven cannot be found, try running brew link [email protected] --force or manually add it to your path with:

export PATH="/usr/local/opt/[email protected]/bin:$PATH"

Installing Prerequisites in Linux

For Java

sudo apt install openjdk-8-jdk

For Maven

You can follow the tutorial from the official Maven site. Remember that you need to install the 3.5.x version.

Build Eclipse Kura™

Change to the new directory and clone the Eclipse Kura™ repo:

git clone -b develop https://github.com/eclipse/kura.git

Move inside the newly created directory and build the target platform:

mvn -f target-platform/pom.xml clean install

Build the core components:

mvn -f kura/pom.xml clean install

Build the examples (optional):

mvn -f kura/examples/pom.xml clean install

Build the target profiles:

mvn -f kura/distrib/pom.xml clean install -DbuildAll

Tip

You can skip tests by adding -Dmaven.test.skip=true in the commands above and you can compile a specific target by specifying the profile (e.g. -Praspberry-pi-armhf).

Build scripts

Alternatively, you can use the build scripts available in the root directory.

./build-all.sh

or

./build-menu.sh

and select the profiles you want to build.

Building Eclipse Kura™ Containers

The Eclipse Kura™ container build process currently only supports x86 containers. Following the instructions below will build two containers. One based on Alpine Linux kura-alpine-x86_64, and another on Ubi8 kura-ubi8-x86_64.

Build Eclipse Kura™ as per our instructions. To build the containers you'll need to change the target of the "Build the target profiles" step like the following:

mvn -f kura/distrib/pom.xml clean install -DbuildAllContainers

Note

This build step requires 'docker' to be a executable command on your system. For Instance, if you are using Podman please follow the Emulating Docker Cli Guide before running the command above.

After this command completes, images can be found in your preferred container engine image list.

IDE Setups

We currently support two setups for Eclipse Kura™ development:

  • Eclipse Kura™ Development Environment Setup: This is the full setup allowing you to contribute to the core Eclipse Kura™ project codebase. It will install all the IDE plugins and formatters to have a pleasant development experience and clone the Eclipse Kura™ source code on your workstation.
  • Add-on Development Environment Setup: This setup will allow you to develop applications or bundles running on Eclipse Kura™. It will install only the APIs and the examples and is best suited for developing Eclipse Kura™ add-ons.

Contributing

Contributing to Eclipse Kura™ is fun and easy! To start contributing you can follow our guide here.

kura's People

Contributors

alebianchin avatar amitjoy avatar cdealti avatar ctron avatar darionct avatar dwoodard1 avatar elbert3 avatar fdizazzo avatar ftoure67 avatar gnunzi avatar gregoryivo avatar hekonsek avatar iacco avatar kandrej avatar kubiko avatar lmarshall-eth avatar lucadazi avatar marcellorinaldo avatar markoer avatar mattdibi avatar mcarrer avatar mmaiero avatar nicolatimeus avatar pierantoniomerlino avatar pierrepitiot avatar salvatore-coppola avatar sfiorani avatar spnettec avatar tafitzgerald avatar wes-johnson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kura's Issues

[Camel] "BundleContext is no longer valid" error after restarting/reinstalling Camel+Kura quickstart bundle

2016-04-21 11:55:30,034 [Camel (camel-4) thread #16 - timer://xmltopic] WARN  o.a.c.c.t.TimerConsumer - Error processing exchange. Exchange[ID-raspberrypi-46944-1461238784533-3-136][Message: org.eclipse.kura.message.KuraPayload@7812fb]. Caused by: [org.apache.camel.ResolveEndpointFailedException - Failed to resolve endpoint: seda://myapp:xmltopic due to: Cannot auto create component: seda]
org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: seda://myapp:xmltopic due to: Cannot auto create component: seda
    at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:587)
    at org.apache.camel.impl.DefaultProducerTemplate.resolveMandatoryEndpoint(DefaultProducerTemplate.java:453)
    at org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:229)
    at org.eclipse.kura.camel.camelcloud.CamelCloudClient.doPublish(CamelCloudClient.java:181)
    at org.eclipse.kura.camel.camelcloud.CamelCloudClient.publish(CamelCloudClient.java:90)
    at org.eclipse.kura.camel.cloud.KuraCloudProducer.process(KuraCloudProducer.java:75)
    at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
    at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:141)
    at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
    at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:460)
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
    at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:165)
    at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:73)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)
Caused by: org.apache.camel.RuntimeCamelException: Cannot auto create component: seda
    at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:409)
    at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:385)
    at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:557)
    ... 17 more
Caused by: java.lang.IllegalStateException: BundleContext is no longer valid
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.checkValid(BundleContextImpl.java:931)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getServiceReferences(BundleContextImpl.java:498)
    at org.apache.camel.core.osgi.OsgiComponentResolver.getComponent(OsgiComponentResolver.java:70)
    at org.apache.camel.core.osgi.OsgiComponentResolver.resolveComponent(OsgiComponentResolver.java:64)
    at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:398)
    ... 19 more

a detailed exception should be thrown whenever a component is 'unresolved'

This bug was originally filed at https://bugs.eclipse.org/bugs/show_bug.cgi?id=477275.

Original Message:

there can be many reasons for a component to fail to load, leading to it being 'unresolved'. in two examples:

  1. I had a 'default' access level method named 'activate' which was not defined within the Component.xml
  2. I had a private constructor

.. I had no idea at the time why the component was not loading, only after commenting out line by line did I find my mistakes.

If you are just watching the logs, it appears the platform silently ignores the componeont. Using OSGI console command 'ls' the component will appear 'unresolved' but still no detail as to what failed.

Therefore, if the component is defined via the manifest.mf or indeed, if it has a Component.xml or @component annotation, any reason for it to fail to load should be thrown as an exception.

Hi Paul,

Sorry for the slow reply, I am trying to go through and clean up the list of bugs. For reference, this was also mentioned in this forum post [1].

I am not sure how much Kura can do in these situations, if you have suggestions I am happy to discuss. The intent of the Kura ConfigurationService and Kura ConfigurableComponent was to assist in managing bundle configurations. The framework does not get involved in managing the life cycles of the bundles, leaving this instead to the OSGi container. Since ConfigurationService is tracking all Components within the OSGi container, it is plausible to set up a listener for different events, but this system may become rather complex.

I think to do this correctly, we would need a new service which would use EventAdmin to track OSGi bundle messages. It wouldn't make since to throw exceptions from here, but you could certainly log useful messages.

Let me know what you think.

[1] https://www.eclipse.org/forums/index.php/t/1070255/

Thanks,
--Dave

thanks for getting back david.

since posting this i have learnt to use the 'comp' command within the osgi terminal which gives some further information regarding why a component might be 'unresolved'.

maybe an easier solution with less re-architecting would be just to interrogate the deployment package's components via osgi after the load and log their details?

i'm assuming there is an easy way to do the equivalent of the following from within kura?

osgi> ss mydeployment
[bid] active mybundle
osgi> ls [bid]
[cid] unresolved mycomponent
osgo> comp [cid]

failing something simple like this, maybe just another developer guide document? the above has more or less resolved this issue for me, i just keep two terminals open when testing now.

let me know what you think.

CamelRouter should load core components and languages

Equinox doesn't export OSGi services defined in MANIFEST file. It means that Camel can't resolve components and languages by name without prior manual registration of those.

So apparently equinox ignores [1] exports defined in manifest, as declarative services are supposed to be used to register services.

We could created a dedicated declarative service responsible for registering the components and languages. However such code is hardly testable, as it requires an OSGi environment with SCR support to verify it works. I would prefer to add manual registration of components and languages in KuraRouter.

[1] https://dev.eclipse.org/mhonarc/lists/equinox-dev/msg01090.html

org.eclipse.kura.linux.net.ConnectionInfoImpl is IPv4 only

Throws ClassCastExceptions if you are on a network with IPv6 capabilities - see example below. Even worse - can never work on IPv6 only network. :(

java.lang.ClassCastException: org.eclipse.kura.net.IP6Address cannot be cast to org.eclipse.kura.net.IP4Address at org.eclipse.kura.linux.net.ConnectionInfoImpl.getDnsServers(ConnectionInfoImpl.java:123) at org.eclipse.kura.linux.net.NetworkServiceImpl.getNetInterfaceAddresses(NetworkServiceImpl.java:872) at org.eclipse.kura.linux.net.NetworkServiceImpl.getNetworkInterface(NetworkServiceImpl.java:518) at org.eclipse.kura.linux.net.NetworkServiceImpl.getNetworkInterfaces(NetworkServiceImpl.java:370) at org.eclipse.kura.net.admin.NetworkConfigurationServiceImpl.getNetworkConfiguration(NetworkConfigurationServiceImpl.java:277) at org.eclipse.kura.net.admin.NetworkAdminServiceImpl.getNetworkInterfaceConfigs(NetworkAdminServiceImpl.java:192) at org.eclipse.kura.web.server.GwtNetworkServiceImpl.privateFindNetInterfaceConfigurations(GwtNetworkServiceImpl.java:150) at org.eclipse.kura.web.server.GwtNetworkServiceImpl.findNetInterfaceConfigurations(GwtNetworkServiceImpl.java:107)

[Configuration] Empty Values In Service Properties

If I set the value of a service property to an empty string in the web UI and hit Apply the empty string is accepted and the corresponding service gets the empty string. When KURA gets restarted the value reverts to the default value from the metatype file. If I change the value to a non empty string the value is preserved across a KURA restart.
I'm changing command.working.directory but see the same behaviour on other properties.

Kura Web interface shows no network interfaces

Kura built from commit 983da0e.
Kura installed and running on RaspberryPi. When accessing the web admin interface the Network tabs shows no network interfaces and this stacktrace shows up in kura.log:

java.lang.NoClassDefFoundError: org/eclipse/kura/usb/UsbDevice
at org.eclipse.kura.web.server.GwtNetworkServiceImpl.findNetInterfaceConfigurations(GwtNetworkServiceImpl.java:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at org.eclipse.kura.web.server.OsgiRemoteServiceServlet.service(OsgiRemoteServiceServlet.java:43)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:384)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:350)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
at java.lang.Thread.run(Thread.java:724)

Kura Bluetooth LE support and Bluez 5.x

I'm trying to use the "org.eclipse.kura.linux.bluetooth" module inside a Linux x86 environment (Debian Jessie).

Debian Jessie comes with bluez 5.23 per default and incidentally I'm obliged to stick to the 5.* version because of specific project's requirements.

Using the methods offered by the org.eclipse.kura.linux.bluetooth.le.BluetoothGattImpl class I have noticed that the it tries to parse the output of the "gatttool" interactive shell, but it uses regular expressions that are not compliant with the lines returned by the gatttool shell.

Making a comparison with an installation of bluez4.101 on a different machine I have figured out that Kura's implementation expects that output, thus resulting to be compliant with bluez4.101 and not with bluez5.x (at least for what concerns the BLE layer).

I'd like to know if someone else out there have encountered this same kind of problem and if they have worked it around (and how, possibly :-) ).
At the same time, I'm wondering if a migration (or fork) towards Bluez5.x is planned at all or not.

Any hint will be greatly appreciated, thanks in advance.

CloudCallServiceImpl - call methods setting requester.client.id to #client-id sends response to local device

I just tried using CloudCallServiceImpl to send CONF-V1 requests to a Kura device. It seems to me that there is a bug in that implementation.

On line 122 it sets the requester.client.id to the topic placeholder #client-id. This in turn is send to the remote Kura device which then replaces it with its own client-id when sending the response. Not the intended outcome. This prevents the response from ever being picked up by the sender - it subscribes to the correct topic beforehand (using the same placeholder on line 110.

Before looking into a fix for this - am I missing something here? The problem with fixing this is that the client-id isn't available inside that implementation.

I've tested with manually providing the correct client-id on line 122 and that works properly.

Hints?

Emulator does not run in emulation mode on OSX

When starting the emulator in eclipse on OSX, the emulator says "Framework is not running in emulation mode".
Emulator.java:30 reads the wrong property
String mode=props.getProperty("eurotech.framework.mode");
but the Kura_Emulator_OSX.launch file specifies the correct flag
-Dorg.eclipse.kura.mode=emulator.
Kura_Emulator_Linux.launch has the old eurotech flag.
Kura_Core_Test.launch has the old eurotech flag.
Also the pom.xml of the org.eclipse.kura.core.test project has the old eurotech property specified.

HTTP 404 error on Raspberry

After building Kura from commit 467ee53 and deploying it to Raspberry, accessing the web interface on the device gives

HTTP ERROR: 404

Problem accessing /kura. Reason:

    ProxyServlet: /kura
Powered by Jetty://

I'm using Eclipse Kepler 4.3, Google Web Toolkit SDK 2.6.0 and can't recognize the web project. Is this configuration supported or is GWT 2.4.0 a strict requirement?

edit
using a higher log level for jetty bundle, this is what I see in kura.log

2014-06-04 13:38:01,715 [qtp30188208-24 Selector0] DEBUG o.e.j.i.nio - created SCEP@1156782{l(/10.13.1.58:55240)<->r(/10.13.2.4:80),d=false,open=true,ishut=false,oshut=false,rb=false,wb=false,w=true,i=0}-{AsyncHttpConnection@3e8c76,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-14,l=0,c=0},r=0}
2014-06-04 13:38:01,766 [qtp30188208-21] DEBUG o.e.j.h.HttpParser - filled 452/452
2014-06-04 13:38:01,887 [qtp30188208-21 - /kura] DEBUG o.e.j.s.Server - REQUEST /kura on AsyncHttpConnection@3e8c76,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=37,c=0},r=1
2014-06-04 13:38:01,900 [qtp30188208-21 - /kura] DEBUG o.e.j.s.h.ContextHandler - scope null||/kura @ o.e.j.s.ServletContextHandler{/,null}
2014-06-04 13:38:01,914 [qtp30188208-21 - /kura] DEBUG o.e.j.s.h.ContextHandler - context=||/kura @ o.e.j.s.ServletContextHandler{/,null}
2014-06-04 13:38:01,973 [qtp30188208-21 - /kura] DEBUG o.e.j.s.session - Got Session ID 1lw9vectvn62c106l3lw70jb4v from cookie
2014-06-04 13:38:01,984 [qtp30188208-21 - /kura] DEBUG o.e.j.s.session - sessionManager=org.eclipse.jetty.server.session.HashSessionManager@7b6c50
2014-06-04 13:38:01,986 [qtp30188208-21 - /kura] DEBUG o.e.j.s.session - session=null
2014-06-04 13:38:02,006 [qtp30188208-21 - /kura] DEBUG o.e.j.s.ServletHandler - servlet ||/kura -> org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet-31403932
2014-06-04 13:38:02,008 [qtp30188208-21 - /kura] DEBUG o.e.j.s.ServletHandler - chain=null
2014-06-04 13:38:02,167 [qtp30188208-21 - /kura] DEBUG o.e.j.s.Server - RESPONSE /kura  404
2014-06-04 13:38:02,190 [qtp30188208-21] DEBUG o.e.j.s.AsyncHttpConnection - Enabled read interest SCEP@1156782{l(/10.13.1.58:55240)<->r(/10.13.2.4:80),d=true,open=true,ishut=false,oshut=false,rb=false,wb=false,w=true,i=0r}-{AsyncHttpConnection@3e8c76,g=HttpGenerator{s=4,h=0,b=0,c=-1},p=HttpParser{s=0,l=37,c=0},r=1}
2014-06-04 13:38:02,244 [qtp30188208-21] DEBUG o.e.j.h.HttpParser - filled 0/0

Easy Installation of Development Environment

To ease the setup of Development Environment, an Oomph Catalogue can be provided. Many eclipse projects, for instance, E4 Tools, EMF provide Oomph Catalogues for a hassle free development environment setup.

Another solution could be to create an Yatta Profile to package an Eclipse Installation which abstracts all the required steps for Development Environment setup.

[website] Images in "Solution Showcases" should be clickable

This bug was originally filed at https://bugs.eclipse.org/bugs/show_bug.cgi?id=456781.

Original Message:

The new "Solution Showcases" section is very cool!
It would be great if the images were clickable in addition to the text, since I believe many people are trying to click on them as a first intent.

A related suggestion would be to put the labels below the images rather than next to them, and center the text. It would probably give more white space and make it clearer which "button" goes with which label.

Increase Configurability of CloudService

This bug was originally filed at https://bugs.eclipse.org/bugs/show_bug.cgi?id=481526.

Original Message:

Some users of Kura have found the static settings of the CloudService to restrictive. This bug is to track the proposal to expose more internal settings of the CloudService. Below is a listing of options to expose. Please use this bug to suggest additional options to expose or options to remove from the list.

  • TOPIC_CONTROL_PREFIX - Already added via pull request: #64
  • LIFECYCLE_RETAIN - Allow lifecycle messages to be retained for applications not using persistent storage.
  • LIFECYCLE_PRIORITY - Specify priority of lifecycle messages.
  • LIFECYCLE_QOS - Specify QOS of lifecycle messages.

Thanks,
--Dave

  • LIFECYCLE_RETAIN - Allow lifecycle messages to be retained for applications not using persistent storage.

I'm not sure this is a good idea because the broker will store the last message for each of the lifecycle messages. They are published on different topics so a connecting subscriber will receive the last birth and disconnect message in no particular order and won't be able to derive if the device is connected or not.

Also, it's difficult to reset the retain behavior because the device will have to publish an empty payload on the retained topic.

  • LIFECYCLE_PRIORITY - Specify priority of lifecycle messages.

In order to work correctly, the lifecycle messages need to be published immediately, overtaking the outstanding messages stored by the DataService.

  • LIFECYCLE_QOS - Specify QOS of lifecycle messages.
    You want the lifecycle message to be published in the current MQTT session or never. If they were published with QoS > 0 and the connection is lost before they are acknowledged by the broker, either Kura or Paho will republish them on reconnect. However on reconnect a new lifecycle message, the birth certificate, will be published. For this reason we use QoS == 0 for lifecycle messages.

Data Service will not connect for other locale than an english one

This bug was originally filed at: https://bugs.eclipse.org/bugs/show_bug.cgi?id=463915.

Message from original bug:

The data service will not start up/connect once you have a non-english locale defined, since it searches for the keyword „"metric" within the output of ifconfig . Unfortunately if you have another locale configured, for example german, ifconfig returns "metrik" (german word for metric) and kura fails to parse the output and throws a runtime exception (StringIndexOutOfBoundsException) so that the data service is not available. After changing the locale with raspi-config everything worked fine.

Happened to me on a raspberry pi with raspbian installed.

Also see my blog: http://icanseedeadcats.com/2015/03/24/eclipse-iot-challenge-mqtt-communication-for-hot-desks-featuring-kura-mosquitto-and-paho-and-project-wrapup/

Below is a snippet of the stacktrace:

2015-03-21 20:39:28,330 [Component Resolve Thread (Bundle 6)] ERROR o.e.k.c.d.t.
m.MqttDataTransport - Invalid client configuration. Service will not be able to connect until the configuration is updated
java.lang.StringIndexOutOfBoundsException: String index out of range: -49
at java.lang.String.substring(String.java:1911)
at org.eclipse.kura.linux.net.util.LinuxNetworkUtil.getCurrentMtu(LinuxNetworkUtil.java:294)
at org.eclipse.kura.linux.net.NetworkServiceImpl.getNetworkInterface(NetworkServiceImpl.java:439)
at org.eclipse.kura.linux.net.NetworkServiceImpl.getNetworkInterfaces(NetworkServiceImpl.java:314)
at org.eclipse.kura.core.system.SystemServiceImpl.getPrimaryMacAddress(SystemServiceImpl.java:377)
at org.eclipse.kura.core.data.transport.mqtt.MqttDataTransport.buildConfiguration(MqttDataTransport.java:633)

Kura NN should not depend on ethtool, bind9, isc-dhcp-server, hostapd

This bug was originally filed at https://bugs.eclipse.org/bugs/show_bug.cgi?id=476616.

Original Message:

Unless I'm missing something, I believe the "no network" .deb package should not be depending on any networking tool, right?

Agree.
However, just one exception, it seems that ethtool is still needed for LinuxNetworkUtil bundle to get ethernet MAC address for kura MQTT default client-id.

I am going to use this bug to track bug fixes for the NN installation packages. At present, not only are the networking system dependencies required, but the networking bundles are also being installed and started. This is not the correct behavior and should be corrected.

Thanks,
--Dave

Cannot connect to OSGi console

I build Kura according to instruction (clone git, mvn clean install), copy the resulting kura-raspberry-pi-jars_0.2.0-SNAPSHOT.zip to my RPi, then unzip the content to /opt/eclipse. But when I run Kura (sudo sh /opt/eclipse/kura/bin/start_kura_background.sh), I cannot connect to the OSGi console (connection refused). In the log file, I see that there is problem with jetty server and port 5002:

!MESSAGE Bundle org.eclipse.equinox.http.jetty_3.0.0.v20120522-1841 [20] is not active. Cannot start telnet. Reason: Port 5002 already in use. java.lang.Exception: Port 5002 already in use

Seems like there is problem with resulting build package for raspberry pi?

Consider providing a Maven archetype for Kura bundle scaffolding

This bug was originally filed at https://bugs.eclipse.org/bugs/show_bug.cgi?id=440544.

Original message:

I don't know what are the plans regarding a possible contribution of PDE plug-ins that would ease the creation of new Kura bundles from the Eclipse IDE, but it would be really great to have some basic tools helping in bootstrapping a Kura bundle. Maybe a Maven archetype would be even better than PDE tooling since it would virtually allow to rely on command-line only for building one's first Hello World.

I'm thinking of things like:

  • setup the bundle so as it has one dummy component already configurable over ConfigAdmin (xml file in OSGI-INF/metatype/xxx is already there, component has a service.pid, etc.)
  • setup the pom.xml so as the Maven project is by default belonging to a parent POM already bringing the Tycho settings, dependency to Kura target platform, etc...
  • setup the bundle so as it's properly hooked up to an sl4j logger

Icing on the cake would be other archetypes (or archetype parameters) to automatically generate the plumbing for having e.g. a component hooked up to the DataService, or CloudService, etc.

ping :)
I wonder if someone in the community as done something similar already, maybe?

Hi Benjamin,

I think this is a very useful idea. Is there useful documentation on how to create these types of PDE plugins? I will to try and gauge the effort behind doing this.

Thanks,
--Dave

Unable to add same open port in firewall for tcp and udp

This bug was originally posted at https://bugs.eclipse.org/bugs/show_bug.cgi?id=459361.

Original message:

I use kura on debian (PI) and I try to open port 514 in the firewall config page for both udp and tcp.

After I add entry 514 / udp/ eth0, save, apply, all ok, I try to do the same for 514 / tcp / eth 0.

On Submit I get the error Duplicate Entry - Not adding to the list of Open Port.

Looks like primary key is wrong.

Ilya,

Can you check on this behavior?

Thanks,
--Dave

Errors after Importing into Eclipse

Hi there,

I could maven build Kura successfully on my computer. But after imported into Eclipse,
lots of errors showed up. I couldn't find files listed below.

org.eclipse.kura.web.client.messages.Messages;
org.eclipse.kura.web.shared.service.GwtComponentServiceAsync;
org.eclipse.kura.web.shared.service.GwtDeviceServiceAsync;
org.eclipse.kura.web.shared.service.GwtNetworkServiceAsync;
org.eclipse.kura.web.shared.service.GwtPackageServiceAsync;
org.eclipse.kura.web.shared.service.GwtSettingServiceAsync;
org.eclipse.kura.web.shared.service.GwtSnapshotServiceAsync;
org.eclipse.kura.web.shared.service.GwtStatusServiceAsync;

I did follow the guide on the main page. Thank you!

Multiple bluetooth le devices connection problem

This bug was original reported at https://bugs.eclipse.org/bugs/show_bug.cgi?id=480434.

Original messages:

In the release version 1.2.2 or version 1.3.0 RC1, one bluetooth le device (e.g. TI SensorTag) works well, but if you try to connect 2 or more bluetooth le devices, the second one couldn't connect. However, due to bluetooth specs, it should be OK to connect several bluetooth le devices at the same time.

GitHub Pull Request 66 created by [gavinying]
#66

Cannot compile on OSX

I'm running "mvn -e -Dmaven.test.skip=true -f manifest_pom.xml clean install && mvn -f manifest_pom.xml" in the kura folder. My java version is

java version "1.7.0_65"

[INFO] --- tycho-compiler-plugin:0.20.0:compile (default-compile) @ org.eclipse.kura.core ---
[INFO] Compiling 27 source files to /Users/kread/git/kura/kura/org.eclipse.kura.core/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] kura .............................................. SUCCESS [19.499s]
[INFO] Kura Target Definition ............................ SUCCESS [0.213s]
[INFO] org.eclipse.kura.api .............................. SUCCESS [6.986s]
[INFO] org.eclipse.kura.test ............................. SUCCESS [0.480s]
[INFO] org.eclipse.kura.core ............................. FAILURE [0.353s]
[INFO] org.eclipse.kura.core.cloud ....................... SKIPPED
[INFO] org.eclipse.kura.core.comm ........................ SKIPPED
[INFO] org.eclipse.kura.core.configuration ............... SKIPPED
[INFO] org.eclipse.kura.core.crypto ...................... SKIPPED
[INFO] org.eclipse.kura.deployment.agent ................. SKIPPED
[INFO] org.eclipse.kura.core.deployment .................. SKIPPED
[INFO] org.eclipse.kura.core.net ......................... SKIPPED
[INFO] org.eclipse.kura.emulator ......................... SKIPPED
[INFO] org.eclipse.kura.core.test ........................ SKIPPED
[INFO] org.eclipse.kura.deployment.customizer ............ SKIPPED
[INFO] org.eclipse.kura.deployment.update ................ SKIPPED
[INFO] org.eclipse.kura.linux.clock ...................... SKIPPED
[INFO] org.eclipse.kura.linux.command .................... SKIPPED
[INFO] org.eclipse.kura.linux.net ........................ SKIPPED
[INFO] org.eclipse.kura.linux.net.test ................... SKIPPED
[INFO] org.eclipse.kura.linux.position ................... SKIPPED
[INFO] org.eclipse.kura.linux.usb ........................ SKIPPED
[INFO] org.eclipse.kura.linux.watchdog ................... SKIPPED
[INFO] org.eclipse.kura.net.admin ........................ SKIPPED
[INFO] org.eclipse.kura.protocol.modbus .................. SKIPPED
[INFO] org.eclipse.kura.protocol.modbus.test ............. SKIPPED
[INFO] examples .......................................... SKIPPED
[INFO] org.eclipse.kura.demo.heater ...................... SKIPPED
[INFO] org.eclipse.kura.demo.modbus ...................... SKIPPED
[INFO] org.eclipse.kura.example.project .................. SKIPPED
[INFO] org.eclipse.kura.example.publisher ................ SKIPPED
[INFO] org.eclipse.kura.example.serial.publisher ......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37.295s
[INFO] Finished at: Thu Jul 17 10:02:40 CEST 2014
[INFO] Final Memory: 28M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.20.0:compile (default-compile) on project org.eclipse.kura.core: Compilation failure: Compilation failure:
[ERROR] /Users/kread/git/kura/kura/org.eclipse.kura.core/src/main/java/org/eclipse/kura/core/ssl/SSLSocketFactoryWrapper.java:[141]
[ERROR] sslParams.setEndpointIdentificationAlgorithm("HTTPS");
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The method setEndpointIdentificationAlgorithm(String) is undefined for the type SSLParameters
[ERROR] 1 problem (1 error)
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.20.0:compile (default-compile) on project org.eclipse.kura.core: Compilation failure

Intel Edison with Networking Support

Kura with networking support does not work properly with the latest Intel Edison image. Two issues identified thus far:

  1. The installation uses the single WiFi interface to set the Edison up as a WiFi Access Point. If a client connects to the access point, the web UI (172.16.1.1:8080/kura) is not operating correctly. The services are not available to configure Kura.
  2. The DataTransportService is not being activated correctly. This is likely related to item 1.

Kura: v1.3.0
Intel Edison: Linux edison 3.10.17-poky-edison+

--Dave

iwScantool.java sets invalid values on WifiAccessPoints strength property

This bug was originally filed as: https://bugs.eclipse.org/bugs/show_bug.cgi?id=474906.

Original message:

The WifiAccessPoint interface says for getStrenght() method: "The current signal quality of the access point, in percent."

http://download.eclipse.org/kura/releases/1.2.0/docs/apidocs/org/eclipse/kura/net/wifi/WifiAccessPoint.html#getStrength()

This does not match when using iwScanTool to look for WifiAccessPoint, since the implementation of "iwScantool.java" around line 362
else if(line.contains("signal:")) {
try {
//signal: -56.00 dBm
StringTokenizer st = new StringTokenizer(line, " ");
st.nextToken(); //eat signal:
final String strengthRaw = st.nextToken();
if (strengthRaw.contains("/")) {
// Could also be of format 39/100
final String[] parts = strengthRaw.split("/");
strength = (int) Float.parseFloat(parts[0]);
} else {
strength = Math.abs((int)Float.parseFloat(strengthRaw));
}
} catch (RuntimeException e) {
s_logger.debug("Cannot parse signal strength " + line);
}
}

sets a better strenght to worse signal.
-56 dBm (good) --> 56 percent (bad)
-80 dBm (bad) --> 80 percent (good)
This could potentially go over 100.

Ignore welcome message for Camel SCR XML routes

We should support certain welcome message for Camel SCR XML routes. For example "...Insert XML Camel route...". This message should be displayed in the Kura web UI, but should not be parsed by Camel module.

Concurrency problem in deployment agent service ?

This bug was originally filed at https://bugs.eclipse.org/bugs/show_bug.cgi?id=480484.

Original Message:

Hi guys !

We faced of a serious problem with the Deployment Agent service (in all version)

Sometimes this service is blocked and don't deploy our ".dp". Last log we have from the service is :

2015-10-23 12:59:23,389 [Component Resolve Thread (Bundle 6)] INFO o.e.k.d.a.i.DeploymentAgent - Deploying package name io.stemys.kura.application.shopfloor at URL file:/opt/eclipse/kura/kura/packages/io.stemys.kura.application.shopfloor-0.2.0.dp

And nothing else.

When it's works we have the next log message :

2015-10-23 12:59:23,392 [DeploymentAgent] INFO o.e.k.d.a.i.DeploymentAgent - About to install package at URL file:/opt/eclipse/kura/kura/packages/io.stemys.kura.application.shopfloor-0.2.0.dp

It's really random. We look at the code to see what is between these two log messages and we think the problem come from the synchronized part on "m_instPackageUrls"

The synchronized part on a ConcurrentLinkedQueue is really necessary ? We remove it and the problem was resolved for us.

We never saw this problem before but now that we installed Kura on a powerfull device (core i7 / 16 Gb ram / SSD / ...) we have the problem.

Thanks in advance for your job !

Hello,

It is hard to comment on this without knowing your application. I believe the synchronization block is necessary when attempting to install the deployment package. A couple of questions:

  1. When you see this issue, are you also getting error in the log files (/var/log/kura.log and /var/log/kura-console.log)?
  2. Do you have any potential long running processes in your bundle activate methods? This can often cause issues when activating bundles.

Thanks,
--Dave

Stopping Kura with Monit

This bug was originally reported at https://bugs.eclipse.org/bugs/show_bug.cgi?id=450214.

Original message:

At present, when stopping Kura, the init.d script telnets into the OSGi container and stops the framework. If Monit is being used to control Kura, it will restart the framework when it detects the missing process. The init.d script should be enhanced to correctly shutdown Kura even if controlled by Monit.

--Dave

org.eclipse.soda.dk.comm_1.2.0.jar cannot resolve on 64 bit OSX Kura Emulator

org.eclipse.soda.dk.comm library doesn't start on 64bit OSX emulator, giving this error in console.

!SESSION 2014-06-04 11:02:14.567 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Command-line arguments:  -dev file:/Users/ale/dev/workspaces/ws-kura-snapshot/.metadata/.plugins/org.eclipse.pde.core/Kura_Emulator_OSX/dev.properties -os macosx -ws cocoa -arch x86_64 -consoleLog -console

!ENTRY org.eclipse.osgi 2 0 2014-06-04 11:02:22.138
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-06-04 11:02:22.139
!MESSAGE Bundle initial@reference:file:org.eclipse.soda.dk.comm_1.2.0.jar was not resolved.
!SUBENTRY 2 org.eclipse.soda.dk.comm 2 0 2014-06-04 11:02:22.139
!MESSAGE Missing native code match lib/linux/x86/libdkcomm.so; processor=x86; osname=Linux, lib/linux/x86_64/libdkcomm.so; processor=x86-64; osname=Linux, lib/linux/armv6_hf/libdkcomm.so; processor=ARM; osname=Linux; selection-filter="(&(kura.arch=armv7_hf))", lib/linux/armv5_sf/libdkcomm.so; processor=ARM; osname=Linux; selection-filter="(&(kura.arch=armv7_sf))", lib/linux/armv6_hf/libdkcomm.so; processor=ARM; osname=Linux; selection-filter="(&(kura.arch=armv6_hf))", lib/linux/armv5_sf/libdkcomm.so; processor=ARM; osname=Linux; selection-filter="(&(kura.arch=armv6_sf))", lib/linux/armv5_sf/libdkcomm.so; processor=ARM; osname=Linux; selection-filter="(&(kura.arch=armv5_sf))", lib/mac/x86/libdkcomm.jnilib; processor=x86; osname=MacOSX.

Accessing serial devices from emulator (OSX 64bit/Eclipse Kepler 64bit)

I have some troubles instantiating a serial connection to a modbus device using the emulator. The hardware is a Serial-to-USB FTDI cable with a modbus device attached.
This works on the raspberry (I see the FTDI cable as /dev/ttyUSB0) and the modbus data connection is fine.

However if I try to use the same FTDI cable on my development machine things don't work.
In my "Run configuration" I specified the VM argument: -Dkura.ext.dir=/Users/ale/dev/tmp/ to a directory containing javax.comm.rxtx.properties file declaring the serial port (/dev/tty.usbserial-FTWDSO8Z).
When I try to access the port Kura says it doesn't exist:

16:00:55,119 [Component Resolve Thread (Bundle 47)] WARN  ModbusProtocolException:236  - Could not load Exception Messages Bundle for Locale en_US
org.eclipse.kura.protocol.modbus.ModbusProtocolException: Generic Error - CONNECTION_FAILURE: {1} {2} {3} {4} {5} null
at org.eclipse.kura.protocol.modbus.ModbusProtocolDevice$SerialCommunicate.<init>(ModbusProtocolDevice.java:425)
at org.eclipse.kura.protocol.modbus.ModbusProtocolDevice.configureConnection(ModbusProtocolDevice.java:263)
at my.bundle.serial.AbstractModbusSerialReader.<init>(AbstractModbusSerialReader.java:63)
at my.bundle.serial.Sdm630SerialReader.<init>(Sdm630SerialReader.java:39)
at my.bundle.serial.SerialReaderFactory.createSerialReader(SerialReaderFactory.java:61)
at my.bundle.Dispatcher.doUpdate(Dispatcher.java:210)
at my.bundle.Dispatcher.activate(Dispatcher.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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.getEligible(Resolver.java:343)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
at org.eclipse.equinox.internal.ds.InstanceProcess.registerService(InstanceProcess.java:536)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:213)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:386)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:225)
at org.eclipse.equinox.internal.ds.InstanceProcess.disposeInstances(InstanceProcess.java:356)
at org.eclipse.equinox.internal.ds.InstanceProcess.disposeInstances(InstanceProcess.java:306)
at org.eclipse.equinox.internal.ds.Resolver.disposeComponentConfigs(Resolver.java:717)
at org.eclipse.equinox.internal.ds.Resolver.disableComponents(Resolver.java:693)
at org.eclipse.equinox.internal.ds.SCRManager.processConfigurationEvent(SCRManager.java:359)
at org.eclipse.equinox.internal.ds.SCRManager.processConfigurationEvent(SCRManager.java:303)
at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:91)
at org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:70)
Caused by: java.io.IOException: javax.comm.NoSuchPortException
at org.eclipse.kura.core.comm.CommConnectionFactory.createConnection(CommConnectionFactory.java:62)
at org.eclipse.kura.protocol.modbus.ModbusProtocolDevice$SerialCommunicate.<init>(ModbusProtocolDevice.java:423)
... 45 more
Caused by: javax.comm.NoSuchPortException
at javax.comm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:106)
at org.eclipse.kura.core.comm.CommConnectionImpl.<init>(CommConnectionImpl.java:85)
at org.eclipse.kura.core.comm.CommConnectionFactory.createConnection(CommConnectionFactory.java:59)
... 46 more

Manually adding the port causes a different error. In Emulator project MANIFEST.MF I added to Import-Package section the following: javax.microedition.io, javax.comm;version="1.2.0"
and in Emulator.java I added the following line at the end of activate() method: CommPortIdentifier.addPortName("/dev/tty.usbserial-FTWDSO8Z", CommPortIdentifier.PORT_SERIAL, null);

javax.comm.UnsupportedCommOperationException
at org.eclipse.soda.dk.comm.NSSerialPort.setSerialPortParams(NSSerialPort.java:1288)
at org.eclipse.kura.core.comm.CommConnectionImpl.<init>(CommConnectionImpl.java:92)
at org.eclipse.kura.core.comm.CommConnectionFactory.createConnection(CommConnectionFactory.java:59)
at org.eclipse.kura.protocol.modbus.ModbusProtocolDevice$SerialCommunicate.<init>(ModbusProtocolDevice.java:423)
at org.eclipse.kura.protocol.modbus.ModbusProtocolDevice.configureConnection(ModbusProtocolDevice.java:263)
at my.bundle.serial.AbstractModbusSerialReader.<init>(AbstractModbusSerialReader.java:63)
at my.bundle.serial.Sdm630SerialReader.<init>(Sdm630SerialReader.java:39)
at my.bundle.serial.SerialReaderFactory.createSerialReader(SerialReaderFactory.java:61)
at my.bundle.Dispatcher.doUpdate(Dispatcher.java:210)
at my.bundle.Dispatcher.activate(Dispatcher.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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.getEligible(Resolver.java:343)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
at org.eclipse.equinox.internal.ds.InstanceProcess.registerService(InstanceProcess.java:536)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:213)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
at org.eclipse.equinox.internal.ds.InstanceProcess.registerService(InstanceProcess.java:536)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:213)
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.processConfigurationEvent(SCRManager.java:363)
at org.eclipse.equinox.internal.ds.SCRManager.processConfigurationEvent(SCRManager.java:303)
at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:91)
at org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:70)

Trying to use the port gives

org.eclipse.kura.protocol.modbus.ModbusProtocolException: Generic Error - CONNECTION_FAILURE: {1} {2} {3} {4} {5} null
at org.eclipse.kura.protocol.modbus.ModbusProtocolDevice$SerialCommunicate.<init>(ModbusProtocolDevice.java:436)
at org.eclipse.kura.protocol.modbus.ModbusProtocolDevice.configureConnection(ModbusProtocolDevice.java:263)
at my.bundle.serial.AbstractModbusSerialReader.<init>(AbstractModbusSerialReader.java:63)
at my.bundle.serial.Sdm630SerialReader.<init>(Sdm630SerialReader.java:39)
at my.bundle.serial.SerialReaderFactory.createSerialReader(SerialReaderFactory.java:61)
at my.bundle.Dispatcher.doUpdate(Dispatcher.java:210)
at my.bundle.Dispatcher.activate(Dispatcher.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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.getEligible(Resolver.java:343)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
at org.eclipse.equinox.internal.ds.InstanceProcess.registerService(InstanceProcess.java:536)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:213)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
at org.eclipse.equinox.internal.ds.InstanceProcess.registerService(InstanceProcess.java:536)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:213)
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.processConfigurationEvent(SCRManager.java:363)
at org.eclipse.equinox.internal.ds.SCRManager.processConfigurationEvent(SCRManager.java:303)
at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:91)
at org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:70)
Caused by: java.lang.NullPointerException
at org.eclipse.soda.dk.comm.NSSerialPort.getInputStream(NSSerialPort.java:604)
at org.eclipse.kura.core.comm.CommConnectionImpl.openInputStream(CommConnectionImpl.java:115)
at org.eclipse.kura.protocol.modbus.ModbusProtocolDevice$SerialCommunicate.<init>(ModbusProtocolDevice.java:433)
... 47 more 

My Java:
$> java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

My Eclipse:
$> file Eclipse.app/Contents/MacOS/eclipse
Eclipse.app/Contents/MacOS/eclipse: Mach-O 64-bit executable x86_64

My machine (OSX 10.9.3):
$> uname -a
Darwin Alessandros-MacBook-Pro.local 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64

Am I missing something? What else can I do to help resolve the issue?

Thank you.

Pure Java Kura

This bug was originally filed at https://bugs.eclipse.org/bugs/show_bug.cgi?id=481529.

Original Message:

This bug will track a feature request to create a minimal version of Kura with no native code dependencies. At present, the SystemService in Kura depends on native libraries to start. This dependency restricts the possibility of running Kura on very resource constrained devices. This request will remove native library dependency on core Kura bundles.

Thanks,
--Dave

Does "Pure Java Kura" mean that it must be OS independent? This would also require removing references to OS system files (e.g. /etc/) or spawning external processes via Runtime.exec() or similar.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.