Bug 1023651 - jetty systemd startup takes around a minute (can't create jetty.state file)
Summary: jetty systemd startup takes around a minute (can't create jetty.state file)
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-26 14:33 UTC by Joshua Roys
Modified: 2015-02-18 11:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-18 11:38:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Joshua Roys 2013-10-26 14:33:57 UTC
Description of problem:
jetty startup is very slow and ends up saying it fails in journalctl logs even though a `systemctl status jetty.service` shows it running.  Additionally, in the logs jetty says it is unable to create the jetty.state file.


Version-Release number of selected component (if applicable):
jetty-9.0.3-3.fc19.noarch
selinux-policy-3.12.1-74.9.fc19.noarch


How reproducible:
`journalctl --full -f & ; time { systemctl start jetty.service ; }`


Steps to Reproduce:
1. start jetty
2. wait a long time
3. look at the logs


Actual results:
jetty starts very slowly


Expected results:
jetty starts quickly


Additional info:
Oct 24 21:38:23 jericho.lan jetty[4471]: Starting Jetty: 2013-10-24 21:38:23.280:INFO::main: Redirecting stderr/stdout to /var/log/jetty/2013_10_25.stderrout.log
Oct 24 21:39:18 jericho.lan jetty[4471]: . . . . . . . . . . . . . . FAILED Thu Oct 24 21:39:18 EDT 2013


2013-10-24 21:38:23.293:WARN:oejuc.FileNoticeLifeCycleListener:main: 
java.io.FileNotFoundException: /usr/share/jetty/jetty.state (Permission denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:142)
        at java.io.FileWriter.<init>(FileWriter.java:78)
        at org.eclipse.jetty.util.component.FileNoticeLifeCycleListener.writeState(FileNoticeLifeCycleListener.java:46)
        at org.eclipse.jetty.util.component.FileNoticeLifeCycleListener.lifeCycleStarting(FileNoticeLifeCycleListener.java:58)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:187)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1236)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1160)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.eclipse.jetty.start.Main.invokeMain(Main.java:509)
        at org.eclipse.jetty.start.Main.start(Main.java:651)
        at org.eclipse.jetty.start.Main.main(Main.java:99)
2013-10-24 21:38:23.300:INFO:oejs.Server:main: jetty-9.0.3.v20130506
2013-10-24 21:38:23.441:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/var/lib/jetty/webapps/] at interval 1
2013-10-24 21:38:25.449:INFO:oejw.StandardDescriptorProcessor:main: NO JSP Support for /good-titan, did not find org.apache.jasper.servlet.JspServlet
2013-10-24 21:38:25.618:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@7f275e1e{/good-titan,file:/run/jetty/jetty-0.0.0.0-8080-good-tit
an.war-_good-titan-any-/webapp/,AVAILABLE}{/good-titan.war}
2013-10-24 21:38:25.653:INFO:oejs.ServerConnector:main: Started ServerConnector@620a0081{HTTP/1.1}{0.0.0.0:8080}
2013-10-24 21:38:25.654:WARN:oejuc.FileNoticeLifeCycleListener:main: 
java.io.FileNotFoundException: /usr/share/jetty/jetty.state (Permission denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:142)
        at java.io.FileWriter.<init>(FileWriter.java:78)
[...]


----
type=USER_AVC msg=audit(10/26/2013 10:16:00.363:470) : pid=1 uid=root auid=unset ses=unset  subj=system_u:system_r:init_t:s0 msg='avc:  received setenforce notice (enforcing=0)  exe=/usr/lib/systemd/systemd sauid=root hostname=? addr=? terminal=?' 
----
type=SYSCALL msg=audit(10/26/2013 10:16:00.418:471) : arch=x86_64 syscall=unlinkat success=yes exit=0 a0=0xffffffffffffff9c a1=0x18630c0 a2=0x0 a3=0x100 items=0 ppid=2147 pid=2161 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root ses=unset tty=(none) comm=rm exe=/usr/bin/rm subj=system_u:system_r:httpd_t:s0 key=(null) 
type=AVC msg=audit(10/26/2013 10:16:00.418:471) : avc:  denied  { unlink } for  pid=2161 comm=rm name=jetty.state dev="dm-0" ino=474275 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:usr_t:s0 tclass=file 
----
type=SERVICE_START msg=audit(10/26/2013 10:16:08.483:473) : pid=1 uid=root auid=unset ses=unset  subj=system_u:system_r:init_t:s0 msg=' comm=jetty exe=/usr/lib/systemd/systemd hostname=? addr=? terminal=? res=success' 
----
type=SYSCALL msg=audit(10/26/2013 10:16:03.096:472) : arch=x86_64 syscall=open success=yes exit=38 a0=0x7f35c1103a30 a1=O_WRONLY|O_CREAT|O_APPEND a2=0666 a3=0x7f35c62456c0 items=0 ppid=2147 pid=2170 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root ses=unset tty=(none) comm=java exe=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.3.0.fc19.x86_64/jre/bin/java subj=system_u:system_r:httpd_t:s0 key=(null) 
type=AVC msg=audit(10/26/2013 10:16:03.096:472) : avc:  denied  { append } for  pid=2170 comm=java path=/usr/share/jetty/jetty.state dev="dm-0" ino=474349 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:usr_t:s0 tclass=file 
type=AVC msg=audit(10/26/2013 10:16:03.096:472) : avc:  denied  { create } for  pid=2170 comm=java name=jetty.state scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:usr_t:s0 tclass=file 



Additionally, after starting and connecting to jetty:
----
type=SYSCALL msg=audit(10/26/2013 10:27:30.509:477) : arch=x86_64 syscall=epoll_ctl success=yes exit=0 a0=0xa9 a1=EPOLL_CTL_DEL a2=0xad a3=0x7f35ab0c33e0 items=0 ppid=1 pid=2202 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root ses=unset tty=(none) comm=java exe=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.3.0.fc19.x86_64/jre/bin/java subj=system_u:system_r:httpd_t:s0 key=(null) 
type=AVC msg=audit(10/26/2013 10:27:30.509:477) : avc:  denied  { block_suspend } for  pid=2202 comm=java capability=block_suspend  scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=capability2

Comment 1 Fedora End Of Life 2015-01-09 22:21:07 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2015-02-18 11:38:32 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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