Iot Hub module "Modbus" looks healthy and well parametrized but no data received - azure-iot-hub

I am connecting a "Janitza UMG96RM-E" device to a Windows Laptop where I am using Hyper-V to use Linux cmds. I registered the Laptop as an Edge device and added Modbus to the set of modules. I read the Janitza documentation (start Address, nbre of bits ...) and I Added the correct Ip Address the Module Twins file... Everything looks heathy except I am not receiving any data from the Modbus module... I am not able to figure out what is wrong ? Here is some logs from edgeHub module.
<6> 2022-03-08 18:32:01.503 +00:00 [INF] - Add node: myEdgeDevice/DefenderIotMicroAgent
<6> 2022-03-08 18:32:01.711 +00:00 [INF] - Add node: myEdgeDevice/Modbus
<6> 2022-03-08 18:32:01.868 +00:00 [INF] - Done refreshing device scope identities cache. Waiting for 60 minutes.
<6> 2022-03-08 18:32:01.956 +00:00 [INF] - Obtained edge hub config from module twin
<6> 2022-03-08 18:32:02.377 +00:00 [INF] - Set the following 1 route(s) in edge hub
<6> 2022-03-08 18:32:02.377 +00:00 [INF] - modbusToIoTHub: FROM /messages/modules/Modbus/outputs/modbusOutput INTO $upstream
<6> 2022-03-08 18:32:02.378 +00:00 [INF] - Updated message store TTL to 7200 seconds
<6> 2022-03-08 18:32:02.379 +00:00 [INF] - Updated the edge hub store and forward configuration
<6> 2022-03-08 18:32:02.391 +00:00 [INF] - Started operation Get EdgeHub config
<6> 2022-03-08 18:32:02.395 +00:00 [INF] - Initialized edge hub configuration
<6> 2022-03-08 18:32:02.397 +00:00 [INF] - Starting protocol heads - (MQTT, AMQP, HTTP)
<6> 2022-03-08 18:32:02.410 +00:00 [INF] - Starting MQTT head
<6> 2022-03-08 18:32:02.524 +00:00 [INF] - Initializing TLS endpoint on port 8883 for MQTT head.
<6> 2022-03-08 18:32:02.845 +00:00 [INF] - Starting AMQP head
<6> 2022-03-08 18:32:02.873 +00:00 [INF] - Started MQTT head
<6> 2022-03-08 18:32:03.251 +00:00 [INF] - Started AMQP head
<6> 2022-03-08 18:32:03.255 +00:00 [INF] - Starting HTTP head
<4> 2022-03-08 18:32:04.026 +00:00 [WRN] - Overriding address(es) '"http://+:80"'. Binding to endpoints defined in "UseKestrel()" instead.
<6> 2022-03-08 18:32:04.063 +00:00 [INF] - Started HTTP head
<6> 2022-03-08 18:32:05.529 +00:00 [INF] - New token received on the Cbs link
<6> 2022-03-08 18:32:05.727 +00:00 [INF] - Client myEdgeDevice/Modbus in device scope authenticated locally.
<6> 2022-03-08 18:32:05.745 +00:00 [INF] - New device connection for device myEdgeDevice/Modbus
<6> 2022-03-08 18:32:05.746 +00:00 [INF] - Client myEdgeDevice/Modbus connected to edgeHub, processing existing subscriptions.
<6> 2022-03-08 18:32:05.750 +00:00 [INF] - Attempting to connect to IoT Hub for client myEdgeDevice/Modbus via AMQP...
<6> 2022-03-08 18:32:05.767 +00:00 [INF] - Bind device proxy for device myEdgeDevice/Modbus
<6> 2022-03-08 18:32:05.767 +00:00 [INF] - Initialized device listener in the AMQP protocol head for myEdgeDevice/Modbus
<6> 2022-03-08 18:32:05.786 +00:00 [INF] - Opened link Events for myEdgeDevice/Modbus
<6> 2022-03-08 18:32:05.827 +00:00 [INF] - Cloud connection for myEdgeDevice/Modbus is True
<6> 2022-03-08 18:32:05.827 +00:00 [INF] - Connection status for myEdgeDevice/Modbus changed to ConnectionEstablished
<6> 2022-03-08 18:32:05.827 +00:00 [INF] - Client myEdgeDevice/Modbus connected to cloud, processing existing subscriptions.
<6> 2022-03-08 18:32:05.827 +00:00 [INF] - Skipping myEdgeDevice/Modbus for subscription processing, as it is currently being processed.
<6> 2022-03-08 18:32:05.827 +00:00 [INF] - Created cloud proxy for client myEdgeDevice/Modbus via AMQP, with client operation timeout 20 seconds.
<6> 2022-03-08 18:32:05.828 +00:00 [INF] - Initialized cloud proxy 9450b673-5293-4c0b-830f-5c564f317321 for myEdgeDevice/Modbus
<6> 2022-03-08 18:32:05.828 +00:00 [INF] - Created cloud connection for client myEdgeDevice/Modbus
<6> 2022-03-08 18:32:06.116 +00:00 [INF] - Opened link TwinReceiving for myEdgeDevice/Modbus
<6> 2022-03-08 18:32:06.126 +00:00 [INF] - Processing pending subscriptions for myEdgeDevice/Modbus
<6> 2022-03-08 18:32:06.129 +00:00 [INF] - Opened link TwinSending for myEdgeDevice/Modbus
<6> 2022-03-08 18:32:06.659 +00:00 [INF] - Processing pending subscriptions for myEdgeDevice/Modbus
<6> 2022-03-08 18:32:06.661 +00:00 [INF] - Opened link ModuleMessages for myEdgeDevice/Modbus
<6> 2022-03-08 18:32:06.760 +00:00 [INF] - Updated reported properties for myEdgeDevice/$edgeHub
<6> 2022-03-08 18:32:12.133 +00:00 [INF] - Updated reported properties for myEdgeDevice/Modbus
<6> 2022-03-08 18:36:56.469 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 18:41:56.461 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 18:46:56.461 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 18:51:56.464 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 18:56:56.464 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:01:53.016 +00:00 [INF] - Started task to cleanup processed and stale messages for endpoint iothub
<6> 2022-03-08 19:01:53.083 +00:00 [INF] - Cleaned up 0 messages from queue for endpoint iothub and 0 messages from message store.
<6> 2022-03-08 19:01:56.460 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:06:56.460 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:11:56.463 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:16:56.463 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:21:56.463 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:26:56.464 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:30:05.794 +00:00 [INF] - New token received on the Cbs link
<6> 2022-03-08 19:30:05.800 +00:00 [INF] - Token updated for myEdgeDevice/Modbus
<6> 2022-03-08 19:30:57.126 +00:00 [INF] - Request starting HTTP/1.1 GET http://172.18.0.3:9600/metrics
<6> 2022-03-08 19:30:57.203 +00:00 [INF] - Request finished in 76.276ms 200 text/plain; version=0.0.4; charset=utf-8
<6> 2022-03-08 19:31:53.089 +00:00 [INF] - Started task to cleanup processed and stale messages for endpoint iothub
<6> 2022-03-08 19:31:53.157 +00:00 [INF] - Cleaned up 0 messages from queue for endpoint iothub and 0 messages from message store.
<6> 2022-03-08 19:31:56.459 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:32:01.877 +00:00 [INF] - Starting refresh of device scope identities cache
<6> 2022-03-08 19:32:02.390 +00:00 [INF] - Starting periodic operation Get EdgeHub config...
<6> 2022-03-08 19:32:02.781 +00:00 [INF] - Obtained edge hub config from module twin
<6> 2022-03-08 19:32:02.939 +00:00 [INF] - Set the following 1 route(s) in edge hub
<6> 2022-03-08 19:32:02.940 +00:00 [INF] - modbusToIoTHub: FROM /messages/modules/Modbus/outputs/modbusOutput INTO $upstream
<6> 2022-03-08 19:32:02.941 +00:00 [INF] - Updated message store TTL to 7200 seconds
<6> 2022-03-08 19:32:02.941 +00:00 [INF] - Updated the edge hub store and forward configuration
<6> 2022-03-08 19:32:02.941 +00:00 [INF] - Successfully completed periodic operation Get EdgeHub config
<6> 2022-03-08 19:32:03.056 +00:00 [INF] - Updated reported properties for myEdgeDevice/$edgeHub
<6> 2022-03-08 19:32:04.404 +00:00 [INF] - Not changed node: myEdgeDevice
<6> 2022-03-08 19:32:04.405 +00:00 [INF] - Not changed node: myEdgeDevice/$edgeAgent
<6> 2022-03-08 19:32:04.405 +00:00 [INF] - Not changed node: myEdgeDevice/$edgeHub
<6> 2022-03-08 19:32:04.405 +00:00 [INF] - Not changed node: myEdgeDevice/DefenderIotMicroAgent
<6> 2022-03-08 19:32:04.406 +00:00 [INF] - Not changed node: myEdgeDevice/Modbus
<6> 2022-03-08 19:32:04.406 +00:00 [INF] - Done refreshing device scope identities cache. Waiting for 60 minutes.
<6> 2022-03-08 19:36:56.459 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:41:56.461 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:46:56.462 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:51:56.460 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 19:56:56.460 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 20:01:53.157 +00:00 [INF] - Started task to cleanup processed and stale messages for endpoint iothub
<6> 2022-03-08 20:01:53.159 +00:00 [INF] - Cleaned up 0 messages from queue for endpoint iothub and 0 messages from message store.
<6> 2022-03-08 20:01:56.463 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 20:06:56.461 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 20:11:56.460 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 20:16:56.463 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2022-03-08 20:21:56.461 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
Modbus Module Twin:
{
"deviceId": "myEdgeDevice",
"moduleId": "Modbus",
"etag": "AAAAAAAAAA4=",
"deviceEtag": "Mzc5OTQzNzE5",
"status": "enabled",
"statusUpdateTime": "0001-01-01T00:00:00Z",
"connectionState": "Connected",
"lastActivityTime": "0001-01-01T00:00:00Z",
"cloudToDeviceMessageCount": 0,
"authenticationType": "sas",
"x509Thumbprint": {
"primaryThumbprint": null,
"secondaryThumbprint": null
},
"modelId": "",
"version": 33,
"properties": {
"desired": {
"PublishInterval": 2000,
"SlaveConfigs": {
"Slave01": {
"SlaveConnection": "192.168.151.50",
"HwId": "HwId1",
"Operations": {
"Op01": {
"PollingInterval": "100",
"UnitId": "1",
"StartAddress": "19000",
"Count": "32",
"DisplayName": "Voltage",
"CorrelationId": "MessageType1"
}
},
"TcpPort": "502",
"RetryCount": "10",
"RetryInterval": "100"
}
},
"routes": {
"modbusToIoTHub": "FROM /messages/modules/Modbus/outputs/modbusOutput INTO $upstream"
},
"$metadata": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14,
"PublishInterval": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"SlaveConfigs": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14,
"Slave01": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14,
"SlaveConnection": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"HwId": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"Operations": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14,
"Op01": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14,
"PollingInterval": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"UnitId": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"StartAddress": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"Count": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"DisplayName": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"CorrelationId": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
}
}
},
"TcpPort": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"RetryCount": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
},
"RetryInterval": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
}
}
},
"routes": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14,
"modbusToIoTHub": {
"$lastUpdated": "2022-03-08T18:30:17.436628Z",
"$lastUpdatedVersion": 14
}
}
},
"$version": 14
},
"reported": {
"PublishInterval": 2000,
"SlaveConfigs": {
"Slave01": {
"Operations": {
"Op01": {
"PollingInterval": 100,
"UnitId": 1,
"StartAddress": "19000",
"Count": 32,
"DisplayName": "Voltage",
"CorrelationId": "MessageType1"
}
},
"SlaveConnection": "192.168.151.50",
"RetryCount": 10,
"RetryInterval": 100,
"TcpPort": 502,
"HwId": "HwId1"
}
},
"$metadata": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z",
"PublishInterval": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"SlaveConfigs": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z",
"Slave01": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z",
"Operations": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z",
"Op01": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z",
"PollingInterval": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"UnitId": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"StartAddress": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"Count": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"DisplayName": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"CorrelationId": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
}
}
},
"SlaveConnection": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"RetryCount": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"RetryInterval": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"TcpPort": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
},
"HwId": {
"$lastUpdated": "2022-03-08T18:32:11.9932421Z"
}
}
}
},
"$version": 19
}
}
}
Here are the info that I used from the Janitza docs to configure the Module Twin:
Modbus address list

I have found that the problem was the register start-address that I am reading from.
In my case I had the add a 4 in the beginning (Holding Register) and +1 in the end.
example: if in the documentation of the slave device I can read the Power from the address 19000 : in the Modbus Module twin I specify the address to be 419001 !
I hope this can help people in the future.

Have you checked the logs of the module? Check the name of the module with iotedge list.
sudo iotedge list
sudo iotedge logs Modbus
You need to specify a route from the modbus module to the $upstream channel of edgeHub to have the data routed to Azure IoT Hub that matches the name of the module from the deployment manifest. It looks correct, but doublechek won't hurt.
To see the data going through the IoT Hub, you can use the Azure IoT explorer.

Related

Error using framework hyperledger caliper

I have two test tests, one reading and one writing on the blockchain. I'm getting two different errors, one at the start of the test and one at the writing test. The reading test is working normally without problems.
Initial error:
2021.12.21-16:43:01.870 info [caliper] [round-orchestrator] Preparing worker connections
2021.12.21-16:43:01.870 info [caliper] [worker-orchestrator] Launching worker 1 of 2
2021.12.21-16:43:01.878 info [caliper] [worker-orchestrator] Launching worker 2 of 2
2021.12.21-16:43:01.884 info [caliper] [worker-orchestrator] Messenger not configured, entering configure phase...
2021.12.21-16:43:01.885 info [caliper] [worker-orchestrator] No existing workers detected, entering worker launch phase...
2021.12.21-16:43:01.885 info [caliper] [worker-orchestrator] Waiting for 2 workers to be connected...
2021.12.21-16:43:02.426 info [caliper] [cli-launch-worker] Set workspace path: /home/ubuntu/caliper/caliper-benchmarks/monitor
2021.12.21-16:43:02.427 info [caliper] [cli-launch-worker] Set benchmark configuration path: /home/ubuntu/caliper/caliper-benchmarks/monitor/config.yaml
2021.12.21-16:43:02.427 info [caliper] [cli-launch-worker] Set network configuration path: /home/ubuntu/caliper/caliper-benchmarks/monitor/network.yaml
2021.12.21-16:43:02.427 info [caliper] [cli-launch-worker] Set SUT type: fabric
2021.12.21-16:43:02.444 info [caliper] [cli-launch-worker] Set workspace path: /home/ubuntu/caliper/caliper-benchmarks/monitor
2021.12.21-16:43:02.446 info [caliper] [cli-launch-worker] Set benchmark configuration path: /home/ubuntu/caliper/caliper-benchmarks/monitor/config.yaml
2021.12.21-16:43:02.446 info [caliper] [cli-launch-worker] Set network configuration path: /home/ubuntu/caliper/caliper-benchmarks/monitor/network.yaml
2021.12.21-16:43:02.447 info [caliper] [cli-launch-worker] Set SUT type: fabric
2021.12.21-16:43:02.505 info [caliper] [worker-orchestrator] 2 workers connected, progressing to worker assignment phase.
2021.12.21-16:43:02.505 info [caliper] [worker-orchestrator] Workers currently unassigned, awaiting index assignment...
2021.12.21-16:43:02.506 info [caliper] [worker-orchestrator] Waiting for 2 workers to be assigned...
2021.12.21-16:43:02.559 info [caliper] [worker-orchestrator] 2 workers assigned, progressing to worker initialization phase.
2021.12.21-16:43:02.560 info [caliper] [worker-orchestrator] Waiting for 2 workers to be ready...
2021.12.21-16:43:03.629 info [caliper] [worker-message-handler] Initializing Worker#1...
2021.12.21-16:43:03.629 info [caliper] [fabric-connector] Initializing gateway connector compatible with installed SDK: 2.2.3
2021.12.21-16:43:03.629 info [caliper] [IdentityManager] Adding User1 (admin=false) as User1 for organization Org1MSP
2021.12.21-16:43:03.629 info [caliper] [worker-message-handler] Worker#1 initialized
2021.12.21-16:43:03.683 info [caliper] [worker-orchestrator] 2 workers ready, progressing to test preparation phase.
2021.12.21-16:43:03.684 info [caliper] [round-orchestrator] Started round 1 (Set)
2021.12.21-16:43:03.690 info [caliper] [worker-message-handler] Preparing Worker#1 for Round#0
2021.12.21-16:43:03.696 info [caliper] [connectors/v2/FabricGateway] Connecting user with identity User1 to a Network Gateway
2021.12.21-16:43:04.005 info [caliper] [worker-message-handler] Initializing Worker#0...
2021.12.21-16:43:04.005 info [caliper] [fabric-connector] Initializing gateway connector compatible with installed SDK: 2.2.3
2021.12.21-16:43:04.005 info [caliper] [IdentityManager] Adding User1 (admin=false) as User1 for organization Org1MSP
2021.12.21-16:43:04.005 info [caliper] [worker-message-handler] Worker#0 initialized
2021.12.21-16:43:04.006 info [caliper] [worker-message-handler] Preparing Worker#0 for Round#0
2021.12.21-16:43:04.006 info [caliper] [connectors/v2/FabricGateway] Connecting user with identity User1 to a Network Gateway
2021.12.21-16:43:04.007 info [caliper] [connectors/v2/FabricGateway] Successfully connected user with identity User1 to a Network Gateway
2021.12.21-16:43:04.008 info [caliper] [connectors/v2/FabricGateway] Generating contract map for user User1
2021.12.21-16:43:04.018 info [caliper] [connectors/v2/FabricGateway] Successfully connected user with identity User1 to a Network Gateway
2021.12.21-16:43:04.019 info [caliper] [connectors/v2/FabricGateway] Generating contract map for user User1
2021-12-21T16:43:07.083Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Committer- name: orderer.example.com:7050, url:grpc://localhost:7050, connected:false, connectAttempted:true
2021-12-21T16:43:07.086Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server orderer.example.com:7050 url:grpc://localhost:7050 timeout:3000
2021-12-21T16:43:07.088Z - error: [DiscoveryService]: _buildOrderer[channelall] - Unable to connect to the discovered orderer orderer.example.com:7050 due to Error: Failed to connect before the deadline on Committer- name: orderer.example.com:7050, url:grpc://localhost:7050, connected:false, connectAttempted:true
2021-12-21T16:43:07.085Z - error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Committer- name: orderer.example.com:7050, url:grpc://localhost:7050, connected:false, connectAttempted:true
2021-12-21T16:43:07.090Z - error: [ServiceEndpoint]: waitForReady - Failed to connect to remote gRPC server orderer.example.com:7050 url:grpc://localhost:7050 timeout:3000
2021-12-21T16:43:07.092Z - error: [DiscoveryService]: _buildOrderer[channelall] - Unable to connect to the discovered orderer orderer.example.com:7050 due to Error: Failed to connect before the deadline on Committer- name: orderer.example.com:7050, url:grpc://localhost:7050, connected:false, connectAttempted:true
The second error that occurs in the writing test is the following:
2021.12.21-16:43:07.112 info [caliper] [worker-orchestrator] 2 workers prepared, progressing to test phase.
2021.12.21-16:43:07.112 info [caliper] [round-orchestrator] Monitors successfully started
2021.12.21-16:43:07.115 info [caliper] [worker-message-handler] Worker#1 is starting Round#0
2021.12.21-16:43:07.116 info [caliper] [worker-message-handler] Worker#0 is starting Round#0
2021.12.21-16:43:07.123 info [caliper] [caliper-worker] Worker #1 starting workload loop
2021.12.21-16:43:07.126 info [caliper] [caliper-worker] Worker #0 starting workload loop
2021.12.21-16:43:07.941 error [caliper] [connectors/v2/FabricGateway] Failed to perform submit transaction [set] using arguments [node1,{'CPU':50,'MEM':50,'STG':50.0,'DAT':'2020-11-17T00:10:00Z'}], with error: Error: No endorsement plan available
at DiscoveryHandler.endorse (/home/ubuntu/caliper/node_modules/fabric-network/node_modules/fabric-common/lib/DiscoveryHandler.js:208:10)
at process._tickCallback (internal/process/next_tick.js:68:7)
Connection File
---
name: fabric
version: 2.0.0
client:
organization: Org1
connection:
timeout:
peer:
endorser: '300'
organizations:
Org1:
mspid: Org1MSP
peers:
- peer0.org1.example.com
certificateAuthorities:
- ca.org1.example.com
orderers:
orderer.example.com:
url: grpc://192.169.0.9:7050
grpcOptions:
ssl-target-name-override: orderer.example.com
peers:
peer0.org1.example.com:
url: grpc://192.169.0.7:7051
tlsCACerts:
path: peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
grpcOptions:
ssl-target-name-override: peer0.org1.example.com
certificateAuthorities:
ca.org1.example.com:
url: https://192.169.0.7:7054
caName: ca-org1
tlsCACerts:
path: peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
httpOptions:
verify: false
Network File
name: Fabric
version: '2.0.0'
caliper:
blockchain: fabric
sutOptions:
mutualTls: false
organizations:
- mspid: Org1MSP
identities:
certificates:
- name: 'User1'
clientPrivateKey:
path: 'peerOrganizations/org1.example.com/users/User1#org1.example.com/msp/keystore/priv_sk'
clientSignedCert:
path: 'peerOrganizations/org1.example.com/users/User1#org1.example.com/msp/signcerts/User1#org1.example.com-cert.pem'
connectionProfile:
path: 'connection_files/connection-org1.yaml'
discover: true
orderers:
orderer.example.com:
url: grpc://192.169.0.9:7050
grpcOptions:
ssl-target-name-override: orderer.example.com
channels:
- channelName: channelall
contracts:
- id: monitor
I kindly ask for any tips so that I can solve these problems and follow the development.
From the network file you posted a couple of points
you can't define any nodes in it (for example you've added orderers). They are ignored
you've specified that your connection profile is a dynamic profile by setting discover to true in your network file, this means it will use discovery to determine the network topology and may not use the nodes you have explicitly defined in your connection profile. If you want to be explicit in your connection profile (and thus define a static connection profile) like you have in your above example, you should set discover to false, which hopefully will solve your problem.
As a side note, if you use discovery then the node-sdk (used by caliper) and caliper by default converts all discovered node hosts to localhost, which is why you see it trying to contact localhost. To disable this see Runtime settings in https://hyperledger.github.io/caliper/v0.4.2/fabric-config/new/
The issue was in the connection file.
The old file was:
---
name: fabric
version: 2.0.0
client:
organization: Org1
connection:
timeout:
peer:
endorser: '300'
orderer: '10000'
organizations:
Org1:
mspid: Org1MSP
peers:
- peer0.org1.example.com
certificateAuthorities:
- ca.org1.example.com
orderers:
orderer.example.com:
url: grpc://192.169.0.9:7050
grpcOptions:
ssl-target-name-override: orderer.example.com
peers:
peer0.org1.example.com:
url: grpc://192.169.0.7:7051
tlsCACerts:
path: crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
grpcOptions:
ssl-target-name-override: peer0.org1.example.com
certificateAuthorities:
ca.org1.example.com:
url: http://192.169.0.7:7054
caName: ca-org1
tlsCACerts:
path: crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
httpOptions:
verify: false
The new connection file that I created is this:
---
name: fabric
description: "Sample connection profile for documentation topic"
version: 2.0.0
channels:
channelall:
orderers:
- orderer.example.com
peers:
peer0.org1.example.com:
endorsingPeer: true
chaincodeQuery: true
ledgerQuery: true
eventSource: true
peer0.org2.example.com:
endorsingPeer: true
chaincodeQuery: true
ledgerQuery: true
eventSource: true
peer0.org3.example.com:
endorsingPeer: false
chaincodeQuery: false
ledgerQuery: true
eventSource: true
organizations:
Org1:
mspid: Org1MSP
peers:
- peer0.org1.example.com
Org2:
mspid: Org2MSP
peers:
- peer0.org2.example.com
Org3:
mspid: Org3MSP
peers:
- peer0.org3.example.com
orderers:
orderer.example.com:
url: grpc://192.169.0.9:7050
grpcOptions:
ssl-target-name-override: orderer.example.com
peers:
peer0.org1.example.com:
url: grpc://192.169.0.7:7051
grpcOptions:
ssl-target-name-override: peer0.org1.example.com
request-timeout: 120001
peer0.org2.example.com:
url: grpc://192.169.0.10:7051
grpcOptions:
ssl-target-name-override: peer0.org2.example.com
request-timeout: 120001
peer0.org3.example.com:
url: grpc://192.169.0.11:7051
grpcOptions:
ssl-target-name-override: peer0.org3.example.com
request-timeout: 120001
With all information about peers and orderers.
Thanks everybody for the help.

