Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [kapua-dev] R: help: Problem connection kapua with broker

Hello Riccardo,


thanks for your quick reply!
I have now include the variable "broker.internal.connector.username..." in my docker-compose file.
I could start the web interface successful and i not longer get the error "org.eclipse.kapua.service.device.manage".
But if i want to refresh a disconnected device i will get this error: "The request has exceeded the The request has not received a response within the timeout of: 30,000ms timed out" - is these normal?
I have seen before another message similar to "the device is not connected, refresh the list" in the old version . Shouldn't i get a message like this with the new version?

A question about the actual problem:
When a device is connected and i refresh the Configuration tab, then i get now the message "Error null". If i refresh the Configrúration tab one more time, i will get "Could not initialize class org.eclipse.kapua.commons.crypto.Crypto".
But i can see the Informations from all another tabs like Bundles or Assets. Have you maybe a idea where the problem is?
grafik.png


Thank you very much in advance.


Best regards,

Beyza

Am Fr., 10. März 2023 um 17:22 Uhr schrieb Modanese, Riccardo via kapua-dev <kapua-dev@xxxxxxxxxxx>:

Hello Beyza,

 

did you check if the credentials set for the pool:

https://github.com/eclipse/kapua/blob/1.6.7/transport/mqtt/src/main/java/org/eclipse/kapua/transport/mqtt/pooling/PooledMqttClientFactory.java#L65

 

are the same accepted by the broker for internal connections:

https://github.com/eclipse/kapua/blob/1.6.7/broker/core/src/main/java/org/eclipse/kapua/broker/core/plugin/KapuaSecurityBrokerFilter.java#L428

 

Hope this can solve your issue!

 

Regards

 

Riccardo

 

 

Da: kapua-dev <kapua-dev-bounces@xxxxxxxxxxx> per conto di Beyza Dem <beyza.demiray44@xxxxxxxxx>
Data: venerdì, 10 marzo 2023 09:12
A: kapua-dev@xxxxxxxxxxx <kapua-dev@xxxxxxxxxxx>
Oggetto: [kapua-dev] help: Problem connection kapua with broker

Hi everyone,

 

I have updated kapua from 1.0.0M-7 to 1.6.7. The update is done, but I have problems with the connection between kapua console and kapua broker - my guess.
Kura devices can connect to kapua so it shows when they are connected or not.

But when I want to access the data from a Kura device via the Kapua web interface, I get this error message:
Error: There was an error while sending the request. Error: An error occurred when sending the message: org.eclipse.kapua.service.device.manage

The log files of kapua-consoel says:

kapua-console:
Caused by: org.eclipse.kapua.service.device.call.exception.DeviceCallSendException: An error occurred when sending the message: org.eclipse.kapua.service.device.call.message.kura.app.request.KuraRequestMessage@7fd52fc5
kapua-console    |      at org.eclipse.kapua.service.device.call.kura.KuraDeviceCallImpl.sendInternal(KuraDeviceCallImpl.java:181)
kapua-console    |      at org.eclipse.kapua.service.device.call.kura.KuraDeviceCallImpl.read(KuraDeviceCallImpl.java:78)
kapua-console    |      at org.eclipse.kapua.service.device.call.kura.KuraDeviceCallImpl.read(KuraDeviceCallImpl.java:57)
kapua-console    |      at org.eclipse.kapua.service.device.management.commons.call.DeviceCallExecutor.send(DeviceCallExecutor.java:149)
kapua-console    |      ... 62 common frames omitted
kapua-console    | Caused by: org.eclipse.kapua.transport.exception.TransportClientGetException: Cannot get an instance of the transport client to connect to host: tcp://broker:1893
kapua-console    |      at org.eclipse.kapua.transport.mqtt.MqttFacade.<init>(MqttFacade.java:64)
kapua-console    |      at org.eclipse.kapua.transport.mqtt.MqttClientFactoryImpl.getFacade(MqttClientFactoryImpl.java:43)
kapua-console    |      at org.eclipse.kapua.transport.mqtt.MqttClientFactoryImpl.getFacade(MqttClientFactoryImpl.java:32)
kapua-console    |      at org.eclipse.kapua.service.device.call.kura.KuraDeviceCallImpl.borrowClient(KuraDeviceCallImpl.java:220)
kapua-console    |      at org.eclipse.kapua.service.device.call.kura.KuraDeviceCallImpl.sendInternal(KuraDeviceCallImpl.java:142)
kapua-console    |      ... 65 common frames omitted
kapua-console    | Caused by: org.eclipse.kapua.transport.mqtt.exception.MqttClientConnectException: MqttClient KapuaPool-1678432593545-2585641589853177944 cannot connect to {2} with username [Ljava.lang.Object;@169a892b
kapua-console    |      at org.eclipse.kapua.transport.mqtt.MqttClient.connectClient(MqttClient.java:109)
kapua-console    |      at org.eclipse.kapua.transport.mqtt.pooling.PooledMqttClientFactory.create(PooledMqttClientFactory.java:81)
kapua-console    |      at org.eclipse.kapua.transport.mqtt.pooling.PooledMqttClientFactory.create(PooledMqttClientFactory.java:37)
kapua-console    |      at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:60)
kapua-console    |      at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:861)
kapua-console    |      at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435)
kapua-console    |      at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363)
kapua-console    |      at org.eclipse.kapua.transport.mqtt.MqttFacade.<init>(MqttFacade.java:62)
kapua-console    |      ... 69 common frames omitted
kapua-console    | Caused by: org.eclipse.paho.client.mqttv3.MqttSecurityException: Not authorized to connect
kapua-console    |      at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:28)
kapua-console    |      at org.eclipse.paho.client.mqttv3.internal.ClientState.notifyReceivedAck(ClientState.java:1040)
kapua-console    |      at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:150)
kapua-console    |      ... 1 common frames omitted

 

 

