Bug 1384006 - ....SessionIdGeneratorBase.createSecureRandom takes ages to execute, making installer fail waiting on Tomcat
Summary: ....SessionIdGeneratorBase.createSecureRandom takes ages to execute, making i...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Spacewalk
Classification: Community
Component: Installation
Version: 2.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Jan Dobes
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-12 10:49 UTC by Jan Hutař
Modified: 2020-03-06 13:50 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-06 13:50:38 UTC


Attachments (Terms of Use)
catalina.out (123.25 KB, text/plain)
2016-10-12 10:50 UTC, Jan Hutař
no flags Details

Description Jan Hutař 2016-10-12 10:49:25 UTC
Description of problem:
SWnightly installation fails with "Tomcat failed to start properly or the installer ran out of tries.  Please check /var/log/tomcat*/catalina.out for errors." It takes 131 seconds to tomcat to start. Problem is in org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom taking too long.


Version-Release number of selected component (if applicable):
tomcat-8.0.36 at F24


How reproducible:
sometimes


Steps to Reproduce:
1. Install Spacewalk


Actual results:
Sometimes spacewalk-setup fails with:
# spacewalk-setup --non-interactive --answer-file=answer-file --clear-db --external-postgresql
[...]
* Restarting services.
Tomcat failed to start properly or the installer ran out of tries.  Please check /var/log/tomcat*/catalina.out for errors.
# tail -n 5 /var/log/rhn/rhn?installation.log'
Shutting down spacewalk services...
Done.
Starting spacewalk services...
Job for spacewalk.target canceled.
Done.


Expected results:
Either it should work or installer should have an option to use /dev/urandom instead, or documentation .../HowToInstall should mention what is the workaround and/or how to check if your system has enough entropy or default timeout for spacewalk.target should be increased (90 seconds by default if I understand it [1] correctly).

[1] Wait for Tomcat is performed by "/usr/lib/systemd/system/spacewalk-wait-for-tomcat.service" and that has "type=oneshot", so according to `man systemd.service`, "TimeoutSec=" is not relevant here. Where I believe it is relevant is for "/usr/lib/systemd/system/spacewalk.target" where default "DefaultTimeoutStartSec=90s" from `man systemd-system.conf` probably causes the cancel.


Additional info:
I have no idea on what would be right solution here. I'm just trying to make sure we are not bitten by this from time to time in our automation.

jdobes pointed me to explanation on https://wiki.apache.org/tomcat/HowTo/FasterStartUp - there is something about it in Entropy Source section

Comment 1 Jan Hutař 2016-10-12 10:50:20 UTC
Created attachment 1209530 [details]
catalina.out

Comment 2 Michael Mráka 2020-03-06 13:50:38 UTC
Spacewalk 2.8 (and older) has already reached it's End Of Life.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before end of life. If you would still like
to see this bug fixed and are able to reproduce it against current version
of Spacewalk 2.9, you are encouraged change the 'version' and re-open it.


Note You need to log in before you can comment on or make changes to this bug.