Why Apache Camel result on Graceful shutdown

Hello I have an app written in Kotlin and using Spring boot Framework and Apache Camel:
https://camel.apache.org/components/latest/smpp-component.html#_spring_boot_auto_configuration
So I am new in Smpp protocol I am suppuse trying to connecto to SMC simulator so I guess my
"client" should be wait for a message from SMC in this case when I run the application it
appears just stop and anymore. As it just stops I would think something is wrong.
#Bean
fun camelContextConfiguration(): CamelContextConfiguration{
return object : CamelContextConfiguration {
override fun afterApplicationStart(camelContext: CamelContext?) {
logger.info("*********************************************************************************")
//var query : Query?
//val oldRoute : List<Route> = camelContext!!.routes
camelContext!!.routes
//logger.info("Old Routes")
//logger.info(oldRoute.size.toString())
// for(route:Route in oldRoute) {
// logger.info("Route with routeId {} is deleted",route.id)
// camelContext.stopRoute(route.id)
// camelContext.removeRoute(route.id)
// }
camelContext.isUseMDCLogging=true
logger.info("ROUTES")
val routeDefinition = RouteDefinition()
routeDefinition.id="1"
routeDefinition.onException(Exception::class.java).handled(true)
.process(exceptionProcessor())
.end()
routeDefinition.from("smpp://smppclient#smscsim.melroselabs.com:2775?password=password&enquireLinkTimer=3000&transactionTimer=5000&systemId=145244&systemType='Receiver'")
routeDefinition.to("log:com.app.smppdispenser.infraestructure.smpp?showBody=true&showHeaders=true")
routeDefinition.process(messageProcessor())
camelContext.addRouteDefinition(routeDefinition)
//routeDefinition.setHeader("CamelSmppCommandId", constant("query_sm"))
//routeDefinition.setHeader("CamelSmppSequenceNumber", constant("1"))
logger.info("Route is added with routeId {} ",routeDefinition.id)
//}
logger.info("CamelConfiguration afterApplicationStart OK")
}
override fun beforeApplicationStart(camelContext: CamelContext?) {
logger.info("CamelConfiguration beforeApplicationStart")
}
}
}
This is the log>
2021-06-06 10:37:06.824 INFO 5604 --- [ main]
o.a.c.s.boot.CamelContextConfiguration : ROUTES 2021-06-06
10:37:07.538 INFO 5604 --- [ main]
org.jsmpp.session.SMPPSession : Connected to
smscsim.melroselabs.com/18.200.51.80 2021-06-06 10:37:07.541 INFO
5604 --- [ession#31859960] org.jsmpp.session.SMPPSession :
Starting PDUReaderWorker 2021-06-06 10:37:07.817 INFO 5604 --- [
main] org.jsmpp.session.SMPPSession : Other side reports
SMPP interface version 34 2021-06-06 10:37:07.817 INFO 5604 --- [
main] org.jsmpp.session.SMPPSession : Changing processor
degree to 3 2021-06-06 10:37:07.819 INFO 5604 --- [ main]
o.a.camel.component.smpp.SmppConsumer : Connected to:
smpp://145244#smscsim.melroselabs.com:2775 2021-06-06 10:37:07.820
INFO 5604 --- [ main] o.a.camel.spring.SpringCamelContext
: Route: 1 started and consuming from:
smpp://smppclient#smscsim.melroselabs.com:2775?enquireLinkTimer=3000&password=xxxxxx&systemId=145244&systemType=%27Receiver%27&transactionTimer=5000
2021-06-06 10:37:07.821 INFO 5604 --- [ main]
o.a.c.s.boot.CamelContextConfiguration : Route is added with routeId
1 2021-06-06 10:37:07.821 INFO 5604 --- [ main]
o.a.c.s.boot.CamelContextConfiguration : CamelConfiguration
afterApplicationStart OK 2021-06-06 10:37:07.936 INFO 5604 --- [
Thread-2] o.s.w.c.s.GenericWebApplicationContext : Closing
org.springframework.web.context.support.GenericWebApplicationContext#2cf3d63b:
startup date [Sun Jun 06 10:36:55 COT 2021]; root of context hierarchy
2021-06-06 10:37:07.944 INFO 5604 --- [ Thread-2]
o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase
2147483647 2021-06-06 10:37:07.945 INFO 5604 --- [ Thread-2]
o.a.camel.spring.SpringCamelContext : Apache Camel 2.20.1
(CamelContext: camel-1) is shutting down 2021-06-06 10:37:07.946 INFO
5604 --- [ Thread-2] o.a.camel.impl.DefaultShutdownStrategy :
Starting to graceful shutdown 1 routes (timeout 300 seconds)
2021-06-06 10:37:08.163 WARN 5604 --- [ession#31859960]
org.jsmpp.session.SMPPSession : IOException while reading:
Socket Closed 2021-06-06 10:37:08.164 INFO 5604 --- [ - ShutdownTask]
o.a.camel.component.smpp.SmppConsumer : Disconnected from:
smpp://145244#smscsim.melroselabs.com:2775 2021-06-06 10:37:08.164
INFO 5604 --- [ - ShutdownTask] o.a.camel.impl.DefaultShutdownStrategy
: Route: 1 shutdown complete, was consuming from:
smpp://smppclient#smscsim.melroselabs.com:2775?enquireLinkTimer=3000&password=xxxxxx&systemId=145244&systemType=%27Receiver%27&transactionTimer=5000
2021-06-06 10:37:08.165 INFO 5604 --- [ession#31859960]
org.jsmpp.session.SMPPSession : PDUReaderWorker stop
2021-06-06 10:37:08.166 INFO 5604 --- [ Thread-2]
o.a.camel.impl.DefaultShutdownStrategy : Graceful shutdown of 1
routes completed in 0 seconds 2021-06-06 10:37:08.202 INFO 5604 --- [
Thread-2] o.a.camel.spring.SpringCamelContext : Apache Camel
2.20.1 (CamelContext: camel-1) uptime 1.629 seconds 2021-06-06 10:37:08.203 INFO 5604 --- [ Thread-2]
o.a.camel.spring.SpringCamelContext : Apache Camel 2.20.1
(CamelContext: camel-1) is shutdown in 0.257 seconds Process finished
with exit code 0
Edit
I have added thse option: camel.springboot.main-run-controller = true then I see this new line in my log but it finish of the same way.
there are some options:
add a spring boot starter web which starts a web server and keep the application running
use a property as explained here: https://camel.apache.org/camel-spring-boot/3.7.x/spring-boot.html#SpringBoot-Keepingapplicationalive

How do you connect to a external deployed Hyperledger Fabric network?

I downloaded and installed and started the fabcar example on a VM on Azure. By following the tutorial enrollAdmin, registerUser and invoke work when I execute it on the VM itself.
However when I try to execute invoke on my local machine (copied the generated conenction profile and replaced localhost with the vm's domain) and try to connect to the network I get the error:
2020-02-05T13:45:37.287Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer1.org2.example.com:10051 timeout:3000
2020-02-05T13:45:37.291Z - warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G1:1 - endorsement failed - Error: Failed to connect before the deadline URL:grpcs://peer1.org2.example.com:10051 timeout:3000
2020-02-05T13:45:37.301Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer0.org1.example.com:7051 timeout:3000
2020-02-05T13:45:37.305Z - warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed - Error: Failed to connect before the deadline URL:grpcs://peer0.org1.example.com:7051 timeout:3000
2020-02-05T13:45:40.301Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer0.org2.example.com:9051 timeout:3000
2020-02-05T13:45:40.304Z - warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G1:1 - endorsement failed - Error: Failed to connect before the deadline URL:grpcs://peer0.org2.example.com:9051 timeout:3000
2020-02-05T13:45:40.338Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://peer1.org1.example.com:8051 timeout:3000
2020-02-05T13:45:40.341Z - warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed - Error: Failed to connect before the deadline URL:grpcs://peer1.org1.example.com:8051 timeout:3000
2020-02-05T13:45:40.368Z - error: [DiscoveryEndorsementHandler]: _endorse - endorsement failed::Error: Endorsement has failed
And the log on the peer0.org1 is:
2020-02-05 13:45:40.389 UTC [grpc] warningf -> DEBU 0f0 transport: http2Server.HandleStreams failed to read frame: read tcp 172.25.0.13:7051->88.217.234.75:62583: read: connection reset by peer
2020-02-05 13:45:40.390 UTC [grpc] infof -> DEBU 0f1 transport: loopyWriter.run returning. connection error: desc = "transport is closing"
I made sure that all the ports are open (configured in Azure) and disabled the ufw.
So what am I missing? Is there any tutorial on how to set up a production network which does not rely on the examples, because those always rely on the fact that everything happens locally or in the docker network?
[edit]
Connection profile:
"name": "first-network-org1",
"version": "1.0.0",
"client": {
"organization": "Org1",
"connection": {
"timeout": {
"peer": {
"endorser": "3000"
}
}
}
},
"organizations": {
"Org1": {
"mspid": "Org1MSP",
"peers": [
"peer0.org1.example.com",
"peer1.org1.example.com"
],
"certificateAuthorities": [
"ca.org1.example.com"
]
}
},
"peers": {
"peer0.org1.example.com": {
"url": "grpc://host.westeurope.cloudapp.azure.com:7051",
"grpcOptions": {
"hostnameOverride": "peer0.org1.example.com",
"request-timeout": 120001
}
},
"peer1.org1.example.com": {
"url": "grpc://host.westeurope.cloudapp.azure.com:8051",
"grpcOptions": {
"hostnameOverride": "peer1.org1.example.com",
"request-timeout": 120001
}
}
},
"certificateAuthorities": {
"ca.org1.example.com": {
"url": "http://host.westeurope.cloudapp.azure.com:7054",
"caName": "ca-org1",
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICUDCCAfegAwIBAgIQK3F95KrKLaFAQc2FxbmA/DAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0yMDAyMDcwOTM0MDBaFw0zMDAyMDQwOTM0MDBa\nMHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQD\nExNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE\nj9KqxqKh7hIjDJJcV1qqBPj3KRXJjW6tAcIw/5gNwCcIqe2PyAQdPZsAJdOmFca5\nrtYcjrUgh9lAdLDKY0/qh6NtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQG\nCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCAA\nsJtyWNpuNWlzwdO6dPm4NcjY0vLK1+bNZ/1DmVA0+zAKBggqhkjOPQQDAgNHADBE\nAiAUm1qU7haU9mvHUL7XjyTrQGBgA4fXVuSFvAPAQUlX0QIgPQMvlC3DpW10Xwl0\nCZahvAgVnx4PjbPU4gxr9sRyDUE=\n-----END CERTIFICATE-----\n"
},
"httpOptions": {
"verify": false
}
}
}
}
The docker-compose-files are from the sample which you can find here
Connection profile for java client:
---
name: first-network-org1
version: 1.0.0
client:
organization: Org1
connection:
timeout:
peer:
endorser: '300'
organizations:
Org1:
mspid: Org1MSP
peers:
- peer0.org1.example.com
- peer1.org1.example.com
certificateAuthorities:
- ca.org1.example.com
peers:
peer0.org1.example.com:
url: grpc://host.westeurope.cloudapp.azure.com:7051
grpcOptions:
hostnameOverride: peer0.org1.example.com
peer1.org1.example.com:
url: grpc://host.westeurope.cloudapp.azure.com:8051
grpcOptions:
hostnameOverride: peer1.org1.example.com
certificateAuthorities:
ca.org1.example.com:
url: http://host.westeurope.cloudapp.azure.com:7054
caName: ca-org1
tlsCACerts:
pem: |
-----BEGIN CERTIFICATE-----
MIICUTCCAfigAwIBAgIRAOQg6uxnfvgg3yqAMZweQYAwCgYIKoZIzj0EAwIwczEL
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG
cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh
Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjAwMjA3MDk1MjAwWhcNMzAwMjA0MDk1MjAw
WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN
U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE
AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA
BCy2SE6qr2epo6P+aAH0j5ujopYEN2CzIemCZ+otF1DVuMQXS7eGCSzzuIXnYxS7
tXD8LCUgWBoAmC1bw9EzvUqjbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAU
BggrBgEFBQcDAgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg
Dh/n8cBOMOCgmnwLHdmym+lVomH2IeCPb9mrBR7QM7IwCgYIKoZIzj0EAwIDRwAw
RAIgWyr53EneGSvlRyiMR+OMeGY3S2Mli7i1kfUTdLMsVC8CIBJh06he30d6DrKS
c/XSsRmtOxLIo+SCyebzBzVnqaYL
-----END CERTIFICATE-----
httpOptions:
verify: false

Cannot broadcast WebRTC on Red5Pro 5.2.0

We're trying to use a default broadcast via WebRTC webpage that comes with Red5Pro server
https://hostname-here/live/broadcast.jsp?host=hostname-here
Client logs:
[live]:: Publish options:
{
"protocol": "wss",
"port": 8083,
"app": "live",
"streamMode": "live",
"mediaElementId": "red5pro-publisher",
"iceServers": [
{
"urls": "stun:stun2.l.google.com:19302"
}
],
"iceTransport": "udp",
"bandwidth": {
"audio": 56,
"video": 750
},
"mediaConstraints": {
"audio": true,
"video": {
"width": {
"min": 640,
"max": 640
},
"height": {
"min": 480,
"max": 480
},
"frameRate": {
"min": 8,
"max": 24
}
}
},
"host": "hostname-here",
"streamName": "teststream2"
}
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.931Z - [red5pro-sdk] debug: (RTCPublisher) [publish]
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.931Z - [red5pro-sdk] debug: (R5ProPublisherSocket) [websocket:setup] wss://hostname-here:8083/live?id=teststream2.
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.932Z - [red5pro-sdk] debug: (R5ProPublisherSocket) [teardown] >>
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.932Z - [red5pro-sdk] debug: (R5ProPublisherSocket) [WebSocket(wss://hostname-here:8083/live?id=teststream2)] close() >>
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.933Z - [red5pro-sdk] debug: (R5ProPublisherSocket) << [WebSocket(wss://hostname-here:8083/live?id=teststream2)] close()
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.933Z - [red5pro-sdk] debug: (R5ProPublisherSocket) << [teardown]
red5pro-sdk.min.js:formatted:255 WebSocket connection to 'wss://hostname-here:8083/live?id=teststream2' failed: Error during WebSocket handshake: Unexpected response code: 400
createWebSocket # red5pro-sdk.min.js:formatted:255
t.create # red5pro-sdk.min.js:formatted:1830
value # red5pro-sdk.min.js:formatted:2196
value # red5pro-sdk.min.js:formatted:5680
(anonymous) # r5pro-publisher-failover.js:393
promisify # r5pro-publisher-failover.js:338
publish # r5pro-publisher-failover.js:377
(anonymous) # r5pro-publisher-failover.js:198
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:17:01.727Z - [red5pro-sdk] warn: (R5ProPublisherSocket) [websocketerror]: Error from WebSocket. error.
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:17:01.728Z - [red5pro-sdk] debug: ([window:orientation]) [removeOrientationChangeHandler]:: onorientationchange removed.
3r5pro-publisher-failover.js:311 [Red5ProPublisher] Connect.Failure.
r5pro-publisher-failover.js:405 [live]:: Error in publish request: [object Event]
(anonymous) # r5pro-publisher-failover.js:405
Promise.catch (async)
(anonymous) # r5pro-publisher-failover.js:403
promisify # r5pro-publisher-failover.js:338
publish # r5pro-publisher-failover.js:377
(anonymous) # r5pro-publisher-failover.js:198
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:17:01.731Z - [red5pro-sdk] warn: (R5ProPublisherSocket) [websocketclose]: 1006
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:17:01.732Z - [red5pro-sdk] debug: (RTCPublisher) RTCPublisher
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:17:01.732Z - [red5pro-sdk] debug: (R5ProPublishPeer) [teardown]
Server logs:
[WARN] [NioProcessor-20] org.red5.net.websocket.WebSocketConnection - Closing connection with status: 1002
[WARN] [NioProcessor-20] org.red5.net.websocket.codec.WebSocketDecoder - Handshake failed
org.red5.net.websocket.WebSocketException: Handshake failed, path not enabled
at org.red5.net.websocket.codec.WebSocketDecoder.parseClientRequest(WebSocketDecoder.java:302)
at org.red5.net.websocket.codec.WebSocketDecoder.doHandShake(WebSocketDecoder.java:186)
at org.red5.net.websocket.codec.WebSocketDecoder.doDecode(WebSocketDecoder.java:98)
at org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(CumulativeProtocolDecoder.java:180)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:253)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:641)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1114)
at org.apache.mina.filter.ssl.SslHandler.flushScheduledEvents(SslHandler.java:323)
at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:565)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:641)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1114)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:121)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:641)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:634)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:539)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$1200(AbstractPollingIoProcessor.java:68)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1242)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1231)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:683)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Red5Pro server has a valid SSL certificate and a public IP. The version is 5.2.0, ports 8081 and 8083 are open.
We have the libraries mentioned in this answer installed
Turned out the reason for the issue was the WebRTC plugin was disabled.
Not sure why I did not figure that out right away. Maybe I was confused by messages in the log about WebSocket plugin and the WebSocket error
[INFO] [main] com.red5pro.license.LicenseManager - addListener: Red5Pro-Clustering
[INFO] [main] org.red5.server.plugin.PluginLauncher - Loaded plugin: com.red5pro.cluster.plugin.ClusterPlugin
[INFO] [main] com.red5pro.license.LicenseManager - addListener: Red5Pro-RTSP-Plugin
[INFO] [main] org.red5.server.plugin.PluginLauncher - Loaded plugin: com.red5pro.rtsp.plugin.RTSPPlugin
[INFO] [main] com.red5pro.activation.ProPluginator - Version - server: RED5/1,0,10,0 pro: 5.2.0.b271-release
[INFO] [main] com.red5pro.activation.ProPluginator - Operating system: Linux version: 4.15.0-1023-azure
[INFO] [main] com.red5pro.activation.ProPluginator - Processor arch: amd64 available: 2
[INFO] [main] com.red5pro.activation.ProPluginator - Memory - free: 190632384 total: 251002880 max: 1626734592
[INFO] [main] com.red5pro.activation.ProPluginator - Starting Red5 Professional, pluginator version 5.2.0.271-RELEASE - b22d2d1 (on: 10.12.2018 09:38)
[INFO] [main] com.red5pro.override.internal.ProvisionResolverService - setting MBR spliterator ~
[INFO] [main] com.red5pro.override.internal.ProvisionResolverService - inspecting prewire
[INFO] [main] com.red5pro.license.LicenseManager - addListener: Red5Pro-SecondScreen-Websockets
[INFO] [main] com.red5pro.activation.ProPluginator - Red5 Professional Activating
[INFO] [main] com.red5pro.activation.ProPluginator - Plugination activation waiting for server to settle...
[INFO] [main] org.red5.server.plugin.PluginLauncher - Loaded plugin: com.red5pro.activation.ProPluginator
[INFO] [main] com.red5pro.license.LicenseManager - addListener: Red5Pro-Cloudstorage
[INFO] [main] org.red5.server.plugin.PluginLauncher - Loaded plugin: com.red5pro.media.storage.CloudstoragePlugin
[INFO] [main] org.red5.server.plugin.PluginLauncher - Loaded plugin: org.red5.net.websocket.WebSocketPlugin
[INFO] [main] com.red5pro.license.LicenseManager - addListener: Red5Pro-AutoScale
[INFO] [main] org.red5.server.plugin.PluginLauncher - Loaded plugin: com.red5pro.clustering.autoscale.AutoScale
[INFO] [main] org.red5.net.websocket.WebSocketTransport - WebSocket (wss) will be bound to [0.0.0.0:8083]
Maybe that helps somebody.

