Open source software supply chain lighting plan, waiting for you>>>
Question:
On the server, download the link file of HTTPS and report javax.net.ssl.sslkeyexception: RSA premaster secret error
When running locally, no error is reported, but the error is reported on the server
Solution:
Set lib/ext/sunjce in the JRE directory_ The provider.jar is loaded in
JRE Directory: $Java_ HOME/jre
Load sunjce_ Two methods of provider.jar:
1. Will sunjce_ Copy the provider.jar to the web project directory
2. Modify the startup script and load the JRE directory into classpath
vi catalina.sh
Modify elif [“$1” = “start”]; Then, add – DJava. Ext. dirs to specify the directory to load additional jars, and separate multiple directories with
eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVV
A_OPTS $CATALINA_OPTS \
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Djava.security.manager \
-Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.ext.dirs="/opt/web/customscript/customlib:$JAVA_HOME/jre/lib/ext" \
Similar Posts:
- Java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment [Solved]
- java.security.NoSuchProviderException: no such provider: BC [Two Method]
- The CATALINA_HOME environment variable is not defined correctly
- [Solved] Using jdk11 to deploy Nacos under Linux, the startup error is: could not find or load main class
- Sudo starts Tomcat and reports an error. There is no Java environment
- Deploying multiple jbosserror: transport error 202: bind failed in Linux
- [Solved] Java.security.nosuchalgorithmexception: cannot find any provider supporting, mainmethod for AES encryption error
- [Solved] Abnormal build process termination IDEA Start Error
- java.lang.UnsupportedClassVersionError:Unsupported major.minor version 52.0
- [Solved] javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair