Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1064287 - /usr/sbin/spacewalk-startup-helper wait-for-tomcat does not work as expected on Fedora20
Summary: /usr/sbin/spacewalk-startup-helper wait-for-tomcat does not work as expected ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space22
TreeView+ depends on / blocked
 
Reported: 2014-02-12 10:57 UTC by Jan Hutař
Modified: 2014-07-17 08:41 UTC (History)
1 user (show)

Fixed In Version: spacewalk-admin-2.2.2-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-17 08:41:31 UTC


Attachments (Terms of Use)

Description Jan Hutař 2014-02-12 10:57:16 UTC
Description of problem:
On Fedora 20 file /var/run/tomcat.pid is empty making `/usr/sbin/spacewalk-startup-helper wait-for-tomcat` to exit immediately with exit code being 0.


Version-Release number of selected component (if applicable):
tomcat-7.0.47-1.fc20.noarch
spacewalk-admin-2.1.2-1.fc20.noarch


How reproducible:
always


Steps to Reproduce:
Run all these commands quickly in the row
1. service tomcat restart; /usr/sbin/spacewalk-startup-helper wait-for-tomcat; echo $?; wget https://$(hostname) --no-check-certificate


Actual results:
Although wait-for-tomcat passes, subsequent wget fails.


Expected results:
wait-for-tomcat should end only if Tomcat is really ready to serve content.

Comment 1 Jan Pazdziora 2014-05-22 08:49:18 UTC
Proposed patch: https://github.com/spacewalkproject/spacewalk/pull/78

Comment 2 Jan Pazdziora 2014-05-22 08:56:22 UTC
Fixed in Spacewalk master, 0aea30071ee55c1db932288068d48261eafde5e3.

Comment 3 Jan Pazdziora 2014-05-22 12:59:54 UTC
Hmm, even if the step to reproduce from comment 0 passes with spacewalk-admin-2.2.2-1.fc20.noarch, when running spacewalk-setup, I still get

Tomcat failed to start properly or the installer ran out of tries.  Please check /var/log/tomcat*/catalina.out for errors.

That is strange because in the /var/log/messages, the order suggests we've actually waited fine:

May 22 08:38:35 spacewalk server: INFO: Starting ProtocolHandler ["ajp-bio-0:0:0:0:0:0:0:1-8009"]
May 22 08:38:35 spacewalk server: May 22, 2014 8:38:35 AM org.apache.catalina.startup.Catalina start
May 22 08:38:35 spacewalk server: INFO: Server startup in 39764 ms
May 22 08:38:36 spacewalk systemd: Started Spacewalk wait for tomcat.
May 22 08:38:36 spacewalk systemd: Starting The Apache HTTP Server...
May 22 08:38:36 spacewalk httpd: [Thu May 22 08:38:36.550373 2014] [alias:warn] [pid 2584] AH00671: The Alias directive in /etc/rhn/satellite-httpd/conf/rhn/rhn_monitoring.conf at line 21 will probably never match because it overlaps an earlier ScriptAlias.

Comment 4 Jan Pazdziora 2014-05-22 13:58:17 UTC
Hmm,

PERL_LWP_SSL_VERIFY_HOSTNAME=0 HEAD -Se http://$( hostname )/ ; echo $?

for on my Fedora 20's when curl works just fine. So it's a different problem, not related to the tomcat/httpd startup.

Comment 5 Jan Pazdziora 2014-05-23 10:57:52 UTC
(In reply to Jan Pazdziora from comment #3)
> Hmm, even if the step to reproduce from comment 0 passes with
> spacewalk-admin-2.2.2-1.fc20.noarch, when running spacewalk-setup, I still
> get
> 
> Tomcat failed to start properly or the installer ran out of tries.  Please
> check /var/log/tomcat*/catalina.out for errors.

Different issue, caused by bug 1094442 comment 6.

Comment 6 Milan Zázrivec 2014-07-17 08:41:31 UTC
Spacewalk 2.2 has been released:

    https://fedorahosted.org/spacewalk/wiki/ReleaseNotes22


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