Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[kapua-dev] R: help: Problem connection kapua with broker
  • From: "Modanese, Riccardo" <Riccardo.Modanese@xxxxxxxxxxxx>
  • Date: Fri, 10 Mar 2023 16:22:05 +0000
  • Accept-language: it-IT, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=eurotech.com; dmarc=pass action=none header.from=eurotech.com; dkim=pass header.d=eurotech.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=W82Yyemk8/AxAoOdXP/AdpuXm/K7M1uIdZ6JqrttTQE=; b=Vn82X2NKpk2BXdBxTKFA1V4XAVCMIRAEyuZw5rDpKUFp7tZr+5pFlmDIygPZZ3oSFIquMnTSb8VwI7D2G6p0+gpF9L91jthYsh/U7x5N9ZL0gLaDzkut1E4RhEHaJDJLYBPoUIht+1WZCO5aRwDATnSWg0s6cOUP7nBdLqy6zmSBqmt9TOOB1CW8048asXZkq8XURatpDQ5tIIEMopU5Y963swB8Eg5GAXU8EkxV2RiWJ2roe32mHU14tMItOCRiIet/pH28U7h7feoojq/FsML2+Zxl95TknyHqLckvYeY/DWT9+idbrX8fmgEmRx1mLwLeOQ5C7iLsyU10usoOfg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZDEGrOhrhPhhso9UPHxzsg9/ATpzIHcgvrOyk9agwM2ZgavzkahMdMkajV7JwS8zstRqHFY/n464lix3Bqt+GecuNhohkRG/1cNVko8UfRws3vrImm3JkAVsRDG4ZlWwy+/rwQEkAhx6H9aRD2NdAUDJ8v8Yix2hhap4KBrCinr08CMEJSpP/qiriIHgfF/dVg6f8K9QthAQVo8BtcQswysOZJDzvD3VzFlukri5wdaPCvsxH7QSP+1Cjq1K1oPM9b+vZyQoy+MNd2pKN0xgskWJ9LphUcUFG6dx20ox/xJH/3LUMScCAQRqOWiv3VdWko1a150v2tBBRHO1+Ll8ag==
  • Delivered-to: kapua-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/kapua-dev/>
  • List-help: <mailto:kapua-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/kapua-dev>, <mailto:kapua-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/kapua-dev>, <mailto:kapua-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHZUygPPe6H8HzXL0atZZw8PbRXCK70MJPe
  • Thread-topic: [kapua-dev] help: Problem connection kapua with broker

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


Back to the top