thingsboard / thingsboard

Open-source IoT Platform - Device management, data collection, processing and visualization.
https://thingsboard.io
Apache License 2.0
17.41k stars 5.15k forks source link

[Question] Installation Problem of PE 3.3.2 #5766

Closed BaerSy closed 2 years ago

BaerSy commented 2 years ago

Thingsboard PE 3.3.2

Description We have used Thingsboard for a long time and without installation issue, This time I just wanted to upgraded it to PE3.3.2 with the following docker-compose.yml. We installed it as a new version, not going with upgrading it.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ version: '2.2' services: mytbpe: restart: unless-stopped image: "store/thingsboard/tb-pe:3.3.2PE" expose:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

We installed PE with this yml file for quite few installations without problem. But we got the interesting problem this time:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 27f0660fc406 store/thingsboard/tb-pe:3.3.2PE "start-tb.sh" About an hour ago Up About an hour 0.0.0.0:1883->1883/tcp, :::1883->1883/tcp, 0.0.0.0:7070->7070/tcp, :::7070->7070/tcp, 0.0.0.0:5683-5688->5683-5688/udp, :::5683-5688->5683-5688/udp, 8080/tcp, 0.0.0.0:8080->9090/tcp, :::8080->9090/tcp tbpe_mytbpe_1 d8ff7c489b7e postgres:12 "docker-entrypoint.s…" About an hour ago Up About an hour 0.0.0.0:49155->5432/tcp, :::49155->5432/tcp tbpe_postgres_1

When I checked what ports are listening, I found:

sshd 141002 root 3u IPv4 581347 0t0 TCP :22 (LISTEN) sshd 141002 root 4u IPv6 581360 0t0 TCP :22 (LISTEN) systemd-r 141114 systemd-resolve 13u IPv4 581947 0t0 TCP 127.0.0.53:53 (LISTEN) sshd 172755 tbpe 10u IPv6 688718 0t0 TCP [::1]:6010 (LISTEN) sshd 172755 tbpe 11u IPv4 688719 0t0 TCP 127.0.0.1:6010 (LISTEN) docker-pr 181541 root 4u IPv4 729519 0t0 TCP :49155 (LISTEN) docker-pr 181547 root 4u IPv6 729528 0t0 TCP :49155 (LISTEN) docker-pr 181680 root 4u IPv4 729889 0t0 TCP :8080 (LISTEN) docker-pr 181686 root 4u IPv6 729896 0t0 TCP :8080 (LISTEN) docker-pr 181700 root 4u IPv4 729939 0t0 TCP :7070 (LISTEN) docker-pr 181707 root 4u IPv6 730412 0t0 TCP :7070 (LISTEN) docker-pr 181842 root 4u IPv4 730692 0t0 TCP :1883 (LISTEN) docker-pr 181847 root 4u IPv6 730697 0t0 TCP :1883 (LISTEN) sshd 182194 tbpe 10u IPv6 735217 0t0 TCP [::1]:6011 (LISTEN) sshd 182194 tbpe 11u IPv4 735218 0t0 TCP 127.0.0.1:6011 (LISTEN)

Never saw 9090

I checked logs, found 9090 was used in gRPC....and 8080 used Tomcat:

