missing clientId causes MQTT error, no web interface in local emulation [message #1724983] |
Sun, 28 February 2016 14:41 |
Adam Rossi Messages: 3 Registered: February 2016 |
Junior Member |
|
|
Howdy folks. I am brand new to Kura. Very intriguing project!
My setup: Kura 1.4.0 Developers Workspace (Extended), Ubuntu 15.10, Oracle JDK 1.8.0_74
I followed the Getting Started Guide to the letter, with the possible exception being that I am running on the Oracle 1.8 JDK. After completing the Hello World Example, I run the Kura Emulator and get a HTTP ERROR 404 Problem accessing /. Reason: ProxyServlet: /. I increased log level to DEBUG and see one exception:
09:18:31,905 [Component Resolve Thread] ERROR MqttDataTransport:188 - Invalid client configuration. Service will not be able to connect until the configuration is updated
java.lang.IllegalStateException: Invalid MQTT client configuration
Caused by: org.eclipse.kura.KuraException: The configuration attribute clientId is required and no value has been specified.
Which then causes a bunch of DataPulbisherService not connected errors for the "Heater" sample app.
How should I go about debugging this (and future) issues in local emulator mode? Is there some specific logging I should enable to better understanding of what is going on under the hood? I do not see logs in /var/log/kura, which I attribute to running in emulation. Is there any documentation that shows how the container loads, where it gets its config, and the order of execution? I have good expertise in Java EE but am totally new to the OSGI plugin concept.
Thanks! Regards, Adam
The output from the ss command is:
osgi> ss
"Framework is launched."
id State Bundle
0 ACTIVE org.eclipse.osgi_3.8.1.v20120830-144521
1 ACTIVE org.eclipse.equinox.console_1.0.0.v20120522-1841
2 ACTIVE org.eclipse.kura.core.comm_1.0.2
3 ACTIVE org.eclipse.soda.dk.comm_1.2.1
4 ACTIVE org.eclipse.kura.emulator.position_1.0.0
5 ACTIVE org.eclipse.equinox.io_1.0.400.v20120522-2049
6 ACTIVE org.eclipse.equinox.util_1.0.400.v20120522-2049
7 ACTIVE org.apache.commons.io_2.4.0
8 ACTIVE org.eclipse.kura.web_1.0.7
9 ACTIVE org.eclipse.equinox.http.servlet_1.1.300.v20120522-1841
10 ACTIVE org.eclipse.kura.core_1.0.7
11 ACTIVE org.eclipse.jetty.continuation_8.1.3.v20120522
12 ACTIVE org.eclipse.kura.core.net_1.0.7
13 ACTIVE org.eclipse.kura.emulator.usb_1.0.0
14 ACTIVE org.eclipse.kura.core.cloud_1.0.7
15 ACTIVE org.eclipse.equinox.metatype_1.2.0.v20120522-1841
16 ACTIVE org.apache.commons.fileupload_1.2.2.v20111214-1400
17 ACTIVE org.apache.commons.net_3.1.0.v201205071737
18 ACTIVE org.eclipse.kura.core.crypto_1.0.3
19 ACTIVE com.google.protobuf_2.6.0
20 ACTIVE javax.servlet_3.0.0.v201112011016
21 ACTIVE org.eclipse.kura.api_1.0.7
22 ACTIVE com.gwt.user_0.2.0
23 ACTIVE org.eclipse.jetty.servlet_8.1.3.v20120522
24 ACTIVE org.eclipse.kura.emulator.watchdog_1.0.0
25 ACTIVE usb4java-javax_1.0.0
26 ACTIVE org.eclipse.kura.core.certificates_1.0.2
27 ACTIVE org.eclipse.jetty.http_8.1.3.v20120522
28 ACTIVE org.apache.felix.deploymentadmin_0.9.5
29 ACTIVE org.eclipse.jetty.server_8.1.3.v20120522
30 RESOLVED slf4j.log4j12_1.6.0
Master=42
31 ACTIVE org.eclipse.jetty.io_8.1.3.v20120522
32 ACTIVE org.eclipse.osgi.services_3.3.100.v20120522-1822
33 ACTIVE org.apache.felix.gogo.runtime_0.8.0.v201108120515
34 ACTIVE org.eclipse.kura.example.hello_osgi_1.0.0.qualifier
35 ACTIVE osgi.cmpn_4.3.0.201111022214
36 ACTIVE org.eclipse.kura.emulator.clock_1.0.0
37 ACTIVE org.eclipse.kura.emulator.gpio_1.0.1
38 ACTIVE log4j_1.2.17
Fragments=46
39 ACTIVE org.eclipse.kura.deployment.agent_1.0.5
40 ACTIVE org.eclipse.paho.client.mqttv3_1.0.1
41 ACTIVE org.eclipse.kura.emulator.net_1.0.0
42 ACTIVE slf4j.api_1.6.4
Fragments=30
43 ACTIVE org.apache.felix.gogo.shell_0.8.0.v201110170705
44 ACTIVE org.eclipse.equinox.ds_1.4.0.v20120522-1841
45 ACTIVE org.eclipse.jetty.util_8.1.3.v20120522
46 RESOLVED log4j.apache-log4j-extras_1.1.0
Master=38
47 ACTIVE org.apache.commons.lang3_3.4.0
48 ACTIVE org.usb4java_1.0.0
49 ACTIVE org.eclipse.kura.core.status_1.0.1
50 ACTIVE org.eclipse.kura.emulator_1.0.5
51 ACTIVE org.eclipse.jetty.security_8.1.3.v20120522
52 ACTIVE org.eclipse.kura.demo.heater_1.0.2.qualifier
53 ACTIVE org.eclipse.equinox.http.jetty_3.0.0.v20120522-1841
54 ACTIVE org.hsqldb.hsqldb_2.3.0
55 ACTIVE org.eclipse.equinox.event_1.2.200.v20120522-2049
56 ACTIVE org.eclipse.osgi.util_3.2.300.v20120522-1822
57 ACTIVE org.eclipse.kura.core.configuration_1.0.6
58 ACTIVE org.apache.felix.dependencymanager_3.0.0
59 ACTIVE org.json_1.0.0.v201011060100
60 ACTIVE org.eclipse.equinox.cm_1.0.400.v20120522-1841
[Updated on: Mon, 29 February 2016 14:46] Report message to a moderator
|
|
|
Re: missing clientId causes MQTT error, no web interface in local emulation [message #1725123 is a reply to message #1724983] |
Tue, 01 March 2016 02:14 |
Adam Rossi Messages: 3 Registered: February 2016 |
Junior Member |
|
|
Hey folks, let me reply to my own post for anyone else in the future looking to solve this.
I might have missed this in the "Getting Started" Guide I was following, but the original error I was experiencing of not being able to bring up the web interface was due to missing Linux packages. From the Eclipse Wiki:
Kura depends on several Linux packages available in the Raspbian repository. These packages are:
hostapd - Services for access point management.
bind9 - Services for DNS management.
isc-dhcp-server - Set of tools for managing a DHCP server.
iw - Set of wireless tools.
monit - System monitoring service.
dos2unix - Tool for converting files written in Windows to Linux format.
telnet - user interface to the TELNET protocol.
https://wiki.eclipse.org/Kura/Raspberry_Pi
I needed to add these to my ubuntu host to be able to see the web interface in emulation mode.
I am experiencing some errors in the interface, and do not see a log showing up in /var/log/kura as the documentation references. The log4j.properties file that comes with the Kura 1.4 Developers Workspace Extended Download (org.eclipse.kura.emulator src/main/resources/log4j.properties) is repeated below. Can anyone tell me how to get good logs enabled so I can "learn to fish" as they say? I am getting more output on stdout with DEBUG, but I must be missing things like error logs, because I am getting errors in the web interface and yet not seeing an error or exception show in the stdout. For example, clicking the "Status" button give me a transitory popup that says "The call failed on the server. See server log for details". Yet I can't locate a server log....
Thanks! Regards, Adam
log4j.properties:
### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.EnhancedPatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} [%t] %-5p %c{1}:%L %X{username} - %m%n
### set log levels - for more verbose logging change 'info' to 'debug' ###
log4j.rootLogger=DEBUG,stdout
## eclipse
log4j.logger.org.eclipse.kura.emulator.position=DEBUG
log4j.logger.org.eclipse=DEBUG
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03036 seconds