eclipse-kura / kura

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.
https://eclipse.dev/kura/
Eclipse Public License 2.0
499 stars 306 forks source link

getEthernetDriver exception in Kura no network version #81

Closed dwoodard1 closed 8 years ago

dwoodard1 commented 8 years ago

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

Original message:

The nn version will throw out an exception when booting up, caused by not able to get EthernetDriver which is used to get eth0 MAC address for default MQTT client-id (if leave empty in UI setting).

Suggest to add ethtool dependency if possible.

dougmeredith commented 8 years ago

I can confirm that I am also encountering this. Stack trace is as follows:

2016-02-05 11:40:16,382 [DataServiceImpl:ReconnectTask] INFO o.e.k.c.d.DataServiceImpl - New session established. Unpublishing all in-flight messages. Disregarding the QoS level, this may cause duplicate messages. 2016-02-05 11:40:16,654 [DataServiceImpl:ReconnectTask] WARN o.e.k.c.c.LifeCyclePayloadBuilder - Error while getting ConnetionIP and ConnectionInterface java.lang.NullPointerException at org.eclipse.kura.linux.net.util.LinuxNetworkUtil.getEthernetDriver(LinuxNetworkUtil.java:984) at org.eclipse.kura.linux.net.util.LinuxNetworkUtil.getInterfaceConfiguration(LinuxNetworkUtil.java:649) at org.eclipse.kura.linux.net.NetworkServiceImpl.getNetworkInterface(NetworkServiceImpl.java:483) at org.eclipse.kura.linux.net.NetworkServiceImpl.getNetworkInterfaces(NetworkServiceImpl.java:370) at org.eclipse.kura.linux.net.NetworkServiceImpl.getActiveNetworkInterfaces(NetworkServiceImpl.java:455) at org.eclipse.kura.core.cloud.LifeCyclePayloadBuilder.buildDeviceProfile(LifeCyclePayloadBuilder.java:158) at org.eclipse.kura.core.cloud.LifeCyclePayloadBuilder.buildBirthPayload(LifeCyclePayloadBuilder.java:51) at org.eclipse.kura.core.cloud.CloudServiceImpl.createBirthPayload(CloudServiceImpl.java:729) at org.eclipse.kura.core.cloud.CloudServiceImpl.publishBirthCertificate(CloudServiceImpl.java:687) at org.eclipse.kura.core.cloud.CloudServiceImpl.setupCloudConnection(CloudServiceImpl.java:656) at org.eclipse.kura.core.cloud.CloudServiceImpl.onConnectionEstablished(CloudServiceImpl.java:400) at org.eclipse.kura.core.data.DataServiceListeners.onConnectionEstablished(DataServiceListeners.java:33) at org.eclipse.kura.core.data.DataServiceImpl.onConnectionEstablished(DataServiceImpl.java:275) at org.eclipse.kura.core.data.transport.mqtt.DataTransportListeners.onConnectionEstablished(DataTransportListeners.java:35) at org.eclipse.kura.core.data.transport.mqtt.MqttDataTransport.connect(MqttDataTransport.java:346) at org.eclipse.kura.core.data.DataServiceImpl$1.run(DataServiceImpl.java:500) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:744)

MMaiero commented 8 years ago

Hi Doug, Are you having this issue in Kura 1.4.0? Thanks. Matteo

dougmeredith commented 8 years ago

Sorry Matteo, I should have specified that upfront. 1.3.0, on Raspbian Jessie, with Oracle 8 JDK from the Raspbian repository.

MMaiero commented 8 years ago

Have you had the chance to test the 1.4.0? (It's not released yet, you have to compile it from source)

MMaiero commented 8 years ago

Closing. It should be fixed in release 1.4.0