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

Vary long start #12

Closed
AlexanderShushunov opened this issue May 26, 2015 · 13 comments
Closed

Vary long start #12

AlexanderShushunov opened this issue May 26, 2015 · 13 comments

Comments

@AlexanderShushunov
Copy link

Image tomcat:8.0.22-jre8

Vary long start.

log:

25-May-2015 16:06:20.304 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/loc
al/tomcat/webapps/ROOT
25-May-2015 16:18:46.687 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instanc
e for session ID generation using [SHA1PRNG] took [746,031] milliseconds.
25-May-2015 16:18:46.721 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr
/local/tomcat/webapps/ROOT has finished in 746,418 ms
...

25-May-2015 16:18:47.307 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 747077 ms
@md5
Copy link
Contributor

md5 commented May 26, 2015 via email

@AlexanderShushunov
Copy link
Author

It is a virtual machine. How can I increase entropy?

@md5
Copy link
Contributor

md5 commented May 26, 2015 via email

@md5
Copy link
Contributor

md5 commented May 26, 2015

Here's a related issue in the VirtualBox issue tracker that has a couple other suggestions on how to get more entropy into the VM: https://www.virtualbox.org/ticket/11297

@AlexanderShushunov
Copy link
Author

Thank you for the answers.
As I understand, low entropy is a problem for all VMs.

@dpwspoon
Copy link

What about changing catalina.sh to use /dev/urandom via a java property. -Djava.security.egd=file:/dev/./urandom

@md5
Copy link
Contributor

md5 commented May 29, 2015

@dpwspoon That's a reasonable workaround for development purposes.

@dpwspoon
Copy link

What about for production? I'm not a cryptology expert but the following posts seem to make it seem like urandom is secure. post1 and post2

@delfuego
Copy link

I'm bumping into this tonight — startups that take 5-10 minutes. Has anyone ever figured out a real solution to this for production systems?

@yosifkit
Copy link
Member

I would infer from the linked post and article that switching to /dev/urandom would be fine.

@dpwspoon
Copy link

That is correct

@delfuego
Copy link

FYI, for a while Docker has had a trivial way to make this switch that doesn't involve any changes to Tomcat or a system property — docker run --device /dev/urandom:/dev/random ...

@tianon
Copy link
Member

tianon commented Aug 29, 2016

Sounds like this is pretty well understood and solved now. 👍

(Might be worth adding something to the image documentation, if it's still a recurring problem. 😄)

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

No branches or pull requests

6 participants