Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThingsBoard Edge starting failed with Error: SNMP Transport #129

Open
4NUR46 opened this issue Nov 20, 2024 · 4 comments
Open

ThingsBoard Edge starting failed with Error: SNMP Transport #129

4NUR46 opened this issue Nov 20, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@4NUR46
Copy link

4NUR46 commented Nov 20, 2024

Describe the bug
I am encountering an error when trying to start ThingsBoard Edge.

Error log
cat /var/log/tb-edge/tb-edge.log

2024-11-20 15:18:42,711 [background-preinit] INFO  o.h.validator.internal.util.Version - HV000001: Hibernate Validator 8.0.1.Final
2024-11-20 15:18:43,418 [main] INFO  o.t.server.TbEdgeApplication - Starting TbEdgeApplication v3.8.0EDGE using Java 17.0.13 with PID 17997 (/usr/share/tb-edge/bin/tb-edge.jar started by thingsboard in /usr/share/tb-edge/bin)
2024-11-20 15:18:43,422 [main] INFO  o.t.server.TbEdgeApplication - No active profile set, falling back to 1 default profile: "default"
2024-11-20 15:18:45,518 [main] WARN  o.s.c.a.AnnotationTypeMapping - Support for convention-based annotation attribute overrides is deprecated and will be removed in Spring Framework 6.2. Please annotate the following attributes in @org.thingsboard.server.config.annotations.ApiOperation with appropriate @AliasFor declarations: [hidden, requestBody, responses]
2024-11-20 15:18:57,572 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
2024-11-20 15:18:57,572 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data JPA repositories in LAZY mode.
2024-11-20 15:18:58,254 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 632 ms. Found 1 JPA repository interface.
2024-11-20 15:18:58,262 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
2024-11-20 15:18:58,263 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data JPA repositories in LAZY mode.
2024-11-20 15:18:58,309 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 46 ms. Found 1 JPA repository interface.
2024-11-20 15:18:58,312 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
2024-11-20 15:18:58,312 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data JPA repositories in LAZY mode.
2024-11-20 15:18:59,336 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 1023 ms. Found 54 JPA repository interfaces.
2024-11-20 15:18:59,338 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
2024-11-20 15:18:59,338 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data JPA repositories in LAZY mode.
2024-11-20 15:18:59,448 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 109 ms. Found 6 JPA repository interfaces.
2024-11-20 15:19:02,877 [main] INFO  o.s.i.c.DefaultConfiguringBeanFactoryPostProcessor - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
2024-11-20 15:19:02,944 [main] INFO  o.s.i.c.DefaultConfiguringBeanFactoryPostProcessor - No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
2024-11-20 15:19:07,047 [main] INFO  o.t.s.q.d.DefaultTbServiceInfoProvider - Current Service ID: 9240057
2024-11-20 15:19:09,991 [main] INFO  o.h.jpa.internal.util.LogHelper - HHH000204: Processing PersistenceUnitInfo [name: default]
2024-11-20 15:19:10,430 [main] INFO  org.hibernate.Version - HHH000412: Hibernate ORM core version 6.4.4.Final
2024-11-20 15:19:10,683 [main] INFO  o.h.c.i.RegionFactoryInitiator - HHH000026: Second-level cache disabled
2024-11-20 15:19:11,478 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
2024-11-20 15:19:12,907 [main] INFO  com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@1140585
2024-11-20 15:19:12,918 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
2024-11-20 15:19:15,796 [main] INFO  o.s.o.j.p.SpringPersistenceUnitInfo - No LoadTimeWeaver setup: ignoring JPA class transformer
2024-11-20 15:19:27,075 [main] INFO  o.h.e.t.j.p.i.JtaPlatformInitiator - HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
2024-11-20 15:19:27,153 [main] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'default'
2024-11-20 15:19:34,190 [main] INFO  o.s.d.j.r.query.QueryEnhancerFactory - Hibernate is in classpath; If applicable, HQL parser will be used.
2024-11-20 15:19:40,591 [main] INFO  o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http)
2024-11-20 15:19:40,677 [main] INFO  o.a.coyote.http11.Http11NioProtocol - The ["http-nio-0.0.0.0-8080"] connector has been configured to support HTTP upgrade to [h2c]
2024-11-20 15:19:40,678 [main] INFO  o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-0.0.0.0-8080"]
2024-11-20 15:19:40,690 [main] INFO  o.a.catalina.core.StandardService - Starting service [Tomcat]
2024-11-20 15:19:40,691 [main] INFO  o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.19]
2024-11-20 15:19:40,960 [main] INFO  o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
2024-11-20 15:19:40,961 [main] INFO  o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 56915 ms
2024-11-20 15:19:42,181 [main] INFO  o.t.s.d.a.CachedAttributesService - Going to use directExecutor for the local cache type caffeine
2024-11-20 15:19:45,240 [main] INFO  o.t.s.s.a.DefaultTbApiUsageStateService - Starting api usage service.
2024-11-20 15:19:45,271 [main] INFO  o.t.s.s.a.DefaultTbApiUsageStateService - Started api usage service.
2024-11-20 15:19:52,286 [main] INFO  o.t.s.t.h.config.PayloadSizeFilter - Initialized payload size filter with configuration: /api/image*/**=52428800;/api/resource/**=52428800;/api/**=16777216
2024-11-20 15:19:52,530 [main] INFO  o.t.s.t.h.config.PayloadSizeFilter - Initialized payload size filter with configuration: /api/v1/*/rpc/**=65536;/api/v1/**=52428800
2024-11-20 15:19:53,713 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: zookeeper.version=3.9.2-e454e8c7283100c7caec6dcae2bc82aaecb63023, built on 2024-02-12 20:59 UTC
2024-11-20 15:19:53,714 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: host.name=0.140.253.249
2024-11-20 15:19:53,714 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: java.version=17.0.13
2024-11-20 15:19:53,714 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: java.vendor=Ubuntu
2024-11-20 15:19:53,714 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: java.home=/usr/lib/jvm/java-17-openjdk-amd64
2024-11-20 15:19:53,714 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: java.class.path=/usr/share/tb-edge/bin/tb-edge.jar
2024-11-20 15:19:53,714 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: java.library.path=/usr/java/packages/lib:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
2024-11-20 15:19:53,714 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: java.io.tmpdir=/tmp
2024-11-20 15:19:53,714 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: java.compiler=<NA>
2024-11-20 15:19:53,714 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: os.name=Linux
2024-11-20 15:19:53,714 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: os.arch=amd64
2024-11-20 15:19:53,715 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: os.version=5.15.0-125-generic
2024-11-20 15:19:53,715 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: user.name=thingsboard
2024-11-20 15:19:53,715 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: user.home=/usr/share/tb-edge
2024-11-20 15:19:53,715 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: user.dir=/usr/share/tb-edge/bin
2024-11-20 15:19:53,715 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: os.memory.free=44MB
2024-11-20 15:19:53,715 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: os.memory.max=1948MB
2024-11-20 15:19:53,715 [main] INFO  o.t.s.q.e.EnvironmentLogService - ThingsBoard server environment: os.memory.total=262MB
2024-11-20 15:19:53,875 [main] INFO  d.n.internal.NashornDetection - Delight-nashorn-sandbox detected that JDK Nashorn is absent and standalone Nashorn is present, and will use Standalone Nashorn
2024-11-20 15:19:57,868 [main] INFO  o.t.s.c.SystemInfoController - System build info: {"version":"3.8.0EDGE","artifact":"application","name":"ThingsBoard Edge CE Application","type":"CE"}
2024-11-20 15:20:00,363 [main] INFO  o.t.s.c.t.c.ssl.SslCredentialsConfig - LWM2M Server DTLS Credentials: Skipping initialization of disabled SSL credentials.
2024-11-20 15:20:00,385 [main] INFO  o.t.s.c.t.c.ssl.SslCredentialsConfig - LWM2M Trust Credentials: Skipping initialization of disabled SSL credentials.
2024-11-20 15:20:00,425 [main] INFO  o.t.s.c.t.c.ssl.SslCredentialsConfig - LWM2M Bootstrap DTLS Credentials: Skipping initialization of disabled SSL credentials.
2024-11-20 15:20:01,466 [main] INFO  o.t.s.s.c.CloudEventSourcingListener - EdgeEventSourcingListener initiated
2024-11-20 15:20:01,682 [main] INFO  o.t.s.a.service.DefaultActorService - Initializing actor system.
2024-11-20 15:20:01,721 [main] INFO  o.t.s.a.service.DefaultActorService - Actor system initialized.
2024-11-20 15:20:02,170 [main] INFO  o.t.s.c.adaptor.JsonConverterConfig - JSON max string value length = 0
2024-11-20 15:20:02,171 [main] INFO  o.t.s.c.adaptor.JsonConverterConfig - JSON type cast enabled = true
2024-11-20 15:20:02,475 [main] INFO  o.t.s.t.mqtt.MqttTransportService - Setting resource leak detector level to DISABLED
2024-11-20 15:20:02,476 [main] INFO  o.t.s.t.mqtt.MqttTransportService - Starting MQTT transport...
2024-11-20 15:20:02,704 [main] INFO  o.t.s.t.mqtt.MqttTransportService - Mqtt transport started!
2024-11-20 15:20:02,939 [main] INFO  o.e.c.elements.config.Configuration - defaults added COAP.
2024-11-20 15:20:02,981 [main] INFO  o.e.c.elements.config.Configuration - defaults added UDP.
2024-11-20 15:20:02,983 [main] INFO  o.e.c.c.network.RandomTokenGenerator - using tokens of 8 bytes in length
2024-11-20 15:20:03,068 [main] INFO  org.eclipse.californium.ban - Started.
2024-11-20 15:20:03,073 [main] INFO  o.e.c.core.network.CoapEndpoint - coap CoapEndpoint uses udp context
2024-11-20 15:20:03,120 [main] INFO  o.e.c.elements.config.Configuration - defaults added SYS.
2024-11-20 15:20:03,121 [main] INFO  o.e.c.c.network.stack.BlockwiseLayer - coap BlockwiseLayer uses MAX_MESSAGE_SIZE=1024, PREFERRED_BLOCK_SIZE=1024, BLOCKWISE_STATUS_LIFETIME=300000, MAX_RESOURCE_BODY_SIZE=268435456, BLOCKWISE_STRICT_BLOCK2_OPTION=true
2024-11-20 15:20:03,160 [main] INFO  o.e.californium.core.CoapServer - Starting server
2024-11-20 15:20:03,198 [main] INFO  o.e.c.elements.UDPConnector - UDPConnector starts up 1 sender threads and 1 receiver threads
2024-11-20 15:20:03,210 [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
2024-11-20 15:20:03,212 [main] INFO  o.e.c.core.network.CoapEndpoint - coap Started endpoint at coap://[0:0:0:0:0:0:0:0]:5683
2024-11-20 15:20:03,223 [main] INFO  o.t.s.t.coap.CoapTransportService - Starting CoAP transport...
2024-11-20 15:20:03,241 [main] INFO  o.t.s.t.coap.CoapTransportService - CoAP transport started!
2024-11-20 15:20:03,390 [main] INFO  o.t.s.t.l.b.LwM2MTransportBootstrapService - Starting LwM2M transport bootstrap server...
2024-11-20 15:20:03,457 [main] INFO  o.e.c.elements.util.JceProviderUtil - JCE default setup
2024-11-20 15:20:03,466 [main] INFO  o.e.c.elements.util.JceProviderUtil - RSA: true, EC: true, AES: not restricted
2024-11-20 15:20:03,469 [main] INFO  o.e.c.elements.util.JceProviderUtil - EdDSA supported by SunEC, Ed25519: true, Ed448: true
2024-11-20 15:20:03,470 [main] INFO  o.e.c.elements.util.JceProviderUtil - JCE setup: SunEC version 17, ready.
2024-11-20 15:20:03,585 [main] INFO  o.e.c.elements.config.Configuration - defaults added DTLS.
2024-11-20 15:20:04,289 [main] WARN  o.e.l.s.b.LeshanBootstrapServerBuilder - configStore is set but you also provide a custom SessionManager so this store will not be used
2024-11-20 15:20:04,320 [main] INFO  o.e.c.c.network.RandomTokenGenerator - using tokens of 8 bytes in length
2024-11-20 15:20:04,321 [main] INFO  o.e.c.core.network.CoapEndpoint - [Bootstrap Server-coap://0.0.0.0:5687] CoapEndpoint uses udp context
2024-11-20 15:20:04,322 [main] INFO  o.e.c.c.network.stack.BlockwiseLayer - [Bootstrap Server-coap://0.0.0.0:5687] BlockwiseLayer uses MAX_MESSAGE_SIZE=1024, PREFERRED_BLOCK_SIZE=1024, BLOCKWISE_STATUS_LIFETIME=300000, MAX_RESOURCE_BODY_SIZE=268435456, BLOCKWISE_STRICT_BLOCK2_OPTION=true
2024-11-20 15:20:04,354 [main] INFO  o.t.s.t.l.b.LwM2MTransportBootstrapService - Unable to load X509 files for LWM2MServer
2024-11-20 15:20:04,358 [main] WARN  o.e.l.s.c.b.e.c.CoapsBootstrapServerEndpointFactory - PskStore should be automatically set by Leshan. Using a custom implementation is not advised.
2024-11-20 15:20:04,453 [main] INFO  o.e.c.s.d.InMemoryReadWriteLockConnectionStore - Created new InMemoryConnectionStore [capacity: 150000, connection expiration threshold: 1800s]
2024-11-20 15:20:04,469 [main] INFO  o.e.c.c.network.RandomTokenGenerator - using tokens of 8 bytes in length
2024-11-20 15:20:04,470 [main] INFO  o.e.c.core.network.CoapEndpoint - [Bootstrap Server-coaps://0.0.0.0:5688] CoapEndpoint uses lwm2m correlation
2024-11-20 15:20:04,470 [main] INFO  o.e.c.c.network.stack.BlockwiseLayer - [Bootstrap Server-coaps://0.0.0.0:5688] BlockwiseLayer uses MAX_MESSAGE_SIZE=1024, PREFERRED_BLOCK_SIZE=1024, BLOCKWISE_STATUS_LIFETIME=300000, MAX_RESOURCE_BODY_SIZE=268435456, BLOCKWISE_STRICT_BLOCK2_OPTION=true
2024-11-20 15:20:04,484 [main] INFO  o.e.californium.core.CoapServer - Starting server
2024-11-20 15:20:04,495 [main] INFO  o.e.c.elements.UDPConnector - UDPConnector starts up 2 sender threads and 2 receiver threads
2024-11-20 15:20:04,498 [main] INFO  o.e.c.elements.UDPConnector - UDPConnector listening on /[0:0:0:0:0:0:0:0]:5687, recv buf = 106496, send buf = 106496, recv packet size = 2048
2024-11-20 15:20:04,498 [main] INFO  o.e.c.core.network.CoapEndpoint - [Bootstrap Server-coap://0.0.0.0:5687] Started endpoint at coap://[0:0:0:0:0:0:0:0]:5687
2024-11-20 15:20:04,505 [main] INFO  o.e.c.scandium.DTLSConnector - multiple network interfaces, using smallest MTU [IPv4 1280, IPv6 1280]
2024-11-20 15:20:04,512 [main] INFO  o.e.c.scandium.DTLSConnector - DTLSConnector listening on /[0:0:0:0:0:0:0:0]:5688, recv buf = 106496, send buf = 106496, recv packet size = 16490, MTU = IPv4 1280 / IPv6 1280
2024-11-20 15:20:04,512 [DTLS-Receiver-1-/[0:0:0:0:0:0:0:0]:5688] INFO  o.e.c.scandium.DTLSConnector - Starting worker thread [DTLS-Receiver-1-/[0:0:0:0:0:0:0:0]:5688]
2024-11-20 15:20:04,512 [DTLS-Receiver-0-/[0:0:0:0:0:0:0:0]:5688] INFO  o.e.c.scandium.DTLSConnector - Starting worker thread [DTLS-Receiver-0-/[0:0:0:0:0:0:0:0]:5688]
2024-11-20 15:20:04,514 [main] INFO  o.e.c.core.network.CoapEndpoint - [Bootstrap Server-coaps://0.0.0.0:5688] Started endpoint at coaps://[0:0:0:0:0:0:0:0]:5688
2024-11-20 15:20:04,515 [main] INFO  o.e.l.s.b.LeshanBootstrapServer - Bootstrap server started.
2024-11-20 15:20:04,515 [main] INFO  o.e.l.s.b.LeshanBootstrapServer - CoAP over UDP endpoint based on Californium library available at coap://[0:0:0:0:0:0:0:0]:5687.
2024-11-20 15:20:04,516 [main] INFO  o.e.l.s.b.LeshanBootstrapServer - CoAP over DTLS endpoint based on Californium/Scandium library available at coaps://[0:0:0:0:0:0:0:0]:5688.
2024-11-20 15:20:04,516 [main] INFO  o.t.s.t.l.b.LwM2MTransportBootstrapService - Started LwM2M transport bootstrap server.
2024-11-20 15:20:05,167 [main] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'snmpTransportContext' defined in URL [jar:nested:/usr/share/tb-edge/bin/tb-edge.jar/!BOOT-INF/lib/snmp-3.8.0EDGE.jar!/org/thingsboard/server/transport/snmp/SnmpTransportContext.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'snmpTransportService': Invocation of init method failed
2024-11-20 15:20:05,169 [main] INFO  o.t.s.t.l.s.DefaultLwM2mTransportService - Stopping LwM2M transport server!
2024-11-20 15:20:05,170 [main] ERROR o.t.s.t.l.s.DefaultLwM2mTransportService - Failed to gracefully stop the LwM2M transport server!
java.lang.NullPointerException: Cannot invoke "org.eclipse.leshan.server.LeshanServer.destroy()" because "this.server" is null
        at org.thingsboard.server.transport.lwm2m.server.DefaultLwM2mTransportService.shutdown(DefaultLwM2mTransportService.java:115)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:569)
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMethod.invoke(InitDestroyAnnotationBeanPostProcessor.java:457)
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeDestroyMethods(InitDestroyAnnotationBeanPostProcessor.java:415)
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeDestruction(InitDestroyAnnotationBeanPostProcessor.java:239)
        at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:202)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:587)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:559)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:1202)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:520)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:1195)
        at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1186)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:637)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:334)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
        at org.thingsboard.server.TbEdgeApplication.main(TbEdgeApplication.java:44)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:569)
        at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91)
        at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53)
        at org.springframework.boot.loader.launch.PropertiesLauncher.main(PropertiesLauncher.java:574)
2024-11-20 15:20:05,183 [main] WARN  o.s.c.a.CommonAnnotationBeanPostProcessor - Destroy method on bean with name 'lwM2MModelConfigServiceImpl' threw an exception: java.lang.NullPointerException: Cannot invoke "java.util.concurrent.ConcurrentMap.values()" because "this.currentModelConfigs" is null
2024-11-20 15:20:05,184 [main] INFO  o.t.s.t.l.b.LwM2MTransportBootstrapService - Stopping LwM2M transport bootstrap server!
2024-11-20 15:20:05,185 [main] INFO  o.e.californium.core.CoapServer - Destroying server
2024-11-20 15:20:05,186 [main] INFO  o.e.c.core.network.CoapEndpoint - [Bootstrap Server-coap://0.0.0.0:5687] Destroying endpoint at coap://[0:0:0:0:0:0:0:0]:5687
2024-11-20 15:20:05,188 [main] INFO  o.e.c.core.network.CoapEndpoint - [Bootstrap Server-coaps://0.0.0.0:5688] Destroying endpoint at coaps://[0:0:0:0:0:0:0:0]:5688
2024-11-20 15:20:05,192 [main] INFO  o.e.californium.core.CoapServer - CoAP server has been destroyed
2024-11-20 15:20:05,193 [main] INFO  o.e.l.s.b.LeshanBootstrapServer - Bootstrap server destroyed.
2024-11-20 15:20:05,193 [main] INFO  o.t.s.t.l.b.LwM2MTransportBootstrapService - LwM2M transport bootstrap server stopped!
2024-11-20 15:20:05,199 [main] INFO  o.t.s.t.coap.CoapTransportService - CoAP transport stopped!
2024-11-20 15:20:05,200 [main] INFO  o.t.s.c.DefaultCoapServerService - Stopping CoAP server!
2024-11-20 15:20:05,200 [main] INFO  o.e.californium.core.CoapServer - Destroying server
2024-11-20 15:20:05,201 [main] INFO  o.e.c.core.network.CoapEndpoint - coap Destroying endpoint at coap://[0:0:0:0:0:0:0:0]:5683
2024-11-20 15:20:05,202 [main] INFO  o.e.californium.core.CoapServer - CoAP server has been destroyed
2024-11-20 15:20:05,202 [main] INFO  o.t.s.c.DefaultCoapServerService - CoAP server stopped!
2024-11-20 15:20:05,203 [main] INFO  o.t.s.t.mqtt.MqttTransportService - Stopping MQTT transport!
2024-11-20 15:20:05,212 [main] INFO  o.t.s.t.mqtt.MqttTransportService - MQTT transport stopped!
2024-11-20 15:20:05,216 [main] INFO  o.t.s.s.cloud.CloudManagerService - [] Starting destroying process
2024-11-20 15:20:05,216 [main] INFO  o.t.s.s.cloud.CloudManagerService - [] Destroy was successful
2024-11-20 15:20:05,219 [main] INFO  o.t.s.a.service.DefaultActorService - Stopping actor system.
2024-11-20 15:20:05,221 [main] INFO  o.t.s.a.service.DefaultActorService - Actor system stopped.
2024-11-20 15:20:05,223 [main] INFO  o.t.s.s.h.HousekeeperService - Stopped Housekeeper service
2024-11-20 15:20:05,233 [main] INFO  o.t.s.s.h.HousekeeperReprocessingService - Stopped Housekeeper reprocessing service
2024-11-20 15:20:05,305 [sql-queue-0-tskv cloud event-27-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [TsKv Cloud Event] Queue polling was interrupted
2024-11-20 15:20:05,305 [sql-queue-0-tskv cloud event-27-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [TsKv Cloud Event] Queue polling completed
2024-11-20 15:20:05,306 [sql-queue-0-edge events-26-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [Edge Events] Queue polling was interrupted
2024-11-20 15:20:05,306 [sql-queue-0-edge events-26-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [Edge Events] Queue polling completed
2024-11-20 15:20:05,304 [sql-queue-0-cloud event-28-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [Cloud Event] Queue polling was interrupted
2024-11-20 15:20:05,307 [sql-queue-0-cloud event-28-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [Cloud Event] Queue polling completed
2024-11-20 15:20:05,311 [sql-queue-0-ts latest-15-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [TS Latest] Queue polling was interrupted
2024-11-20 15:20:05,312 [sql-queue-0-ts latest-15-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [TS Latest] Queue polling completed
2024-11-20 15:20:05,312 [sql-queue-1-ts-13-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [TS] Queue polling was interrupted
2024-11-20 15:20:05,313 [sql-queue-2-ts-14-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [TS] Queue polling was interrupted
2024-11-20 15:20:05,313 [sql-queue-1-ts-13-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [TS] Queue polling completed
2024-11-20 15:20:05,313 [sql-queue-2-ts-14-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [TS] Queue polling completed
2024-11-20 15:20:05,312 [sql-queue-1-ts latest-16-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [TS Latest] Queue polling was interrupted
2024-11-20 15:20:05,314 [sql-queue-1-ts latest-16-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [TS Latest] Queue polling completed
2024-11-20 15:20:05,313 [sql-queue-2-ts latest-17-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [TS Latest] Queue polling was interrupted
2024-11-20 15:20:05,315 [sql-queue-2-ts latest-17-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [TS Latest] Queue polling completed
2024-11-20 15:20:05,313 [sql-queue-0-ts-12-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [TS] Queue polling was interrupted
2024-11-20 15:20:05,315 [sql-queue-0-ts-12-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [TS] Queue polling completed
2024-11-20 15:20:05,321 [sql-queue-2-attributes-11-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [Attributes] Queue polling was interrupted
2024-11-20 15:20:05,321 [sql-queue-0-attributes-9-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [Attributes] Queue polling was interrupted
2024-11-20 15:20:05,322 [sql-queue-2-attributes-11-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [Attributes] Queue polling completed
2024-11-20 15:20:05,322 [sql-queue-0-attributes-9-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [Attributes] Queue polling completed
2024-11-20 15:20:05,322 [sql-queue-1-attributes-10-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [Attributes] Queue polling was interrupted
2024-11-20 15:20:05,325 [sql-queue-1-attributes-10-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [Attributes] Queue polling completed
2024-11-20 15:20:05,336 [sql-queue-0-events-2-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [Events] Queue polling was interrupted
2024-11-20 15:20:05,336 [sql-queue-0-events-2-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [Events] Queue polling completed
2024-11-20 15:20:05,337 [sql-queue-2-events-4-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [Events] Queue polling was interrupted
2024-11-20 15:20:05,337 [sql-queue-1-events-3-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [Events] Queue polling was interrupted
2024-11-20 15:20:05,338 [sql-queue-2-events-4-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [Events] Queue polling completed
2024-11-20 15:20:05,338 [sql-queue-1-events-3-thread-1] INFO  o.t.s.dao.sql.TbSqlBlockingQueue - [Events] Queue polling completed
2024-11-20 15:20:05,343 [main] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default'
2024-11-20 15:20:05,347 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
2024-11-20 15:20:05,411 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.
2024-11-20 15:20:05,419 [main] INFO  o.a.catalina.core.StandardService - Stopping service [Tomcat]
2024-11-20 15:20:05,622 [main] INFO  o.s.b.a.l.ConditionEvaluationReportLogger - 

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2024-11-20 15:20:05,753 [main] ERROR o.s.boot.SpringApplication - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'snmpTransportContext' defined in URL [jar:nested:/usr/share/tb-edge/bin/tb-edge.jar/!BOOT-INF/lib/snmp-3.8.0EDGE.jar!/org/thingsboard/server/transport/snmp/SnmpTransportContext.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'snmpTransportService': Invocation of init method failed
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:795)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:237)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1355)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1192)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:975)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:962)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:334)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
        at org.thingsboard.server.TbEdgeApplication.main(TbEdgeApplication.java:44)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:569)
        at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91)
        at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53)
        at org.springframework.boot.loader.launch.PropertiesLauncher.main(PropertiesLauncher.java:574)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'snmpTransportService': Invocation of init method failed
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:222)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:422)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1443)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:904)
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:782)
        ... 26 common frames omitted
Caused by: java.net.BindException: Die angeforderte Adresse kann nicht zugewiesen werden
        at java.base/sun.nio.ch.Net.bind0(Native Method)
        at java.base/sun.nio.ch.Net.bind(Net.java:555)
        at java.base/sun.nio.ch.DatagramChannelImpl.bindInternal(DatagramChannelImpl.java:1194)
        at java.base/sun.nio.ch.DatagramChannelImpl.bind(DatagramChannelImpl.java:1164)
        at java.base/sun.nio.ch.DatagramSocketAdaptor.bind(DatagramSocketAdaptor.java:107)
        at java.base/java.net.DatagramSocket.createDelegate(DatagramSocket.java:1426)
        at java.base/java.net.DatagramSocket.<init>(DatagramSocket.java:330)
        at java.base/java.net.DatagramSocket.<init>(DatagramSocket.java:389)
        at org.snmp4j.transport.DefaultUdpTransportMapping.<init>(DefaultUdpTransportMapping.java:105)
        at org.thingsboard.server.transport.snmp.service.SnmpTransportService.initializeSnmp(SnmpTransportService.java:139)
        at org.thingsboard.server.transport.snmp.service.SnmpTransportService.init(SnmpTransportService.java:118)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:569)
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMethod.invoke(InitDestroyAnnotationBeanPostProcessor.java:457)
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:401)
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:219)
        ... 39 common frames omitted

Steps which I tried:

  • Install ThingsBoard CE v3.8.1.
  • Install ThingsBoard Edge v3.8.0 on Ubuntu 22.04.
  • Attempt to start the ThingsBoard Edge service.

Server Environment

  • ThingsBoard Version: CE v3.8.1
  • Edge Version: v3.8.0
  • OS: Linux
  • Version: 22.04

Disclaimer

We appreciate your contribution whether it is a bug report, feature request, or pull request with improvement (hopefully). Please comply with the Community ethics policy, and do not expect us to answer your requests immediately. Also, do not treat GitHub issues as a support channel.

@4NUR46 4NUR46 added the bug Something isn't working label Nov 20, 2024
@AndriiLandiak
Copy link
Member

Hi, @4NUR46.

Caused by: java.net.BindException: Die angeforderte Adresse kann nicht zugewiesen werden - does it mean that address is already in used? Looks like you need to change port IF YOU ARE RUNNING EDGE ON THE SAME MACHINE WHERE THINGSBOARD SERVER IS RUNNING (from docs):
image

Or please provide more details about TB and Edge setup.

@4NUR46
Copy link
Author

4NUR46 commented Nov 20, 2024

Hi, @4NUR46.

Caused by: java.net.BindException: Die angeforderte Adresse kann nicht zugewiesen werden - does it mean that address is already in used? Looks like you need to change port IF YOU ARE RUNNING EDGE ON THE SAME MACHINE WHERE THINGSBOARD SERVER IS RUNNING (from docs): image

Or please provide more details about TB and Edge setup.

I have my server Installed on a different machine.
I have used the java version 17 and the postgresql 15
And I just tried to install the v3.8 Edge.

If I am installing the v3.6.4 on my machine with java version 11 then it is working.

For Installing the v3.8.0 Edge:

  • I have uninstall the edge 3.6.4 and deleted the directory usr/share/tb-edge using command sudo rm -rf usr/share/tb-edge
  • I switched to the java version from JDK 11 to JDK 17 and then Created new database using postgresql 15.
  • After that I have configure the tb-edge configuration file. sudo nano /etc/tb-edge/conf/tb-edge.conf
  • After that I run sudo /usr/share/tb-edge/bin/install/install.sh to install the data for the edge.
  • And I restart the edge sudo service tb-edge restart

@AndriiLandiak
Copy link
Member

AndriiLandiak commented Nov 21, 2024

Maybe port 1620 is in use, identify the conflicting process and stop it:

sudo lsof -i :1620

Also, if you do not need SNMP and LWM2M, you can disable it in tb-edge.conf:

export LWM2M_ENABLED=false
export SNMP_ENABLED=false

@4NUR46
Copy link
Author

4NUR46 commented Nov 22, 2024

Maybe port 1620 is in use, identify the conflicting process and stop it:

sudo lsof -i :1620

Also, if you do not need SNMP and LWM2M, you can disable it in tb-edge.conf:

export LWM2M_ENABLED=false
export SNMP_ENABLED=false

I have check running sudo lsof -i :1620 and there is no service is running on the port 1620.
The same error I am having on the other machine also when I tried to install the edge on another machine.
If I install v3.6.4 (with JDK 11 ) then it is working but giving problems with downlink and syncing in late.
And If I install the 3.8.0 (with JDK 17) then it is giving the above mentioned error.

And Thingsboard CE v3.8.1 on different machine not on the same where I am trying to install the edge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants