question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

authentication.password in server.yaml is not working

See original GitHub issue

Bug Report

Which version of ShardingSphere did you use?

4.0.0-RC1

Which project did you use? Sharding-JDBC or Sharding-Proxy?

Sharding-proxy with docker 4.0.0-RC1

Expected behavior

Login Sharding-provey with preset password

Actual behavior

Password is not working, except for blank password

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

Modify server.xml, restart Sharding-proxy

Example codes for reproduce this issue (such as a github link).

authentication:
  username: root
  password: root

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
TonyLuocommented, Jul 17, 2019

Hi @terrymanu @tristaZero , any update? The problem still exists, this issue should not be closed.

1reaction
Sicebergcommented, Jul 5, 2019

@terrymanu Sorry for my bad, I copied a wrong code, I have modified it. The error still exists, password is not working, except for blank password. If using @tristaZero 's code, get error in log:

Exception in thread "main" Cannot create property=authentication for JavaBean=org.apache.shardingsphere.shardingproxy.config.yaml.YamlProxyServerConfiguration@3551e0c4
 in 'reader', line 1, column 1:
    authentication:
    ^
Cannot create property=users for JavaBean=org.apache.shardingsphere.core.yaml.config.common.YamlAuthentication@74ee003d
 in 'reader', line 2, column 3:
      users:
      ^
Unable to find property 'users' on class: org.apache.shardingsphere.core.yaml.config.common.YamlAuthentication
 in 'reader', line 3, column 5:
        root: # username
        ^

 in 'reader', line 2, column 3:
      users:
      ^

	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:312)
	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:189)
	at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:345)
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:182)
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:141)
	at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:127)
	at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:450)
	at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:410)
	at org.apache.shardingsphere.core.yaml.engine.YamlEngine.unmarshal(YamlEngine.java:59)
	at org.apache.shardingsphere.shardingproxy.config.ShardingConfigurationLoader.loadServerConfiguration(ShardingConfigurationLoader.java:77)
	at org.apache.shardingsphere.shardingproxy.config.ShardingConfigurationLoader.load(ShardingConfigurationLoader.java:58)
	at org.apache.shardingsphere.shardingproxy.Bootstrap.main(Bootstrap.java:68)
Caused by: Cannot create property=users for JavaBean=org.apache.shardingsphere.core.yaml.config.common.YamlAuthentication@74ee003d
 in 'reader', line 2, column 3:
      users:
      ^
Unable to find property 'users' on class: org.apache.shardingsphere.core.yaml.config.common.YamlAuthentication
 in 'reader', line 3, column 5:
        root: # username
        ^

	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:312)
	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:189)
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:182)
	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:297)
	... 11 more
Caused by: org.yaml.snakeyaml.error.YAMLException: Unable to find property 'users' on class: org.apache.shardingsphere.core.yaml.config.common.YamlAuthentication
	at org.yaml.snakeyaml.introspector.PropertyUtils.getProperty(PropertyUtils.java:132)
	at org.yaml.snakeyaml.introspector.PropertyUtils.getProperty(PropertyUtils.java:121)
	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.getProperty(Constructor.java:322)
	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:240)
	... 14 more
Read more comments on GitHub >

github_iconTop Results From Across the Web

authentication.password in server.yaml is not working #2656
Sharding-proxy with docker 4.0.0-RC1 Expected behavior Login Sharding-provey ... authentication.password in server.yaml is not working #2656.
Read more >
The 'support for password authentication removed' GitHub error
If you see a GitHub password stored in the Windows Credentials Manager, just delete it and then try again to push back to...
Read more >
FAQ - code-server v4.8.0 docs - Coder
The default config defines the following behavior: Listen on the loopback IP port 8080; Enable password authorization; Do not use TLS.
Read more >
What is username and password when starting Spring Boot ...
The default AuthenticationManager has a single user ('user' username and random ... System.out.println("Error: password and password confirm do not match ...
Read more >
Service connections in Azure Pipelines - Microsoft Learn
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server ... or you have problems validating the connection, see Troubleshoot ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found