apache/hadoop · error · RuntimeException
Can't create MD5 digests
Error message
Can't create MD5 digests
What it means
Error "Can't create MD5 digests" thrown in apache/hadoop.
Source
Thrown at hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/RandomSeedGenerator.java:55
* random numbers with better theoretical guarantees, see
* P. L'Ecuyer, R. Simard, E. J. Chen, and W. D. Kelton,
* ``An Objected-Oriented Random-Number Package with Many Long Streams and
* Substreams'', Operations Research, 50, 6 (2002), 1073--1075
* http://www.iro.umontreal.ca/~lecuyer/papers.html
* http://www.iro.umontreal.ca/~lecuyer/myftp/streams00/
*/
public class RandomSeedGenerator {
private static Logger LOG = LoggerFactory.getLogger(RandomSeedGenerator.class);
/** MD5 algorithm instance, one for each thread. */
private static final ThreadLocal<MessageDigest> md5Holder =
new ThreadLocal<MessageDigest>() {
@Override protected MessageDigest initialValue() {
MessageDigest md5 = null;
try {
md5 = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException nsae) {
throw new RuntimeException("Can't create MD5 digests", nsae);
}
return md5;
}
};
/**
* Generates a new random seed.
*
* @param streamId a string identifying the stream of random numbers
* @param masterSeed higher level master random seed
* @return the random seed. Different (streamId, masterSeed) pairs result in
* (vastly) different random seeds.
*/
public static long getSeed(String streamId, long masterSeed) {
MessageDigest md5 = md5Holder.get();
md5.reset();
//'/' : make sure that we don't get the same str from ('11',0) and ('1',10)
// We could have fed the bytes of masterSeed one by one to md5.update()View on GitHub (pinned to 2add963021)
Solutions
- Run on a JRE that provides the MD5 MessageDigest algorithm (any standard JDK does).
When it happens
Trigger: The JVM's MessageDigest does not support MD5 when RandomSeedGenerator initializes, an environment/JCE configuration problem.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/670314996303c7cf.
Report an issue: GitHub.