Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

DomainHealth-081 on Weblogic90: Error 403

Help
Simon SST
2010-05-21
2013-04-25
  • Simon SST
    Simon SST
    2010-05-21

    Hi all,

    I tried to deploy version 081 on a Weblogic9.0. I just modified the WEB-INF/weblogic.xml 'weblogic' user to 'system'. For this I used JAVA jar to unzip and zip the war file.
    Deployment was done through the Weblogic console and I didn't notice any errors.

    When I tried to access DomainHealth through http://HOST:PORT/domainhealth, I have an Error403 page. I have no ide where this could come from. Here's the stacktrace I have in my log file:

    ####<May 21, 2010 2:44:17 PM CEST> <Info> <J2EE Deployment SPI> <HOSTNAME> <MY_APPS_server> < ExecuteThread: '19' for queue: 'weblogic.kernel.Default (self-tuning)'> <system> <> <> <1274445857544> <BEA-260121> <Initiating start operation for application, domainhealth-081 , to MY_APPS_server .>
    ####<May 21, 2010 2:44:17 PM CEST> <Info> <Deployer> <HOSTNAME> <MY_APPS_server> < ExecuteThread: '19' for queue: 'weblogic.kernel.Default (self-tuning)'> <system> <> <> <1274445857556> <BEA-149038> <Initiating Task for domainhealth-081 : start application domainhealth-081 on MY_APPS_server.>
    ####<May 21, 2010 2:44:17 PM CEST> <Info> <Deployer> <HOSTNAME> <MY_APPS_server> < ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274445857575> <BEA-149059> <Module domainhealth-081.war of application domainhealth-081 is transitioning from STATE_PREPARED to STATE_ADMIN on server MY_APPS_server.>
    ####<May 21, 2010 2:44:17 PM CEST> <Info> <Deployer> <HOSTNAME> <MY_APPS_server> < ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274445857807> <BEA-149060> <Module domainhealth-081.war of application domainhealth-081 successfully transitioned from STATE_PREPARED to STATE_ADMIN on server MY_APPS_server.>
    ####<May 21, 2010 2:44:17 PM CEST> <Notice> <DomainHealth> <HOSTNAME> <MY_APPS_server> < ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <system> <> <> <1274445857818> <000000> <Starting DomainHealth application>
    ####<May 21, 2010 2:44:17 PM CEST> <Info> <DomainHealth> <HOSTNAME> <MY_APPS_server> < ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <system> <> <> <1274445857868> <000000> <Statistics Retriever Background Service starting up>
    ####<May 21, 2010 2:44:17 PM CEST> <Notice> <DomainHealth> <HOSTNAME> <MY_APPS_server> < ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <system> <> <> <1274445857874> <000000> <Retreived statistic CSV files location: /CLIENT/decalog/soft/KBC_v6.0-00_SP4/server/weblogic/statistics>
    ####<May 21, 2010 2:44:17 PM CEST> <Info> <Deployer> <HOSTNAME> <MY_APPS_server> < ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274445857935> <BEA-149059> <Module domainhealth-081.war of application domainhealth-081 is transitioning from STATE_ADMIN to STATE_ACTIVE on server MY_APPS_server.>
    ####<May 21, 2010 2:44:17 PM CEST> <Info> <Deployer> <HOSTNAME> <MY_APPS_server> < ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274445857936> <BEA-149060> <Module domainhealth-081.war of application domainhealth-081 successfully transitioned from STATE_ADMIN to STATE_ACTIVE on server MY_APPS_server.>
    ####<May 21, 2010 2:44:17 PM CEST> <Info> <Deployer> <HOSTNAME> <MY_APPS_server> < ExecuteThread: '20' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274445857942> <BEA-149074> <Successfully completed deployment task: start application domainhealth-081 on MY_APPS_server.>
    ####<May 21, 2010 2:44:32 PM CEST> <Info> <Health> <HOSTNAME> <MY_APPS_server> <weblogic.GCMonitor> <<anonymous>> <> <> <1274445872920> <BEA-310002> <44% of the total memory in the server is free>
    ####<May 21, 2010 2:44:47 PM CEST> <Info> <DomainHealth> <HOSTNAME> <MY_APPS_server> < ExecuteThread: '18' for queue: 'weblogic.kernel.Default (self-tuning)'> <system> <> <> <1274445887900> <000000> <Statistics Retriever Background Service running first time processing initialisation steps>
    ####<May 21, 2010 2:44:47 PM CEST> <Debug> <DomainHealth> <HOSTNAME> <MY_APPS_server> < ExecuteThread: '18' for queue: 'weblogic.kernel.Default (self-tuning)'> <system> <> <> <1274445887907> <000000> <Successfully located local server runtime mbean using jndi lookup of: java:comp/env/jmx/runtime>
    ####<May 21, 2010 2:44:47 PM CEST> <Error> <DomainHealth> <HOSTNAME> <MY_APPS_server> < ExecuteThread: '18' for queue: 'weblogic.kernel.Default (self-tuning)'> <system> <> <> <1274445887942> <000000> <Statistics Retriever Background Service - first time processing initialisation failed - will attempt initialisation again after a pause (this can be caused if the server takes a while to start-up, in which case, the retry should sort things out). Cause: domainhealth.core.jmx.WebLogicMBeanException: javax.management.AttributeNotFoundException: com.bea:Name=MY_APPS_domain,Location=MY_APPS_domain,Type=Domain:DomainVersion>
    ####<May 21, 2010 2:44:47 PM CEST> <Debug> <DomainHealth> <HOSTNAME> <MY_APPS_server> < ExecuteThread: '18' for queue: 'weblogic.kernel.Default (self-tuning)'> <system> <> <> <1274445887943> <000000> <First time processing failure cause: + javax.management.AttributeNotFoundException: com.bea:Name=MY_APPS_domain,Location=MY_APPS_domain,Type=Domain:DomainVersion
    domainhealth.core.jmx.WebLogicMBeanException: javax.management.AttributeNotFoundException: com.bea:Name=MY_APPS_domain,Location=MY_APPS_domain,Type=Domain:DomainVersion
    at domainhealth.core.jmx.WebLogicMBeanConnection.getTextAttr(WebLogicMBeanConnection.java:246)
    at domainhealth.backend.retriever.RetrieverBackgroundService.isDomainVersion103orGreater(RetrieverBackgroundService.java:316)
    at domainhealth.backend.retriever.RetrieverBackgroundService.runFirstTimeProcessing(RetrieverBackgroundService.java:201)
    at domainhealth.backend.retriever.RetrieverBackgroundService.access$400(RetrieverBackgroundService.java:63)
    at domainhealth.backend.retriever.RetrieverBackgroundService$CaptureWork.doRun(RetrieverBackgroundService.java:154)
    at domainhealth.core.env.ContextAwareWork.run(ContextAwareWork.java:48)
    at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:259)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    javax.management.AttributeNotFoundException: com.bea:Name=MY_APPS_domain,Location=MY_APPS_domain,Type=Domain:DomainVersion
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:205)
    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:154)
    at javax.management.remote.rmi.RMIConnectionImpl_900_WLStub.getAttribute(Unknown Source)
    at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:854)
    at domainhealth.core.jmx.WebLogicMBeanConnection.getTextAttr(WebLogicMBeanConnection.java:244)
    at domainhealth.backend.retriever.RetrieverBackgroundService.isDomainVersion103orGreater(RetrieverBackgroundService.java:316)
    at domainhealth.backend.retriever.RetrieverBackgroundService.runFirstTimeProcessing(RetrieverBackgroundService.java:201)
    at domainhealth.backend.retriever.RetrieverBackgroundService.access$400(RetrieverBackgroundService.java:63)
    at domainhealth.backend.retriever.RetrieverBackgroundService$CaptureWork.doRun(RetrieverBackgroundService.java:154)
    at domainhealth.core.env.ContextAwareWork.run(ContextAwareWork.java:48)
    at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:259)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)

    If anyone could help me solve this issue.

    I used to work with versio .060 a while ago and I'd like to use this new version on Weblo 9.0;9.2;10.x

    Thanks for your help

     
  • Paul Done
    Paul Done
    2010-05-21

    Hi

    I'm really sorry but you've just discovered a bug. I test each new release of DH with WLS vesion 9.2, 10.0, and 10.3 and it looks like I have mistakenly assumed that if it works in 9.2 it will also work in 9.1 and 9.0. This was the case in earlier versions but I've obviously introduced a bug in DH 0.8x.

    The problem code looks up the "DomainVersion" on the DomainMBean to see what version of WebLogic is being used (this is to work out whether to use WLDF harvesting or JMX polling on the fly). However, until you just pointed out this problem, I had assumed that this attribute is there in all WLS versions. However, I've just checked the MBean references for WLS 9.0, 9.1 and 9.2….

    http://download.oracle.com/docs/cd/E13222_01/wls/docs90/wlsmbeanref/core/index.html
    http://download.oracle.com/docs/cd/E13222_01/wls/docs91/wlsmbeanref/core/index.html
    http://download.oracle.com/docs/cd/E13222_01/wls/docs92/wlsmbeanref/core/index.html

    …and it looks like this "DomainVersion" attribute was new in version 9.2 WebLogic, hence the bug - sorry,

    I will fix this in the next major release of DH (0.9) but this is not due out for another month or so. In the meantime, can you download the source zip for DH 0.8.1 (domainhealth-081-src.zip) from the site and make the following code change before running ant to re-build a fixed WAR file, following the simple build instructions shown here: https://sourceforge.net/apps/mediawiki/domainhealth/index.php?title=Building_From_Source

    In src/domainhealth/backend/retriever/RetrieverBackgroundService.java's isDomainVersion103orGreater() method between the try{} and finally{} blocks, add:

    catch (Exception e) {
        // Assume "DomainVersion" attr is not present and hance is a a pre-9.2 version
        return false;
    }

    A slight hack, but this code only gets called once when the DH WAR file initialised on start-up/deployment so won't have any pefroamcne cost, etc, .

    Is this ok?

    Sorry

    Paul

     
  • Simon SST
    Simon SST
    2010-05-21

    Hi,

    Thanks for this quick answer, I'll try to build it on my side (I'm more a DBA/UNIX admin, so I have no knowledges on all these stuffs) otherwise I'll wait for the next release

    Thanks

     
  • Simon SST
    Simon SST
    2010-05-24

    Hello Paul,

    think I did the right correction as I don't have the exception anymore unfortunately I still have my HTTP error 403.

    Here's how I modify the file RetrieverBackgroundService.java
    private boolean isDomainVersion103orGreater() throws WebLogicMBeanException {
    String version = "";
    DomainServiceMBeanConnection conn = null;

    try {
    conn = new DomainServiceMBeanConnection();
    ObjectName domainConfig = conn.getDomainConfiguration();
    version = conn.getTextAttr(domainConfig, DOMAIN_VERSION);
    }
    catch (Exception e) {
    // Assume "DomainVersion" attr is not present and hance is a a pre-9.2 version
    return false;
    }
    finally {
    if (conn != null) {
    conn.close();
    }
    }
    return isWebLogicVersion103OrGreater(version);
    }

    As I'm using the Weblogic console with the following login: system/system
    I also modify the file WEB-INF/weblogic.xml in the following way:
    <run-as-role-assignment>
    <role-name>SystemAdministrator</role-name>
    <run-as-principal-name>system</run-as-principal-name>
    </run-as-role-assignment>

    Here's what I got in my browser:
    Error 403-Forbidden
    From RFC 2068 Hypertext Transfer Protocol - HTTP/1.1:
    10.4.4 403 Forbidden
    The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

    Here's the content of my 'access log file
    127.0.0.1 - -  "GET /domainhealth HTTP/1.1" 302 
    127.0.0.1 - -  "GET /domainhealth/corestats HTTP/1.1" 403 1216
    127.0.0.1 - -  "GET /domainhealth/corestats HTTP/1.1" 403 1216
    127.0.0.1 - -  "GET /domainhealth HTTP/1.1" 302 
    127.0.0.1 - -  "GET /domainhealth/corestats HTTP/1.1" 403 1216

    I also clean all temporary file to make sure it wasn't using any previous file.

    Thanks for any hints.

    Simon

     
  • Simon SST
    Simon SST
    2010-05-24

    Hi ll,

    I forgot to add the following information regarding the application deployment:
      <app-deployment>
        <name>domainhealth-081</name>
        <target>xxx_server</target>
        <module-type>war</module-type>
        <source-path>applications/domainhealth-081.war</source-path>
        <security-dd-model>DDOnly</security-dd-model>
      </app-deployment>

     
  • Paul Done
    Paul Done
    2010-05-25

    Hi Simon

    Do you have a WLS 9.2 or greater version you could quickly try out in case its another 9.0/9.1 issue (I will fix it if its earlier version but need to try to narrow down the error a little and I've not got access to WLS 9.0 or 9.1 today, so if reproduced on greater version that will help). As you say for some reason authorisation is not working but I have tested it in the past changing to system. Any other logged info? Can you paste your complete web.xml and weblogic.xml?

    Thx

    Paul

     
  • Simon SST
    Simon SST
    2010-06-04

    Hi Paul,

    First of all, sorry for the delay but I wasn't abroad for a quite long time. Anyway, I was able to deploy the WAR file on a 9.2.2 version and it works.
    I don't know whether it's important or not but I use the login 'weblogic' on my 9.2.2 version instead of 'system' on my 9.0

    Regards,

    Simon

     
  • Paul Done
    Paul Done
    2010-06-08

    Hi Simon.

    I just tried user 'system' rather than 'weblogic' (chanign weblogic.xml) on WLS 10.3.3 and that works too. I've still not had chance to get a copy of WLS 9.0/9.1 but I will and will try this out and get back to you.

    Thx

    Paul

     
  • Paul Done
    Paul Done
    2010-06-10

    I've just got hold of a copy of WLS 9.0.0 and tested it and had no problems (after adding the catch excepton fix). When I created the 9.0.0 domain I set system user to be 'system' rather than 'weblogic' and in domain health war I changed the entry in weblogic.xml for 'run-as-principal-name' to be 'system' before deploying Domain Health. All worked fine.

    Is there anything else specific to your environment or the way you modified DomainHealth?

    Thx

    Paul