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

FIX: HmacSHA1 not found if JAVA_HOME set to JRE #1140

merged 1 commit into from Jun 12, 2019


Copy link

boypt commented Apr 6, 2019

What is the purpose of the change

when JAVA_HOME is set to JRE, errors throw out as below:

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0 ClusterListSubCommand command failed
Caused by: org.apache.rocketmq.acl.common.AclException: [10015:signature-failed] unable to calculate a request signature. error=[10015:signaturerithm HmacSHA1 not available
	at org.apache.rocketmq.acl.common.AclSigner.signAndBase64Encode(
	at org.apache.rocketmq.acl.common.AclSigner.calSignature(
	at org.apache.rocketmq.acl.common.AclSigner.calSignature(
	at org.apache.rocketmq.acl.common.AclUtils.calSignature(
	at org.apache.rocketmq.acl.common.AclClientRPCHook.doBeforeRequest(
	at org.apache.rocketmq.remoting.netty.NettyRemotingAbstract.doBeforeRpcHooks(
	at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(
	at org.apache.rocketmq.client.impl.MQClientAPIImpl.getBrokerClusterInfo(
	... 2 more
Caused by: org.apache.rocketmq.acl.common.AclException: [10015:signature-failed] unable to calculate a request signature. error=Algorithm HmacSH
	at org.apache.rocketmq.acl.common.AclSigner.sign(
	at org.apache.rocketmq.acl.common.AclSigner.signAndBase64Encode(
	... 13 more
Caused by: Algorithm HmacSHA1 not available
	at javax.crypto.Mac.getInstance(
	at org.apache.rocketmq.acl.common.AclSigner.sign(
	... 14 more

This is cause by Djava.ext.dirs pointing to a location without sunjce_provider.jar, which should be at ${JAVA_HOME}/lib/ext in JRE.

Brief changelog

Add correct ext dir for JRE in / tools.cmd

same fix was push as #1134 but messed with branch.

Verifying this change


This comment has been minimized.

Copy link

coveralls commented Apr 6, 2019

Coverage Status

Coverage decreased (-0.06%) to 49.414% when pulling 6a869cc on boypt:jre into b80c262 on apache:develop.

@boypt boypt mentioned this pull request Apr 6, 2019
5 of 6 tasks complete
@ShannonDing ShannonDing merged commit c409c35 into apache:develop Jun 12, 2019
1 of 2 checks passed
1 of 2 checks passed
coverage/coveralls Coverage decreased (-0.06%) to 49.414%
continuous-integration/travis-ci/pr The Travis CI build passed
@ShannonDing ShannonDing added this to the 4.5.2 milestone Jun 13, 2019
@ShannonDing ShannonDing added the bug label Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.