mytbpe_1 | 2021-12-22 23:48:01,668 [main] INFO o.t.s.s.i.r.GrpcIntegrationRpcService - Initializing RPC service! mytbpe_1 | 2021-12-22 23:48:02,142 [main] INFO o.t.s.s.i.r.GrpcIntegrationRpcService - Going to start RPC server using port: 9090 mytbpe_1 | 2021-12-22 23:48:02,296 [main] INFO o.t.s.s.i.r.GrpcIntegrationRpcService - RPC service initialized! mytbpe_1 | 2021-12-22 23:48:02,361 [main] INFO o.e.c.c.network.RandomTokenGenerator - using tokens of 8 bytes in length mytbpe_1 | 2021-12-22 23:48:02,393 [main] INFO o.e.c.core.network.CoapEndpoint - coap CoapEndpoint uses udp plain mytbpe_1 | 2021-12-22 23:48:02,409 [main] INFO o.e.c.c.network.stack.BlockwiseLayer - BlockwiseLayer uses MAX_MESSAGE_SIZE=1024, PREFERRED_BLOCK_SIZE=1024, BLOCKWISE_STATUS_LIFETIME=300000, MAX_RESOURCE_BODY_SIZE=268435456, BLOCKWISE_STRICT_BLOCK2_OPTION=true mytbpe_1 | 2021-12-22 23:48:02,413 [main] INFO o.e.c.c.n.stack.ReliabilityLayer - ReliabilityLayer uses ACK_TIMEOUT=2000, ACK_RANDOM_FACTOR=1.5, and ACK_TIMEOUT_SCALE=2.0 as default mytbpe_1 | 2021-12-22 23:48:02,419 [main] INFO o.e.californium.core.CoapServer - Starting server mytbpe_1 | 2021-12-22 23:48:02,437 [main] INFO o.e.c.elements.UDPConnector - UDPConnector starts up 1 sender threads and 1 receiver threads mytbpe_1 | 2021-12-22 23:48:02,443 [main] INFO o.e.c.elements.UDPConnector - UDPConnector listening on 0.0.0.0/0.0.0.0:5683, recv buf = 106496, send buf = 106496, recv packet size = 2048 mytbpe_1 | 2021-12-22 23:48:02,444 [main] INFO o.e.c.core.network.CoapEndpoint - coap Started endpoint at coap://0.0.0.0:5683 mytbpe_1 | 2021-12-22 23:48:02,497 [main] INFO o.t.s.a.service.DefaultActorService - Initializing actor system. mytbpe_1 | 2021-12-22 23:48:02,519 [main] INFO o.t.s.a.service.DefaultActorService - Actor system initialized. mytbpe_1 | 2021-12-22 23:48:02,642 [main] INFO o.t.s.s.edge.rpc.EdgeGrpcService - Initializing Edge RPC service! mytbpe_1 | 2021-12-22 23:48:02,662 [main] INFO o.t.s.s.edge.rpc.EdgeGrpcService - Going to start Edge RPC server using port: 7070 mytbpe_1 | 2021-12-22 23:48:02,662 [main] INFO o.t.s.s.edge.rpc.EdgeGrpcService - Edge RPC service initialized! mytbpe_1 | 2021-12-22 23:48:04,324 [main] INFO o.t.s.c.adaptor.JsonConverterConfig - JSON type cast enabled = true mytbpe_1 | 2021-12-22 23:48:04,324 [main] INFO o.t.s.c.adaptor.JsonConverterConfig - JSON max string value length = 0 mytbpe_1 | 2021-12-22 23:48:04,358 [main] INFO o.t.s.t.mqtt.MqttTransportService - Setting resource leak detector level to DISABLED mytbpe_1 | 2021-12-22 23:48:04,358 [main] INFO o.t.s.t.mqtt.MqttTransportService - Starting MQTT transport... mytbpe_1 | 2021-12-22 23:48:04,413 [main] INFO o.t.s.t.mqtt.MqttTransportService - Mqtt transport started! mytbpe_1 | 2021-12-22 23:48:04,448 [main] INFO o.t.s.t.coap.CoapTransportService - Starting CoAP transport... mytbpe_1 | 2021-12-22 23:48:04,455 [main] INFO o.t.s.t.coap.Co