The log files of broker says:

 

07:18:27.641 [ActiveMQ NIO Worker 2] WARN  o.a.a.b.TransportConnection.Service - Security Error occurred on connection to: tcp://xxxx:51564, User not allowed!
broker           | 07:18:27.644 [ActiveMQ NIO Worker 2] DEBUG o.a.a.t.mqtt.MQTTProtocolConverter - MQTT Client KapuaPool-1678432706996-7782921883214514741 connected. (version: 3)
broker           | 07:18:29.321 [ActiveMQ BrokerService[message-broker] Task-30] DEBUG o.a.a.broker.jmx.ManagementContext - Unregistering MBean org.apache.activemq:type=Broker,brokerName=message-broker,connector=clientConnectors,connectorName=internalMqtt,connectionViewType=remoteAddress,connectionName=tcp_//xxxx_51562
broker           | 07:18:29.322 [ActiveMQ BrokerService[message-broker] Task-30] INFO  o.a.a.broker.TransportConnection - Stopping tcp://xxxx:51562 because Failed with SecurityException: User not allowed!
broker           | 07:18:29.323 [ActiveMQ BrokerService[message-broker] Task-29] DEBUG o.a.a.broker.TransportConnection - Stopping connection: tcp://xxxx:51562
broker           | 07:18:29.323 [ActiveMQ BrokerService[message-broker] Task-29] DEBUG o.a.a.transport.tcp.TcpTransport - Stopping transport tcp:///xxxx:51562@1893
broker           | 07:18:29.323 [ActiveMQ BrokerService[message-broker] Task-29] DEBUG o.a.a.thread.TaskRunnerFactory - Initialized TaskRunnerFactory[ActiveMQ Task] using ExecutorService: java.util.concurrent.ThreadPoolExecutor@4d0221c8[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
broker           | 07:18:29.324 [ActiveMQ Task-1] DEBUG o.a.a.transport.tcp.TcpTransport - Closed socket Socket[unconnected]
broker           | 07:18:29.324 [ActiveMQ BrokerService[message-broker] Task-29] DEBUG o.a.activemq.util.ThreadPoolUtils - Forcing shutdown of ExecutorService: java.util.concurrent.ThreadPoolExecutor@4d0221c8[Running, pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 0]
broker           | 07:18:29.324 [ActiveMQ BrokerService[message-broker] Task-29] DEBUG o.a.a.broker.TransportConnection - Stopped transport: null
broker           | 07:18:29.324 [ActiveMQ BrokerService[message-broker] Task-29] DEBUG o.a.a.broker.TransportConnection - Connection Stopped: null
broker           | 07:18:29.643 [ActiveMQ BrokerService[message-broker] Task-29] DEBUG o.a.a.broker.TransportConnection - Stopping connection: tcp://xxxx:51564
broker           | 07:18:29.643 [ActiveMQ BrokerService[message-broker] Task-31] DEBUG o.a.a.broker.jmx.ManagementContext - Unregistering MBean org.apache.activemq:type=Broker,brokerName=message-broker,connector=clientConnectors,connectorName=internalMqtt,connectionViewType=remoteAddress,connectionName=tcp_//xxxx_51564
broker           | 07:18:29.645 [ActiveMQ BrokerService[message-broker] Task-31] INFO  o.a.a.broker.TransportConnection - Stopping tcp://xxxx:51564 because Failed with SecurityException: User not allowed!
broker           | 07:18:29.645 [ActiveMQ BrokerService[message-broker] Task-29] DEBUG o.a.a.transport.tcp.TcpTransport - Stopping transport tcp:///xxxxx:51564@1893
broker           | 07:18:29.645 [ActiveMQ BrokerService[message-broker] Task-29] DEBUG o.a.a.thread.TaskRunnerFactory - Initialized TaskRunnerFactory[ActiveMQ Task] using ExecutorService: java.util.concurrent.ThreadPoolExecutor@7c0509e3[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
broker           | 07:18:29.646 [ActiveMQ Task-1] DEBUG o.a.a.transport.tcp.TcpTransport - Closed socket Socket[unconnected]
broker           | 07:18:29.646 [ActiveMQ BrokerService[message-broker] Task-29] DEBUG o.a.activemq.util.ThreadPoolUtils - Forcing shutdown of ExecutorService: java.util.concurrent.ThreadPoolExecutor@7c0509e3[Running, pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 0]


Please help me to solve the problem as soon as possible.

 

 

Best regards,

 

 

Beyza

_______________________________________________
kapua-dev mailing list
kapua-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/kapua-dev

Back to the top