Production build cannot find view

I am using Sencha Touch version 2.1.1 and CMD version 3.0.2.288.
I am converting a working 2.0 application to 2.1.
When I build the application and run it, I get errors indicating that views cannot be loaded. When I look in the build folder at the path indicated by the error, the views are not there.
Here is the error:
http://localhost:8888/Mobile/build/a...24263186Failed to load resource: the server responded with a status of 404 (Not Found)
The application runs perfectly in Safari prior to building. Does anyone have any ideas?
Output from the compilation is below
Sencha Cmd v3.0.2.288
[INF]
[INF] init-properties:
[INF]
[INF] init-sencha-command:
[INF]
[INF] init:
[INF]
[INF] -before-app-build:
[INF]
[INF] app-build-impl:
[INF]
[INF] production:
[INF]
[INF] -before-init-local:
[INF]
[INF] -init-local:
[INF]
[INF] -after-init-local:
[INF]
[INF] init-local:
[INF]
[INF] find-cmd:
[INF]
[INF] -before-init:
[INF]
[INF] -init:
[INF]
[INF] -after-init:
[INF]
[INF] init:
[INF]
[INF] -before-build:
[INF]
[INF] sass:
[INF]
[INF] page:
[INF]
[INF] -before-page:
[INF]
[INF] -page:
[INF] building application
[INF] Deploying your application to /Applications/MAMP/htdocs/Mobile/build/app/production
[INF] Copied /Applications/MAMP/htdocs/Mobile/./app.js to /Applications/MAMP/htdocs/Mobile/build/app/production/app.js
[INF] Copied /Applications/MAMP/htdocs/Mobile/./resources/css/app.css to /Applications/MAMP/htdocs/Mobile/build/app/production/resources/css/app.css
[INF] Copied /Applications/MAMP/htdocs/Mobile/./resources/images
[INF] Copied /Applications/MAMP/htdocs/Mobile/./resources/icons
[INF] Copied /Applications/MAMP/htdocs/Mobile/./resources/loading
[INF] Copied /Applications/MAMP/htdocs/Mobile/./resources/data
[INF] Resolving your application dependencies (file:////Applications/MAMP/htdocs/Mobile/./index.html)
[INF] Compiling app.js and dependencies
[INF] Processing classPath entry : /Applications/MAMP/htdocs/Mobile/sencha-compile-temp-dir
[INF] Processing classPath entry : /Applications/MAMP/htdocs/Mobile/touch/src
[INF] Processing classPath entry : /Applications/MAMP/htdocs/Mobile/app.js
[INF] Processing classPath entry : /Applications/MAMP/htdocs/Mobile/app
[INF] Processing class inheritance graph
[INF] Processing instantiation refereces to classes and aliases
[INF] Processing source dependencies
[INF] Concatenating output to file /Applications/MAMP/htdocs/Mobile/build/app/production/app.js
[INF] Completed compilation.
[INF] Processed remote file touch/sencha-touch.js
[INF] Processed local file app.js
[INF] Minified app.js
[INF] Generated delta for: app.js from hash: '0cf2d66c793df3275db06ce3c88737d55b92c0ac' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Generated delta for: app.js from hash: '3defd723a308dffa24d79abe9b36efaea9b7fa2c' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Generated delta for: app.js from hash: '68b15cd8c4470cae367618d56d2221f750fe94c5' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Generated delta for: app.js from hash: '7abfe02aa5647b33770d8584330c838c7228e6a3' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Generated delta for: app.js from hash: '955de9ce50a676d272e4b81984164be49b347f01' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Generated delta for: app.js from hash: 'bb51ed6de771efa962e01e67807e488d760b63a0' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Generated delta for: app.js from hash: 'ce841c66ba0f08125ef8a850960c4b0366ef061f' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Generated delta for: app.js from hash: 'd09ff9bd2f3c719c21fe44c3a7d6a2f3690bc816' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Generated delta for: app.js from hash: 'fbb192007fd273dd08359e426311be7688656b2a' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d'
[INF] Minified resources/css/app.css
[INF] Generated app.json
[INF] Embedded microloader into index.html
[INF] Generating appcache
[INF] Generating checksum for appCache item: index.html
[INF] Generating checksum for appCache item: resources/css/app.css
[INF] Generating checksum for appCache item: resources/data/data.json
[INF] Generating checksum for appCache item: resources/images/Billing.png
[INF] Generating checksum for appCache item: resources/images/Billing#2x.png
[INF] Generating checksum for appCache item: resources/images/Biochem.png
[INF] Generating checksum for appCache item: resources/images/Biochem#2x.png
[INF] Generating checksum for appCache item: resources/images/Contact.png
[INF] Generating checksum for appCache item: resources/images/Contact#2x.png
[INF] Generating checksum for appCache item: resources/images/Cyto.png
[INF] Generating checksum for appCache item: resources/images/Cyto#2x.png
[INF] Generating checksum for appCache item: resources/images/Disclosure.png
[INF] Generating checksum for appCache item: resources/images/Disclosure#2x.png
[INF] Generating checksum for appCache item: resources/images/FAQ.png
[INF] Generating checksum for appCache item: resources/images/FAQ#2x.png
[INF] Generating checksum for appCache item: resources/images/Feedback.png
[INF] Generating checksum for appCache item: resources/images/Feedback#2x.png
[INF] Generating checksum for appCache item: resources/images/IntegratedTesting.png
[INF] Generating checksum for appCache item: resources/images/IntegratedTesting#2x.png
[INF] Generating checksum for appCache item: resources/images/Molecular.png
[INF] Generating checksum for appCache item: resources/images/Molecular#2x.png
[INF] Generating checksum for appCache item: resources/images/S.png
[INF] Generating checksum for appCache item: resources/images/S#2x.png
[INF] Generating checksum for appCache item: resources/images/TestMenu.png
[INF] Generating checksum for appCache item: resources/images/TestMenu#2x.png
[INF] Generating checksum for appCache item: resources/loading/Default-LandscapeLeft~ipad.png
[INF] Generating checksum for appCache item: resources/loading/Default-LandscapeRight~ipad.png
[INF] Generating checksum for appCache item: resources/loading/Default-Landscape~ipad.png
[INF] Generating checksum for appCache item: resources/loading/Default-PortraitUpsideDown~ipad.png
[INF] Generating checksum for appCache item: resources/loading/Default-Portrait~ipad.png
[INF] Generating checksum for appCache item: resources/loading/Default.png
[INF] Generating checksum for appCache item: resources/loading/Default#2x.png
[INF] Generating checksum for appCache item: resources/loading/Default~ipad.png
[INF] Generating checksum for appCache item: resources/loading/Homescreen.jpg
[INF] Generating checksum for appCache item: resources/loading/Homescreen~ipad.jpg
[INF] Successfully deployed your application to /Applications/MAMP/htdocs/Mobile/build/app/production
[INF]
[INF] -after-page:
[INF]
[INF] run:
[INF]
[INF] -build:
[INF]
[INF] -after-build:
[INF]
[INF] build:
[INF]
[INF] -after-app-build:
[INF]
[INF] app-build:
Here is my app.json:
{
/**
* The application's namespace, used by Sencha Command to generate classes
*/
"name": "App",
/**
* List of all JavaScript assets in the right execution order.
* Each item is an object with the following format:
* {
* "path": "path/to/script.js" // Relative path to this app.json file
* "update": "delta" // (Optional)
* // - If not specified, this file will only be loaded once, and
* // cached inside localStorage until this value is changed.
* // - "delta" to enable over-the-air delta update for this file
* // - "full" means full update will be made when this file changes
*
* }
*/
"js": [
{
"path": "touch/sencha-touch.js"
},
{
"path": "app.js",
"update": "delta"
}
],
/**
* List of all CSS assets in the right inclusion order.
* Each item is an object with the following format:
* {
* "path": "path/to/item.css" // Relative path to this app.json file
* "update": "delta" // (Optional)
* // - If not specified, this file will only be loaded once, and
* // cached inside localStorage until this value is changed to either one below
* // - "delta" to enable over-the-air delta update for this file
* // - "full" means full update will be made when this file changes
*
* }
*/
"css": [
{
"path": "resources/css/app.css",
"update": "delta"
}
],
/**
* Used to automatically generate cache.manifest (HTML 5 application cache manifest) file when you build
*/
"appCache": {
/**
* List of items in the CACHE MANIFEST section
*/
"cache": [
"index.html",
"resources/css/app.css",
"resources/data/data.json",
"resources/images/Billing.png",
"resources/images/Billing#2x.png",
"resources/images/Biochem.png",
"resources/images/Biochem#2x.png",
"resources/images/Contact.png",
"resources/images/Contact#2x.png",
"resources/images/Cyto.png",
"resources/images/Cyto#2x.png",
"resources/images/Disclosure.png",
"resources/images/Disclosure#2x.png",
"resources/images/FAQ.png",
"resources/images/FAQ#2x.png",
"resources/images/Feedback.png",
"resources/images/Feedback#2x.png",
"resources/images/IntegratedTesting.png",
"resources/images/IntegratedTesting#2x.png",
"resources/images/Molecular.png",
"resources/images/Molecular#2x.png",
"resources/images/S.png",
"resources/images/S#2x.png",
"resources/images/TestMenu.png",
"resources/images/TestMenu#2x.png",
"resources/loading/Default-LandscapeLeft~ipad.png",
"resources/loading/Default-LandscapeRight~ipad.png",
"resources/loading/Default-Landscape~ipad.png",
"resources/loading/Default-PortraitUpsideDown~ipad.png",
"resources/loading/Default-Portrait~ipad.png",
"resources/loading/Default.png",
"resources/loading/Default#2x.png",
"resources/loading/Default~ipad.png",
"resources/loading/Homescreen.jpg",
"resources/loading/Homescreen~ipad.jpg"
//"touch/sencha-touch.js",
],
/**
* List of items in the NETWORK section
*/
"network": [
"*"
],
/**
* List of items in the FALLBACK section
*/
"fallback": []
},
/**
* Extra resources to be copied along when build
*/
"extras": [
"resources/images",
"resources/icons",
"resources/loading",
"resources/data"
],
/**
* Directory path to store all previous production builds. Note that the content generated inside this directory
* must be kept intact for proper generation of delta between updates
*/
"archivePath": "archive",
/**
* Default paths to build this application to for each environment
*/
"buildPaths": {
"testing": "build/testing",
"production": "build/production",
"package": "build/package",
"native": "build/native"
},
/**
* Build options
*/
"buildOptions": {
"product": "touch",
"minVersion": 3,
"debug": false,
"logger": "no"
},
/**
* Uniquely generated id for this application, used as prefix for localStorage keys.
* Normally you should never change this value.
*/
"id": "996b4be0-9f88-11e1-b590-67deda5f4cdb"
}
Here is the app.js
Ext.Loader.setPath({
'Ext': 'touch/src'
});
Ext.application({
name: 'App',
requires: [
'Ext.MessageBox'
],
views: [
'Main',
'Homepage',
'Sections',
'Detail',
'RequisitionRequest'
],
models: [
'Sections'
],
stores: [
'Sections'
],
controllers: [
'Main'
],
icon: {
57: 'resources/icons/Icon.png',
72: 'resources/icons/Icon~ipad.png',
114: 'resources/icons/Icon#2x.png',
144: 'resources/icons/Icon~ipad#2x.png'
},
phoneStartupScreen: 'resources/loading/Homescreen.jpg',
tabletStartupScreen: 'resources/loading/Homescreen~ipad.jpg',
launch: function() {
// Destroy the #appLoadingIndicator element
Ext.fly('appLoadingIndicator').destroy();
// Initialize the main view
Ext.Viewport.add(Ext.create('App.view.Main'));
// Initialize the requisition request view
//Ext.Viewport.add(Ext.create('App.view.RequisitionRequest'));
},
onUpdated: function() {
Ext.Msg.confirm(
"Application Update",
"This application has just successfully been updated to the latest version. Reload now?",
function(buttonId) {
if (buttonId === 'yes') {
window.location.reload();
}
}
);
}
});
Problem solved! The following snippet was at the bottom of my Main.js view adn I completely missed it. After I removed it the application runs properly after building.
/**
* Fix for Bug TOUCH-2665 (Sencha Touch 2.0.1 RC)
* must be removed in next release
*/
Ext.define('App.Tabfix', {
override: 'Ext.tab.Panel',
doTabChange: function(tabBar, newTab) {
this.setActiveItem(tabBar.indexOf(newTab));
}
});