mytbpe_1 | 2021-12-22 23:50:01,894 [main] INFO o.s.s.c.ThreadPoolTaskScheduler - Initializing ExecutorService 'taskScheduler' mytbpe_1 | 2021-12-22 23:50:02,471 [main] INFO o.s.b.a.w.s.WelcomePageHandlerMapping - Adding welcome page: class path resource [public/index.html] mytbpe_1 | 2021-12-22 23:50:03,753 [main] INFO o.s.i.endpoint.EventDrivenConsumer - Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel mytbpe_1 | 2021-12-22 23:50:03,753 [main] INFO o.s.i.c.PublishSubscribeChannel - Channel 'application.errorChannel' has 1 subscriber(s). mytbpe_1 | 2021-12-22 23:50:03,754 [main] INFO o.s.i.endpoint.EventDrivenConsumer - started bean '_org.springframework.integration.errorLogger' mytbpe_1 | 2021-12-22 23:50:03,755 [main] INFO o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-0.0.0.0-8080"] mytbpe_1 | 2021-12-22 23:50:03,796 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port(s): 8080 (http) with context path '' mytbpe_1 | 2021-12-22 23:50:10,962 [TB-Scheduling-1] INFO o.t.s.c.t.s.DefaultTransportService - Transport Stats: openConnections [0] mytbpe_1 | 2021-12-22 23:50:10,971 [main] INFO o.t.s.ThingsboardServerApplication - Started ThingsboardServerApplication in 159.963 seconds (JVM running for 162.16) mytbpe_1 | 2021-12-22 23:50:11,026 [main] INFO o.t.s.q.d.HashPartitionService - [27f0660fc406] Found common server: [[TB_CORE, TB_RULE_ENGINE, TB_TRANSPORT, JS_EXECUTOR]] mytbpe_1 | 2021-12-22 23:50:11,030 [main] INFO o.t.s.q.d.HashPartitionService - [ServiceQueueKey(serviceQueue=ServiceQueue(type=TB_CORE, queue=Main), tenantId=13814000-1dd2-11b2-8080-808080808080)] NEW PARTITIONS: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] mytbpe_1 | 2021-12-22 23:50:11,034 [main] INFO o.t.s.s.a.DefaultTbApiUsageStateService - Initializing tenant states. mytbpe_1 | 2021-12-22 23:50:11,237 [main] INFO o.t.s.s.a.DefaultTbApiUsageStateService - Initialized tenant states. mytbpe_1 | 2021-12-22 23:50:11,240 [device-state-scheduled-22-thread-1] INFO o.t.s.s.s.DefaultDeviceStateService - CURRENT PARTITIONS: []

Very confused with this result. I don't know what's wrong.

Environment

BaerSy commented 2 years ago

After updated docker-compose.yml

version: '3' services: mytbpe: restart: always image: "store/thingsboard/tb-pe:3.3.2PE" ports:

I can't see any errors, but the system can't map 8080 to 9090:

cupsd 556 root 6u IPv6 23507 0t0 TCP ip6-localhost:631 (LISTEN) cupsd 556 root 7u IPv4 23508 0t0 TCP localhost:631 (LISTEN) systemd-r 31857 systemd-resolve 13u IPv4 479381 0t0 TCP localhost:53 (LISTEN) docker-pr 603479 root 4u IPv4 3225441 0t0 TCP :49175 (LISTEN) docker-pr 603484 root 4u IPv6 3225448 0t0 TCP :49175 (LISTEN) docker-pr 603603 root 4u IPv4 3225981 0t0 TCP :8080 (LISTEN) docker-pr 603608 root 4u IPv6 3225988 0t0 TCP :8080 (LISTEN) docker-pr 603623 root 4u IPv4 3226040 0t0 TCP :7070 (LISTEN) docker-pr 603628 root 4u IPv6 3226047 0t0 TCP :7070 (LISTEN) docker-pr 603764 root 4u IPv4 3226543 0t0 TCP :1883 (LISTEN) docker-pr 603769 root 4u IPv6 3226550 0t0 TCP :1883 (LISTEN)

and http://xxx.xxx.xxx.xxx:9090 or http://xxx.xxx.xxx.xxx:8080 do not work,

BaerSy commented 2 years ago

After updated docker-compose.yml as below. It works. But just want to know whether PE 3.3.2 only can be mapped to 8080?

version: '2.2' services: mytbpe: restart: always image: "store/thingsboard/tb-pe:3.3.2PE" ports:

SergMeleshko commented 2 years ago

Hello @BaerSy Try to change port "8080:8080" to "9090:8080"