The big slow analysis of Tomcat launcher under Ubuntu

Source: Internet
Author: User
Tags generator session id
When you deploy Tomcat in a UBUNTU14 new environment, starting an app with CI starts up to 15 minutes. Looking closely at the time-consuming statistics log of the Tomcat output finds the following log: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took[97431] Stroll on the StackOverflow for a while found the following explanation: http://stackoverflow.com/questions/26431922/ tomcat7-starts-too-late-on-ubuntu-14-04-x64-digitalocean/26432537#26432537 tried, the problem solved. So why do some machines have this, and some machines are normal? Reference: The core of the Http://en.wikipedia.org/wiki//dev/random#Linux problem points to the random password generator, dealing with the Environmental Noise acquisition section. The so-called ambient noise is the binary data from each device driver and other sources, also called entropy. The entropy pool is where the noise data is stored. When the entropy pool is empty, the use of/dev/random will be blocked. However, to check the environment configuration, the installed Java is handled using/dev/urandom. Its mode is non-blocking when the entropy pool is empty. Obviously, more than that, you can find a description from the StackOverflow link that explains why the JDK uses/dev/urandom, but it doesn't work. Random number generator, based on SHA1PRNG. And SHA1PRNG relies heavily on high-quality seeds, and if the seeds are not good enough, the results of random numbers can be predicted. So developers need to make sure that/dev/random is used as a source of entropy, even if the JVM is configured to use/dev/urandom. So the switching entropy source is/dev/urandom, also need to ensure that the/dev/random has enough entropy. If the system has a hardware rng, it can provide enough entropy by installing the rng-tools. Otherwise, you will need to install the haveged to provide a good enough entropy source without a hardware-dependent rng. In a virtual machine, the Rng-tools can obtain the virtual hardware rng from the host to provide entropy. EGD as an alternative to this environment, but in the Ubuntu repository, there is no support for this software, so there is a hidden danger.

The big slow analysis of Tomcat launcher under Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.