Getting access denied error on the Cruise Control web app

View: New views
1 Messages — Rating Filter:   Alert me  

Getting access denied error on the Cruise Control web app

by leason :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello all,

I've poured through the mailing list and searched google far and wide for help on this but I'm really stuck.  I've gotten the app server (Tomcat 5.5) running properly and deployed the cruisecontrol.war file. I've followed the instructions and configured the web.xml file.  I ran into a bit of trouble with the web.xml and .tld files with Tomcat for some reason.  I was able to get the app running by removing the DOCTYPE declarations from all three files.  Now when I try to get to the app I get this error:

access denied (java.util.PropertyPermission cruisecontrol.jmxhost read)
java.security.AccessControlException: access denied (java.util.PropertyPermission cruisecontrol.jmxhost read)
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
	at java.security.AccessController.checkPermission(AccessController.java:546)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
	at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285)
	at java.lang.System.getProperty(System.java:652)
	at net.sourceforge.cruisecontrol.taglib.JmxBaseTag.getParameter(JmxBaseTag.java:73)
	at net.sourceforge.cruisecontrol.taglib.JmxBaseTag.createJmxUrl(JmxBaseTag.java:81)
	at net.sourceforge.cruisecontrol.taglib.JmxBaseTag.doStartTag(JmxBaseTag.java:60)
	at org.apache.jsp.index_jsp._jspService(index_jsp.java:173)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
	at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
	at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:262)
	at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:171)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
	at java.lang.Thread.run(Thread.java:619)
