Closed Licoy closed 4 years ago
@Licoy paste the registry.conf file.
现在已经没有错误了,不知怎么回事儿
我也遇到了此问题,您有什么处理方式吗,针对此问题?@Licoy @slievrly 提问之前,我参考了 seata 官网进行配置。
seata version: 1.8.0 nacos version: 2.2.1
server:
port: 7091
spring:
application:
name: seata-server
logging:
config: classpath:logback-spring.xml
file:
path: ${log.home:${user.home}/logs/seata}
extend:
logstash-appender:
destination: 127.0.0.1:4560
kafka-appender:
bootstrap-servers: 127.0.0.1:9092
topic: logback_to_logstash
console:
user:
username: seata
password: seata
seata:
config:
# support: nacos, consul, apollo, zk, etcd3
type: nacos
registry:
# support: nacos, eureka, redis, zk, consul, etcd3, sofa
type: nacos
store:
# support: file 、 db 、 redis
mode: db
# server:
# service-port: 8091 #If not configured, the default is '${server.port} + 1000'
security:
secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017
tokenValidityInMilliseconds: 1800000
ignore:
urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.jpeg,/**/*.ico,/api/v1/auth/login
config {
type = "nacos"
nacos {
serverAddr = "127.0.0.1:8848"
username = "nacos"
password = "nacos"
}
}
启动 seata-server.bat 的堆栈异常
=>
java.lang.ExceptionInInitializerError: null
at io.seata.server.spring.listener.SeataPropertiesLoader.initialize(SeataPropertiesLoader.java:76) ~[classes!/:1.8.0]
at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:648) ~[spring-boot-2.5.13.jar:2.5.13]
at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:417) ~[spring-boot-2.5.13.jar:2.5.13]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:338) ~[spring-boot-2.5.13.jar:2.5.13]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1365) ~[spring-boot-2.5.13.jar:2.5.13]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-2.5.13.jar:2.5.13]
at io.seata.server.ServerApplication.main(ServerApplication.java:31) ~[classes!/:1.8.0]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[seata-server.jar:1.8.0]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[seata-server.jar:1.8.0]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[seata-server.jar:1.8.0]
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467) ~[seata-server.jar:1.8.0]
Caused by: java.lang.RuntimeException: ErrCode:-400, ErrMsg:endpoint is blank
at io.seata.config.nacos.NacosConfiguration.<init>(NacosConfiguration.java:100) ~[seata-config-nacos-1.8.0.jar:1.8.0]
at io.seata.config.nacos.NacosConfiguration.getInstance(NacosConfiguration.java:84) ~[seata-config-nacos-1.8.0.jar:1.8.0]
at io.seata.config.nacos.NacosConfigurationProvider.provide(NacosConfigurationProvider.java:29) ~[seata-config-nacos-1.8.0.jar:1.8.0]
at io.seata.config.ConfigurationFactory.buildConfiguration(ConfigurationFactory.java:160) ~[seata-config-core-1.8.0.jar:1.8.0]
at io.seata.config.ConfigurationFactory.getInstance(ConfigurationFactory.java:112) ~[seata-config-core-1.8.0.jar:1.8.0]
at io.seata.server.store.StoreConfig.<clinit>(StoreConfig.java:33) ~[classes!/:1.8.0]
... 15 common frames omitted
Caused by: com.alibaba.nacos.api.exception.NacosException: java.lang.reflect.InvocationTargetException
at com.alibaba.nacos.api.config.ConfigFactory.createConfigService(ConfigFactory.java:46) ~[nacos-api-1.4.2.jar:na]
at com.alibaba.nacos.api.NacosFactory.createConfigService(NacosFactory.java:44) ~[nacos-api-1.4.2.jar:na]
at io.seata.config.nacos.NacosConfiguration.<init>(NacosConfiguration.java:97) ~[seata-config-nacos-1.8.0.jar:1.8.0]
... 20 common frames omitted
Caused by: java.lang.reflect.InvocationTargetException: null
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na]
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[na:na]
at com.alibaba.nacos.api.config.ConfigFactory.createConfigService(ConfigFactory.java:43) ~[nacos-api-1.4.2.jar:na]
... 22 common frames omitted
Caused by: com.alibaba.nacos.api.exception.NacosException: endpoint is blank
at com.alibaba.nacos.client.config.impl.ServerListManager.<init>(ServerListManager.java:183) ~[nacos-client-1.4.2.jar:na]
at com.alibaba.nacos.client.config.http.ServerHttpAgent.<init>(ServerHttpAgent.java:274) ~[nacos-client-1.4.2.jar:na]
at com.alibaba.nacos.client.config.NacosConfigService.<init>(NacosConfigService.java:88) ~[nacos-client-1.4.2.jar:na]
... 27 common frames omitted
<==
20:54:02.573 WARN --- [ Thread-0] [mmon.http.HttpClientBeanHolder] [ shutdown] [] : [HttpClientBeanHolder] Start destroying common HttpClient
20:54:02.573 WARN --- [ Thread-0] [mmon.http.HttpClientBeanHolder] [ shutdown] [] : [HttpClientBeanHolder] Destruction of the end
I had the same exception when I used the ".zip" suffix for the package. After I changed the package to ".tar.gz" suffix, the exception was resolved.
我也遇到了此问题,您有什么处理方式吗,针对此问题?@Licoy @slievrly 提问之前,我参考了 seata 官网进行配置。
seata version: 1.8.0 nacos version: 2.2.1
server: port: 7091 spring: application: name: seata-server logging: config: classpath:logback-spring.xml file: path: ${log.home:${user.home}/logs/seata} extend: logstash-appender: destination: 127.0.0.1:4560 kafka-appender: bootstrap-servers: 127.0.0.1:9092 topic: logback_to_logstash console: user: username: seata password: seata seata: config: # support: nacos, consul, apollo, zk, etcd3 type: nacos registry: # support: nacos, eureka, redis, zk, consul, etcd3, sofa type: nacos store: # support: file 、 db 、 redis mode: db # server: # service-port: 8091 #If not configured, the default is '${server.port} + 1000' security: secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017 tokenValidityInMilliseconds: 1800000 ignore: urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.jpeg,/**/*.ico,/api/v1/auth/login
config { type = "nacos" nacos { serverAddr = "127.0.0.1:8848" username = "nacos" password = "nacos" } }
启动 seata-server.bat 的堆栈异常
=> java.lang.ExceptionInInitializerError: null at io.seata.server.spring.listener.SeataPropertiesLoader.initialize(SeataPropertiesLoader.java:76) ~[classes!/:1.8.0] at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:648) ~[spring-boot-2.5.13.jar:2.5.13] at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:417) ~[spring-boot-2.5.13.jar:2.5.13] at org.springframework.boot.SpringApplication.run(SpringApplication.java:338) ~[spring-boot-2.5.13.jar:2.5.13] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1365) ~[spring-boot-2.5.13.jar:2.5.13] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-2.5.13.jar:2.5.13] at io.seata.server.ServerApplication.main(ServerApplication.java:31) ~[classes!/:1.8.0] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na] at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[seata-server.jar:1.8.0] at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[seata-server.jar:1.8.0] at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[seata-server.jar:1.8.0] at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467) ~[seata-server.jar:1.8.0] Caused by: java.lang.RuntimeException: ErrCode:-400, ErrMsg:endpoint is blank at io.seata.config.nacos.NacosConfiguration.<init>(NacosConfiguration.java:100) ~[seata-config-nacos-1.8.0.jar:1.8.0] at io.seata.config.nacos.NacosConfiguration.getInstance(NacosConfiguration.java:84) ~[seata-config-nacos-1.8.0.jar:1.8.0] at io.seata.config.nacos.NacosConfigurationProvider.provide(NacosConfigurationProvider.java:29) ~[seata-config-nacos-1.8.0.jar:1.8.0] at io.seata.config.ConfigurationFactory.buildConfiguration(ConfigurationFactory.java:160) ~[seata-config-core-1.8.0.jar:1.8.0] at io.seata.config.ConfigurationFactory.getInstance(ConfigurationFactory.java:112) ~[seata-config-core-1.8.0.jar:1.8.0] at io.seata.server.store.StoreConfig.<clinit>(StoreConfig.java:33) ~[classes!/:1.8.0] ... 15 common frames omitted Caused by: com.alibaba.nacos.api.exception.NacosException: java.lang.reflect.InvocationTargetException at com.alibaba.nacos.api.config.ConfigFactory.createConfigService(ConfigFactory.java:46) ~[nacos-api-1.4.2.jar:na] at com.alibaba.nacos.api.NacosFactory.createConfigService(NacosFactory.java:44) ~[nacos-api-1.4.2.jar:na] at io.seata.config.nacos.NacosConfiguration.<init>(NacosConfiguration.java:97) ~[seata-config-nacos-1.8.0.jar:1.8.0] ... 20 common frames omitted Caused by: java.lang.reflect.InvocationTargetException: null at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:na] at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na] at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[na:na] at com.alibaba.nacos.api.config.ConfigFactory.createConfigService(ConfigFactory.java:43) ~[nacos-api-1.4.2.jar:na] ... 22 common frames omitted Caused by: com.alibaba.nacos.api.exception.NacosException: endpoint is blank at com.alibaba.nacos.client.config.impl.ServerListManager.<init>(ServerListManager.java:183) ~[nacos-client-1.4.2.jar:na] at com.alibaba.nacos.client.config.http.ServerHttpAgent.<init>(ServerHttpAgent.java:274) ~[nacos-client-1.4.2.jar:na] at com.alibaba.nacos.client.config.NacosConfigService.<init>(NacosConfigService.java:88) ~[nacos-client-1.4.2.jar:na] ... 27 common frames omitted <== 20:54:02.573 WARN --- [ Thread-0] [mmon.http.HttpClientBeanHolder] [ shutdown] [] : [HttpClientBeanHolder] Start destroying common HttpClient 20:54:02.573 WARN --- [ Thread-0] [mmon.http.HttpClientBeanHolder] [ shutdown] [] : [HttpClientBeanHolder] Destruction of the end
解决了吗
错误
当registry.conf的config的type=nacos时就会报这个错误,换成file就没有问题,原因未知
具体异常信息