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

在登陆控制台的时候,用默认的nacos作为用户名和密码,无法登陆,说用户名密码错误 #6382

Closed
ManuRodgers opened this issue Jul 19, 2021 · 13 comments

Comments

@ManuRodgers
Copy link

No description provided.

@KomachiSion
Copy link
Collaborator

Please check your init username and password is right.

the default SQL is in nacos/conf/nacos-mysql.sql.

@ManuRodgers
Copy link
Author

image

@zarkzheng
Copy link
Contributor

Did you build nacos in windows and run it with sh startup.sh?
You got this Algorithm HmacSHA256 not available error because your app cannot load the Java security libs correctly (So you cannot using JDK's own encryption and decryption algorithm).

See this line in distribution/bin/startup.sh:

JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext:${JAVA_HOME}/lib/ext"

In windows environment, using : you cannot successfuly load the ${JAVA_HOME}/jre/lib/ext dir. Change : to ; in windows; or just delete this line, so it can use JDK's default dir.

JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext;${JAVA_HOME}/lib/ext"

@ManuRodgers
Copy link
Author

Did you build nacos in windows and run it with sh startup.sh?
You got this Algorithm HmacSHA256 not available error because your app cannot load the Java security libs correctly (So you cannot using JDK's own encryption and decryption algorithm).

See this line in distribution/bin/startup.sh:

JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext:${JAVA_HOME}/lib/ext"

In windows environment, using : you cannot successfuly load the ${JAVA_HOME}/jre/lib/ext dir. Change : to ; in windows; or just delete this line, so it can use JDK's default dir.

JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext;${JAVA_HOME}/lib/ext"

I am using Mac system

@zarkzheng
Copy link
Contributor

Did you build nacos in windows and run it with sh startup.sh?
You got this Algorithm HmacSHA256 not available error because your app cannot load the Java security libs correctly (So you cannot using JDK's own encryption and decryption algorithm).
See this line in distribution/bin/startup.sh:

JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext:${JAVA_HOME}/lib/ext"

In windows environment, using : you cannot successfuly load the ${JAVA_HOME}/jre/lib/ext dir. Change : to ; in windows; or just delete this line, so it can use JDK's default dir.

JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext;${JAVA_HOME}/lib/ext"

I am using Mac system

Can you check the -Djava.ext.dirs value in your startup command output?

@ManuRodgers
Copy link
Author

image

@zarkzheng
Copy link
Contributor

I see. In version 2.0.3-SNAPSHOT that you used, they change the shell from JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext:${JAVA_HOME}/lib/ext" to JAVA_OPT_EXT_FIX="-Djava.ext.dirs=\"${JAVA_HOME}/jre/lib/ext:${JAVA_HOME}/lib/ext\"", in order to Fix the problem of startup error when the JAVA_HOME path contains spaces under Linux/Unix/Mac system, see #6335.
Could you try remove the \" around and just change to JAVA_OPT_EXT_FIX="-Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext:${JAVA_HOME}/lib/ext" and try again? It should be work then.

@ManuRodgers
Copy link
Author

image
it is still not working after I removed \" .

@ManuRodgers
Copy link
Author

Perhaps, I can use other versions of Nacos to avoid this issue from happening?

@zarkzheng
Copy link
Contributor

But I can still see the " behind -Djava.ext.dirs= in your console output.
image
You may need rebuild your project.

@KomachiSion
Copy link
Collaborator

Can you make sure whether #6409 can fix this problem and whether #6335 cause this problem? If can't fix this problem, please close #6409 and submit new PR to revert #6335.

@KomachiSion KomachiSion added kind/research and removed status/invalid This doesn't seem right labels Jul 22, 2021
@zarkzheng
Copy link
Contributor

@KomachiSion Yes, I am pretty sure #6409 can fix this problem, and i checked on both Ubuntu and Windows.
The correct output should be :

## CORRECT
-Djava.ext.dirs=JAVA_HOME/jre/lib/ext:JAVA_HOME/lib/ext

but not this one :

## ERROR
-Djava.ext.dirs="JAVA_HOME/jre/lib/ext:JAVA_HOME/lib/ext"

And based on #6335 , 6409 also can handle the JAVA_HOME path which contains spaces now.

@ManuRodgers
Copy link
Author

But I can still see the " behind -Djava.ext.dirs= in your console output.
image
You may need rebuild your project.

After removing that double quote, everything works. Thank you guys for your help and patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants