Closed ginwAa closed 11 months ago
modify description
Please try the latest 'develop' branch and see if it can work fine.
Please try the latest 'develop' branch and see if it can work fine.
tried, it didn't work.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getServiceMapping' defined in class path resource [org/apache/dubbo/admin/config/ConfigCenter.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.dubbo.admin.registry.mapping.ServiceMapping]: Factory method 'getServiceMapping' threw exception; nested exception is java.lang.IllegalStateException: KeeperErrorCode = NoAuth for /dubbo/mapping
Check the access control list configuration of zookeeper to ensure that the dubbo-admin has access permissions.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getServiceMapping' defined in class path resource [org/apache/dubbo/admin/config/ConfigCenter.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.dubbo.admin.registry.mapping.ServiceMapping]: Factory method 'getServiceMapping' threw exception; nested exception is java.lang.IllegalStateException: KeeperErrorCode = NoAuth for /dubbo/mapping
Check the access control list configuration of zookeeper to ensure that the dubbo-admin has access permissions.
All I have done is to configure the dubbo-admin properties then run it, as a consequence an empty zookeeper without any man-made information is guaranteed. I also checked the access control list like following. Should I check the access control list or anything else in this situation? I have tired to clear the zookeeper and rerun the dubbo-admin and get NoAuth error many times.
[zk: localhost:2181(CONNECTED) 8] getAcl /dubbo/org.apache.dubbo.metadata.MetadataService
'digest,'admin:x1nq8J5GOJVPY6zgzhtTtA9izLc=
: cdrwa
[zk: localhost:2181(CONNECTED) 9] getAcl /dubbo/org.apache.dubbo.mock.api.MockService
'digest,'admin:x1nq8J5GOJVPY6zgzhtTtA9izLc=
: cdrwa
[zk: localhost:2181(CONNECTED) 10] getAcl /dubbo/mapping
'world,'anyone
: cdrwa
[zk: localhost:2181(CONNECTED) 11] getAcl /dubbo/config
'digest,'admin:x1nq8J5GOJVPY6zgzhtTtA9izLc=
: cdrwa
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getServiceMapping' defined in class path resource [org/apache/dubbo/admin/config/ConfigCenter.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.dubbo.admin.registry.mapping.ServiceMapping]: Factory method 'getServiceMapping' threw exception; nested exception is java.lang.IllegalStateException: KeeperErrorCode = NoAuth for /dubbo/mapping
Check the access control list configuration of zookeeper to ensure that the dubbo-admin has access permissions.
All I have done is to configure the dubbo-admin properties then run it, as a consequence an empty zookeeper without any man-made information is guaranteed. I also checked the access control list like following. Should I check the access control list or anything else in this situation? I have tired to clear the zookeeper and rerun the dubbo-admin and get NoAuth error many times.
[zk: localhost:2181(CONNECTED) 8] getAcl /dubbo/org.apache.dubbo.metadata.MetadataService 'digest,'admin:x1nq8J5GOJVPY6zgzhtTtA9izLc= : cdrwa [zk: localhost:2181(CONNECTED) 9] getAcl /dubbo/org.apache.dubbo.mock.api.MockService 'digest,'admin:x1nq8J5GOJVPY6zgzhtTtA9izLc= : cdrwa [zk: localhost:2181(CONNECTED) 10] getAcl /dubbo/mapping 'world,'anyone : cdrwa [zk: localhost:2181(CONNECTED) 11] getAcl /dubbo/config 'digest,'admin:x1nq8J5GOJVPY6zgzhtTtA9izLc= : cdrwa
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getServiceMapping' defined in class path resource [org/apache/dubbo/admin/config/ConfigCenter.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.dubbo.admin.registry.mapping.ServiceMapping]: Factory method 'getServiceMapping' threw exception; nested exception is java.lang.IllegalStateException: KeeperErrorCode = NoAuth for /dubbo/mapping
Check the access control list configuration of zookeeper to ensure that the dubbo-admin has access permissions.
All I have done is to configure the dubbo-admin properties then run it, as a consequence an empty zookeeper without any man-made information is guaranteed. I also checked the access control list like following. Should I check the access control list or anything else in this situation? I have tired to clear the zookeeper and rerun the dubbo-admin and get NoAuth error many times.
[zk: localhost:2181(CONNECTED) 8] getAcl /dubbo/org.apache.dubbo.metadata.MetadataService 'digest,'admin:x1nq8J5GOJVPY6zgzhtTtA9izLc= : cdrwa [zk: localhost:2181(CONNECTED) 9] getAcl /dubbo/org.apache.dubbo.mock.api.MockService 'digest,'admin:x1nq8J5GOJVPY6zgzhtTtA9izLc= : cdrwa [zk: localhost:2181(CONNECTED) 10] getAcl /dubbo/mapping 'world,'anyone : cdrwa [zk: localhost:2181(CONNECTED) 11] getAcl /dubbo/config 'digest,'admin:x1nq8J5GOJVPY6zgzhtTtA9izLc= : cdrwa
- Add auth:https://zookeeper.apache.org/doc/current/zookeeperCLI.html
- JDK Version Compatibility
I can run the dubbo-admin well without any access control, and I can read and write any znode with zkCli after adding auth by 'addauth digest admin:admin'. I don't if you have read my issue. To be honest, your response is of no use. I even cannot find any official document about this.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getServiceMapping' defined in class path resource [org/apache/dubbo/admin/config/ConfigCenter.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.dubbo.admin.registry.mapping.ServiceMapping]: Factory method 'getServiceMapping' threw exception; nested exception is java.lang.IllegalStateException: KeeperErrorCode = NoAuth for /dubbo/mapping
It might be a missing ACL configuration in the admin section of this version's code. I can assist with deployment issues, but I cannot help with the code since I'm not familiar with Java. :(
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getServiceMapping' defined in class path resource [org/apache/dubbo/admin/config/ConfigCenter.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.dubbo.admin.registry.mapping.ServiceMapping]: Factory method 'getServiceMapping' threw exception; nested exception is java.lang.IllegalStateException: KeeperErrorCode = NoAuth for /dubbo/mapping
It might be a missing ACL configuration in the admin section of this version's code. I can assist with deployment issues, but I cannot help with the code since I'm not familiar with Java. :(
Thanks for your reply.
Solved by adding following configurations in application.properties
admin.registry.address=zookeeper://127.0.0.1:2181?username=admin&password=admin
admin.config-center=zookeeper://127.0.0.1:2181?username=admin&password=admin
admin.metadata-report.address=zookeeper://127.0.0.1:2181?username=admin&password=admin
admin.config-center.username=admin
admin.config-center.password=admin
Also tried and failed by using configurations as following
admin.registry.address=zookeeper://127.0.0.1:2181
admin.config-center=zookeeper://127.0.0.1:2181
admin.metadata-report.address=zookeeper://127.0.0.1:2181
admin.config-center.username=admin
admin.config-center.password=admin
I think we should add some tips in application.properties
Environment
Steps to reproduce this issue
admin.registry.address=zookeeper://127.0.0.1:2181?username=admin&password=admin
admin.config-center=zookeeper://127.0.0.1:2181?username=admin&password=admin
admin.metadata-report.address=zookeeper://127.0.0.1:2181?username=admin&password=admin
Pls. provide [GitHub address] to reproduce this issue.
Expected Result
Run
Actual Result
Exception
Zookeeper Cli![image](https://github.com/apache/dubbo-admin/assets/75293398/755a6b5a-32bb-4551-af38-5d43e29f8ed0)