I've checked every permission I can think of and made sure the tomcat user had write permission on pretty much everything.  Here is my web.xml file for reference:

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"   version="2.2">  <display-name>CruiseControl Reporting App</display-name>    <description>The reporting application for CruiseControl. Provides a simple but rich        interface for viewing CruiseControl build reports.    </description>
    <context-param>        <param-name>singleProject</param-name>        <param-value>false</param-value>        <description>Indicates if the CruiseControl instance is to report on only one project.            If it is, then you should set this to true.        </description>    </context-param>            <context-param>        <param-name>cacheRoot</param-name>        <param-value>/var/cache/tomcat5.5/cruisecontrol</param-value>        <description>Full path to a directory where caches of XSL transformations are written.            The web context must have permission to write to this directory. If not            specified, caches will be written in a subdir called _cache of the logDir.        </description>    </context-param>            <context-param>      <!-- You can set this value via the user.log.dir property in Ant, when building the WAR file. -->      <param-name>logDir</param-name>      <param-value>/home/lee/cruisework/logs</param-value>      <description> This should be the full path to your CruiseControl log directory. If you          are in single project mode, this will contain only the logs for your project. If you          are in multi-project mode, it is expected that you will have multiple sub-directories          inside this log directory, one for each project.      </description>    </context-param>
    <context-param>      <!-- You can set this value via the user.build.status.file property in Ant, when building the WAR file. -->      <param-name>currentBuildStatusFile</param-name>      <param-value>status.txt</param-value>      <description>This should be the path to your current build status file, which is relative          to the log directory (or, in single-project mode, relative to the project's log          directory)      </description>    </context-param>
    <context-param>      <param-name>fileServlet.welcomeFiles</param-name>      <param-value>index.htm index.html</param-value>      <description>The list of space separated index files that should be automatically displayed          when browsing a directory displayed by the file servlet. The order matters.          Let empty or comment out to disable indexes.      </description>    </context-param>
    <context-param>      <param-name>cruisecontrol.jmxport</param-name>      <param-value>8181</param-value>      <description>The port on which CruiseControl will connect to the JMX HttpAdaptor to "force" builds or view the          control panel. This value can be overriden using an environment variable with the same name.      </description>    </context-param>
                  <context-param>      <param-name>cruisecontrol.jmxhost</param-name>      <param-value>localhost</param-value>      <description>If your server doesn't know it's own proper IP address or it's name isn't resolvable by other machines on the network, set the IP address or resolvable name here. This will enable things like the "Force Builds" button to work.      </description>    </context-param>             
    <!--    <context-param>      <param-name>xslt.pmd.warning.threshold</param-name>      <param-value>3</param-value>      <description>PMD violations with a priority below this threshold are considered warnings and          are only reported by the total count on the build results page.      </description>    </context-param>    -->
    <!--    <context-param>      <param-name>xslt.viewcvs.url</param-name>      <param-value>http://cvs.sourceforge.net/viewcvs.py/cruisecontrol</param-value>      <description>The URL of the ViewCVS website used by cvstagdiff.xsl, checkstyle-details.xsl          and pmd-details.xsl      </description>    </context-param>    -->
    <context-param>      <param-name>xslt.cvstagdiff.success.show</param-name>      <param-value>true</param-value>      <description>Controls whether the ViewCVS differences report should be shown when the build          was successful. The default is to only show the modifications report for broken builds      </description>    </context-param>
    <!--    <context-param>      <param-name>xslt.checkstyle.hide.warnings</param-name>      <param-value>true</param-value>      <description>Controls whether only CheckStyle errors or all CheckStyle errors and warnings          should be listed on the build results page. Set to 'true' for hiding the warnings. The          default is to list all errors and warnings      </description>    </context-param>    -->
    <servlet>      <servlet-name>buildresults</servlet-name>      <display-name>Build Result Reporter</display-name>      <description>Presents build results in a human-readable and intuitive format.</description>      <jsp-file>/main.jsp</jsp-file>    </servlet>
    <servlet>      <servlet-name>rss</servlet-name>      <display-name>Build Result RSS Feed</display-name>      <description>Presents build results in the RSS XML format.</description>      <jsp-file>/rss.jsp</jsp-file>    </servlet>
    <servlet>        <servlet-name>index</servlet-name>        <display-name>Index/Summary page</display-name>        <description>Presents a summary of all projects, allowing easy navigation to each.</description>        <jsp-file>/index.jsp</jsp-file>    </servlet>
    <servlet>        <servlet-name>ArtifactServlet</servlet-name>        <servlet-class>net.sourceforge.cruisecontrol.servlet.FileServlet</servlet-class>        <init-param>            <param-name>rootDir</param-name>            <param-value>/home/lee/cruisework/artifacts</param-value>        </init-param>    </servlet>
    <servlet>     <servlet-name>XmlServlet</servlet-name>     <servlet-class>net.sourceforge.cruisecontrol.servlet.XmlServlet</servlet-class>    </servlet>
    <servlet>        <servlet-name>LogServlet</servlet-name>        <servlet-class>net.sourceforge.cruisecontrol.servlet.LogFileServlet</servlet-class>    </servlet>
    <servlet>        <servlet-name>webwork</servlet-name>        <servlet-class>com.opensymphony.webwork.dispatcher.ServletDispatcher</servlet-class>    </servlet>
    <servlet>        <servlet-name>config</servlet-name>        <display-name>Project configuration UI</display-name>        <description>Wraps webwork configuration actions inside main page.</description>        <jsp-file>/main.jsp</jsp-file>    </servlet>
    <!-- Used for charting... -->    <servlet>        <servlet-name>CewolfServlet</servlet-name>        <servlet-class>de.laures.cewolf.CewolfRenderer</servlet-class>    </servlet>
    <servlet-mapping>        <servlet-name>CewolfServlet</servlet-name>        <url-pattern>/cewolf/*</url-pattern>    </servlet-mapping>
    <servlet-mapping>        <servlet-name>LogServlet</servlet-name>        <url-pattern>/logs/*</url-pattern>    </servlet-mapping>
    <servlet-mapping>        <servlet-name>ArtifactServlet</servlet-name>        <url-pattern>/artifacts/*</url-pattern>    </servlet-mapping>
    <servlet-mapping>      <servlet-name>buildresults</servlet-name>      <!-- Strictly speaking, this should be /buildresults for single-project mode. But it works anyway. -->      <url-pattern>/buildresults/*</url-pattern>    </servlet-mapping>
    <servlet-mapping>        <servlet-name>webwork</servlet-name>        <url-pattern>*.jspa</url-pattern>    </servlet-mapping>
    <servlet-mapping>        <servlet-name>config</servlet-name>        <url-pattern>/config/*</url-pattern>    </servlet-mapping>
    <servlet-mapping>      <servlet-name>rss</servlet-name>      <url-pattern>/rss/*</url-pattern>    </servlet-mapping>
    <servlet-mapping>        <servlet-name>XmlServlet</servlet-name>        <url-pattern>/xml/*</url-pattern>    </servlet-mapping>
    <servlet-mapping>        <servlet-name>index</servlet-name>        <url-pattern>/index</url-pattern>    </servlet-mapping>
    <welcome-file-list>     <welcome-file>index.jsp</welcome-file>    </welcome-file-list></web-app>

Any help would be greatly appreciated.  I can confirm the cache dir is correct and writable, and that the other dirs relating to the work root are correct.

Best regards,

Lee Eason

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Cruisecontrol-user mailing list
Cruisecontrol-user@...
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user
LightInTheBox - Buy quality products at wholesale price!