问题一:nacos中这个什么原因?用 idea 直接启动时候能注册,打成 jar 启动就报上面的错误。
nacos中这个什么原因?用 idea 直接启动时候能注册,打成 jar 启动就报上面的错误,没法debug。
2023-12-13 12:56:04.684 ERROR 31588 --- [ main] c.a.c.n.registry.NacosServiceRegistry : nacos registry, managecenter-gateway register failed...NacosRegistration{nacosDiscoveryProperties=NacosDiscoveryProperties{serverAd
dr='192.168.119.249:8808', username='nacos', password='nacos', endpoint='', namespace='65e2e949-0bce-4d38-83fa-904a35b9cc78', watchDelay=30000, logName='', service='managecenter-gateway', weight=1.0, clusterName='DEFAULT', group='ma
nageCenter-test', namingLoadCacheAtStart='false', metadata={IPv6=[240e:31f:1624:d500:fc35:bdc2:ff0f:f1ef], preserved.register.source=SPRING_CLOUD}, registerEnabled=true, ip='192.168.119.10', networkInterface='', port=6007, secure=false, accessKey='', secretKey='', heartBeatInterval=null, heartBeatTimeout=null, ipDeleteTimeout=null, instanceEnabled=true, ephemeral=true, failureToleranceEnabled=false}, ipDeleteTimeout=null, failFast=true}},
com.alibaba.nacos.api.exception.NacosException: unknown user!
at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.requestToServer(NamingGrpcClientProxy.java:358) ~[nacos-client-2.2.0.jar!/:na]
at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.doRegisterService(NamingGrpcClientProxy.java:209) ~[nacos-client-2.2.0.jar!/:na]
at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.registerService(NamingGrpcClientProxy.java:123) ~[nacos-client-2.2.0.jar!/:na]
不打包 直接用 IDE 启动时候能注册进去,打包以后启动就报这个错。
参考回答:
打包以后这行有问题。
解决方案:
关于本问题的更多回答可点击原文查看:https://developer.aliyun.com/ask/580260
问题二:用nacos启动没问题,换一个自己建的用户启动,配置获取没问题,注册的时候就有问题了,什么原因?
spring.cloud.nacos.username=nacos
spring.cloud.nacos.password=nacos
用nacos启动没问题,换一个自己建的用户启动,配置获取没问题,注册的时候就有问题了。
nacos registry, coupon-biz register failed...NacosRegistration{nacosDiscoveryProperties=NacosDiscoveryProperties{serverAddr='192.168.120.246:31708', endpoint='', namespace='', watchDelay=30000, logName='', service='coupon-biz', weight=1.0, clusterName='DEFAULT', group='base', namingLoadCacheAtStart='false', metadata={management.endpoints.web.base-path=/, preserved.register.source=SPRING_CLOUD}, registerEnabled=true, ip='172.19.4.48', networkInterface='', port=12340, secure=false, accessKey='', secretKey='', heartBeatInterval=null, heartBeatTimeout=null, ipDeleteTimeout=null, failFast=true}},
com.alibaba.nacos.api.exception.NacosException: authorization failed!
at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.requestToServer(NamingGrpcClientProxy.java:364) ~[nacos-client-2.2.4.jar:na]
at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.doRegisterService(NamingGrpcClientProxy.java:215) ~[nacos-client-2.2.4.jar:na]
at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.registerService(NamingGrpcClientProxy.java:129) ~[nacos-client-2.2.4.jar:na]
at com.alibaba.nacos.client.naming.remote.NamingClientProxyDelegate.registerService(NamingClientProxyDelegate.java:98) ~[nacos-client-2.2.4.jar:na]
关于本问题的更多回答可点击原文查看:https://developer.aliyun.com/ask/580259
问题三:nacos 2.2.3 集群开启鉴权 无法注册了,怎么解决?
nacos 2.2.3 集群开启鉴权 无法注册了,怎么解决?
参考回答:
#spring.cloud.nacos.username=nacos
spring.cloud.nacos.password=nacos
加个这个就行了,2.2.3的server端,最少可以兼容到1.3.2的client。
关于本问题的更多回答可点击原文查看:https://developer.aliyun.com/ask/580258
问题四:有遇到过Nacos这个异常不?
有大佬遇到过Nacos这个异常不? 阿里云 ecs 机器
参考回答:
ifconfig -s 看看,不一定是实体网卡, 可能是虚拟网卡, 类似于 docker 这种.
关于本问题的更多回答可点击原文查看:https://developer.aliyun.com/ask/582908
问题五:Nacos这个报错是什么原因导致的?
Nacos这个报错是什么原因导致的?
errMsg": "Error [type=ERROR_TYPE_STATE_MACHINE, status=Status[ESTATEMACHINE<10002>: StateMachine meet critical error when applying one or more tasks since index=41530, Status[ESTATEMACHINE<10002>: StateMachine meet critical error: java.lang.IllegalArgumentException: No enum constant com.alibaba.nacos.naming.consistency.persistent.impl.BasePersistentServiceProcessor.Op.\n\tat java.lang.Enum.valueOf(Enum.java:238)\n\tat com.alibaba.nacos.naming.consistency.persistent.impl.BasePersistentServiceProcessor$Op.valueOf(BasePersistentServiceProcessor.java:63)\n\tat com.alibaba.nacos.naming.consistency.persistent.impl.BasePersistentServiceProcessor.onApply(BasePersistentServiceProcessor.java:170)\n\tat com.alibaba.nacos.core.distributed.raft.NacosStateMachine.onApply(NacosStateMachine.java:115)\n\tat com.alipay.sofa.jraft.core.FSMCallerImpl.doApplyTasks(FSMCallerImpl.java:541)\n\tat com.alipay.sofa.jraft.core.FSMCallerImpl.doCommitted(FSMCallerImpl.java:510)\n\tat com.alipay.sofa.jraft.core.FSMCallerImpl.runApplyTask(FSMCallerImpl.java:442)\n\tat com.alipay.sofa.jraft.core.FSMCallerImpl.access$100(FSMCallerImpl.java:73)\n\tat com.alipay.sofa.jraft.core.FSMCallerImpl$ApplyTaskHandler.onEvent(FSMCallerImpl.java:148)\n\tat com.alipay.sofa.jraft.core.FSMCallerImpl$ApplyTaskHandler.onEvent(FSMCallerImpl.java:142)\n\tat com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:137)\n\tat java.lang.Thread.run(Thread.java:750)\n.]]]",
关于本问题的更多回答可点击原文查看:https://developer.aliyun.com/ask/582568