Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Can not connect Krua device to kapua server exception Not authorized to connect (5)(in the past device was able to connect to kapua server but recently some of my devices are not connecting to server and gives exception. )
Can not connect Krua device to kapua server exception Not authorized to connect (5) [message #1787356] Thu, 24 May 2018 04:15 Go to next message
Hemant Sangle is currently offline Hemant SangleFriend
Messages: 3
Registered: January 2018
Junior Member
I haven't changed the setting of CloudServiceSetting in kura not even the client-id but still I get this error below is log of kura device
2018-05-23 14:27:17,894 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - Creating a new client instance
2018-05-23 14:27:17,895 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - Using memory persistence for in-flight messages
2018-05-23 14:27:17,897 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - # ------------------------------------------------------------
2018-05-23 14:27:17,898 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - #  Connection Properties
2018-05-23 14:27:17,898 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - #  broker    = tcp://35.173.87.174:1883
2018-05-23 14:27:17,899 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - #  clientId  = 51284
2018-05-23 14:27:17,899 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - #  username  = kapua-broker
2018-05-23 14:27:17,900 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - #  password  = XXXXXXXXXXXXXX
2018-05-23 14:27:17,900 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - #  keepAlive = 30
2018-05-23 14:27:17,900 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - #  timeout   = 20
2018-05-23 14:27:17,901 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - #  cleanSession    = true
2018-05-23 14:27:17,901 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - #  MQTT version    = 3.1.1
2018-05-23 14:27:17,901 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - #  willDestination = $EDC/kapua-sys/51284/MQTT/LWT
2018-05-23 14:27:17,902 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - #  willMessage     = 
2018-05-23 14:27:17,902 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - #
2018-05-23 14:27:17,903 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - #  Connecting...
2018-05-23 14:27:17,903 [pool-9-thread-1] INFO  o.e.k.c.s.r.LogStatusRunnable - Notification LED fast blinking
2018-05-23 14:27:18,572 [qtp4810959-46] WARN  o.e.k.c.d.t.m.MqttDataTransport - xxxxx  Connect failed. Forcing disconnect. xxxxx {}
Not authorized to connect (5)
	at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:28)
	at org.eclipse.paho.client.mqttv3.internal.ClientState.notifyReceivedAck(ClientState.java:990)
	at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:118)
	at java.lang.Thread.run(Thread.java:745)
2018-05-23 14:27:18,574 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - Closing client...
2018-05-23 14:27:18,578 [qtp4810959-46] INFO  o.e.k.c.d.t.m.MqttDataTransport - Closed
2018-05-23 14:27:18,579 [pool-9-thread-1] INFO  o.e.k.c.s.r.LogStatusRunnable - Notification LED off
2018-05-23 14:27:18,579 [qtp4810959-46] WARN  o.e.k.w.s.GwtNetworkServiceImpl - Error connecting
org.eclipse.kura.KuraConnectException: "Connection failed. Cannot connect"
	at org.eclipse.kura.core.data.transport.mqtt.MqttDataTransport.connect(MqttDataTransport.java:333)
	at org.eclipse.kura.core.data.DataServiceImpl.connect(DataServiceImpl.java:493)
	at org.eclipse.kura.web.server.GwtStatusServiceImpl.connectDataService(GwtStatusServiceImpl.java:93)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:587)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:333)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:303)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:373)
	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at org.eclipse.kura.web.server.OsgiRemoteServiceServlet.service(OsgiRemoteServiceServlet.java:41)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl$LegacyServlet.service(HttpServiceRuntimeImpl.java:1221)
	at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
	at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
	at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:132)
	at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.service(ProxyServlet.java:100)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:310)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:524)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:745)
Caused by: Not authorized to connect (5)
	at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:28)
	at org.eclipse.paho.client.mqttv3.internal.ClientState.notifyReceivedAck(ClientState.java:990)
	at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:118)
	... 1 more


Re: Can not connect Krua device to kapua server exception Not authorized to connect (5) [message #1787383 is a reply to message #1787356] Thu, 24 May 2018 12:02 Go to previous message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 279
Registered: July 2015
Location: Italy
Senior Member
Hi,
as the message states, Kura is able to connect properly to the cloud platform. But you don't have the access rights to publish there.
Please review your Kapua configuration and play with privileges.

Best regards,
Matteo
Previous Topic:Calling the Kura API methods?
Next Topic:Kura into Virtual Machine
Goto Forum:
  


Current Time: Sun Nov 18 01:28:25 GMT 2018

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

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

Back to the top