安装分析后,我的 Worklight 6.2 控制台上没有运行时

Posted

技术标签:

【中文标题】安装分析后,我的 Worklight 6.2 控制台上没有运行时【英文标题】:No runtime on my Worklight 6.2 Console after installing analytics 【发布时间】:2014-07-30 03:37:08 【问题描述】:

我刚刚安装了Worklight 6.2 服务器,使用配置工具部署了一个简单的项目,它工作正常。然后我按照知识中心的说明安装分析。之后,当我在浏览器中打开 WL 控制台时,我得到“找不到运行时”。分析似乎运行良好

我的战争文件位于 Liberty 应用程序文件夹中。在我的情况下 C:\IBM\WebSphere\Liberty\usr\servers\simpleServer\apps

我尝试了以下解决方案,但没有奏效。我删除了工作区中的文件并检查了我的 jdk,即 jdk6_45 No runtime on my Worklight 6.2 Console

这是我的 server.xml

<!-- Enable features -->
<featureManager>
    <feature>jsp-2.2</feature>

    <!-- Begin for analytics -->
    <feature>jsp-2.2</feature>
    <feature>jndi-1.0</feature>
    <!-- End for analytics -->

    <!-- Begin of features added by IBM Worklight installer. -->
    <feature>ssl-1.0</feature>
    <feature>servlet-3.0</feature>
    <feature>jdbc-4.0</feature>
    <feature>appSecurity-1.0</feature>
    <feature>jndi-1.0</feature>
    <!-- End of features added by IBM Worklight installer. -->


    <!-- Begin of features added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->
    <feature>ssl-1.0</feature>
    <feature>servlet-3.0</feature>
    <feature>jdbc-4.0</feature>
    <feature>jndi-1.0</feature>
    <!-- <feature>restConnector-1.0</feature> -->
    <feature>appSecurity-1.0</feature>
    <!-- End of features added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->


    <!-- Begin of features added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->
    <feature>ssl-1.0</feature>
    <feature>servlet-3.0</feature>
    <feature>jdbc-4.0</feature>
    <feature>jndi-1.0</feature>
    <!-- End of features added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->

</featureManager>

<httpEndpoint id="defaultHttpEndpoint"
              host="*"
              httpPort="9080"
              httpsPort="9443" >

    <!-- Option soReuseAddr added by IBM Worklight installer. -->
    <!-- Option soReuseAddr added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->
    <!-- Option soReuseAddr added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->
    <tcpOptions soReuseAddr="true"/>

</httpEndpoint>

<!-- Begin of configuration added by IBM Worklight installer. -->

<!-- Declare the IBM Application Center Console application. -->
<application id="appcenterconsole" name="appcenterconsole" location="appcenterconsole.war" type="war">
    <application-bnd>
        <security-role name="appcenteradmin">
            <group name="appcentergroup"/>
        </security-role>
    </application-bnd>
</application>

<!-- Declare the IBM Application Center Services application. -->
<application id="applicationcenter" name="applicationcenter" location="applicationcenter.war" type="war">
    <application-bnd>
        <security-role name="appcenteradmin">
            <group name="appcentergroup"/>
        </security-role>
    </application-bnd>
    <classloader delegation="parentLast">
        <commonLibrary>
            <fileset dir="$wlp.install.dir/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.1.jar"/>
        </commonLibrary>
    </classloader>
</application>

<!-- Declare the user registry for the IBM Application Center. -->
<basicRegistry id="applicationcenter-registry" realm="ApplicationCenter">
    <!--    Worklight user.
    [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin'] 
    -->
    <user name="WorklightRESTUser" password="WGFtAaW8fTma"/>

    <!-- The users defined here are members of group "appcentergroup",
         thus have role "appcenteradmin", and can therefore perform
         administrative tasks through the IBM Application Center Console. -->
    <user name="appcenteradmin" password="admin"/>

    <user name="demo" password="demo"/>
    <group name="appcentergroup">
        <member name="appcenteradmin"/>
        <member name="demo"/>
    </group>
</basicRegistry>

<!-- Declare the JNDI properties for the IBM Application Center. -->

<!-- Define the AppCenter services endpoint in order for the AppCenter console to be able to invoke the REST service.
        You need to enable this property if the server is behind a reverse proxy
        or if the context root of the Application Center Services application is different from '/applicationcenter'. -->
<!-- <jndiEntry jndiName="ibm.appcenter.services.endpoint" value='"http://proxyhost:proxyport/applicationcenter"'/> -->
<!-- The directory with binaries of the 'aapt' program, from the android SDK's platform-tools package. -->
<jndiEntry jndiName="android.aapt.dir" value='"C:/IBM/Worklight/ApplicationCenter/tools/android-sdk"'/>
<!-- The protocol of the application resources URI. This property is optional. It is only needed if the protocol of the external and internal URI are different. -->
<!-- <jndiEntry jndiName="ibm.appcenter.proxy.protocol" value='"http"'/> -->
<!-- The hostname of the application resources URI. -->
<!-- <jndiEntry jndiName="ibm.appcenter.proxy.host" value='"proxyhost"'/> -->
<!-- The port of the application resources URI. This property is optional. -->
<!-- <jndiEntry jndiName="ibm.appcenter.proxy.port" value="proxyport"/> -->

<!-- Declare the jar files for DB2 access through JDBC. -->
<library id="DB2Lib">
    <fileset dir="$shared.resource.dir/db2" includes="*.jar"/>
</library>

<!-- Declare the IBM Application Center database. -->
<dataSource jndiName="jdbc/AppCenterDS" transactional="false">
    <jdbcDriver libraryRef="DB2Lib"/>
    <properties.db2.jcc databaseName="APPCNTR" serverName="localhost" portNumber="50000" user="db2admin" password="db2admin"/>
</dataSource>

<!-- End of configuration added by IBM Worklight installer. -->

上下文根“/wladmin”的 Ant 任务] 此配置是创建 SSL 配置所需的最低配置。 使用此配置,Liberty 服务器创建密钥库和证书, 如果它尚不存在,则在 SSL 初始化期间。 创建的证书是自签名证书,有效期为 365 天。 不要使用 Liberty 服务器为生产用途创建的证书。 有关更多信息,请参阅 http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/topic/com.ibm.websphere.wlp.core.doc/ae/twlp_sec_ssl.html -->

<administrator-role>
    <!--    Worklight JMX User.
    [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin'] 
    -->
    <user>WorklightRESTUser</user>

</administrator-role>
<!--    Worklight JNDI property for JMX connection.
    [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin'] 
-->
<jndiEntry jndiName="ibm.worklight.admin.jmx.host" value="localhost"/>
<!--    Worklight JNDI property for JMX connection.
    [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin'] 
-->
<jndiEntry jndiName="ibm.worklight.admin.jmx.port" value="9443"/>
<!--    Worklight JNDI property for JMX connection.
    [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin'] 
-->
<jndiEntry jndiName="ibm.worklight.admin.jmx.user" value="WorklightRESTUser"/>
<!--    Worklight JNDI property for JMX connection.
    [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin'] 
-->
<jndiEntry jndiName="ibm.worklight.admin.jmx.pwd" value="WGFtAaW8fTma"/>
<!--    Worklight JNDI property for JMX connection.
    [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin'] 
-->
<jndiEntry jndiName="ibm.worklight.topology.platform" value="Liberty"/>
<!--    Worklight JNDI property for JMX connection.
    [Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin'] 
-->
<jndiEntry jndiName="ibm.worklight.topology.clustermode" value="Standalone"/>

<!-- Begin of configuration added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->

<!-- Declare the Worklight Administration Service application. -->
<application id="wladmin" name="wladmin" location="worklightadmin.war" type="war">
    <application-bnd>
        <security-role name="worklightadmin">
            <user name="demo"/>

        </security-role>

        <security-role name="worklightdeployer">
        </security-role>

        <security-role name="worklightmonitor">
        </security-role>

        <security-role name="worklightoperator">
        </security-role>

    </application-bnd>

    <classloader delegation="parentLast">
        <commonLibrary>

            <fileset dir="$wlp.install.dir/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.1.jar"/>
        </commonLibrary>
    </classloader>
</application>

<!-- Declare web container custom properties for the Worklight Administration Service application. -->
<webContainer invokeFlushAfterService="false" deferServletLoad="false"/>

<!-- Declare the JNDI properties for the Worklight Administration Service. -->
<jndiEntry jndiName="wladmin/ibm.worklight.admin.environmentid" value='"Hello_Worklight_Server"'/>


<!-- Declare the jar files for DB2 access through JDBC. -->
<library id="wladmin/DB2Lib">
    <fileset dir="$shared.resource.dir/wladmin/db2" includes="db2jcc4.jar,db2jcc_license_cu.jar"/>
</library>

<!-- Declare the IBM Worklight Administration database. -->
<dataSource jndiName="wladmin/jdbc/WorklightAdminDS" transactional="false">
    <jdbcDriver libraryRef="wladmin/DB2Lib"/>
    <properties.db2.jcc databaseName="WRKLGHT" serverName="localhost" portNumber="50000" user="db2admin" password="db2admin" currentSchema="WLADMIN"/>
</dataSource>

<!-- Declare the Worklight Administration Console application. -->
<application id="worklightconsole" name="worklightconsole" location="worklightconsole.war" type="war">
    <application-bnd>
        <security-role name="worklightadmin">
            <user name="demo"/>

        </security-role>

        <security-role name="worklightdeployer">
        </security-role>

        <security-role name="worklightmonitor">
        </security-role>

        <security-role name="worklightoperator">
        </security-role>

    </application-bnd>

</application>

<!-- Declare web container custom properties for the Worklight Administration Console application. -->
<webContainer invokeFlushAfterService="false" deferServletLoad="false"/>

<!-- Declare the JNDI properties for the Worklight Administration Console. -->
<jndiEntry jndiName="worklightconsole/ibm.worklight.admin.endpoint" value='"*://*:*/wladmin"'/>


<!-- End of configuration added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->


<!-- Begin of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->

<!-- Declare the IBM Worklight project runtime application. -->
<application id="worklight" name="worklight" location="HelloWorklight.war" type="war">
    <classloader delegation="parentLast">
        <privateLibrary>
            <fileset dir="$shared.resource.dir/worklight/lib" includes="worklight-jee-library.jar"/>
        </privateLibrary>
    </classloader>
</application>

<!-- Declare the JNDI properties for the IBM Worklight project runtime. -->
<jndiEntry jndiName="worklight/publicWorkLightProtocol" value='"http"'/>
<jndiEntry jndiName="worklight/publicWorkLightPort" value='"9080"'/>
<jndiEntry jndiName="worklight/ibm.worklight.admin.environmentid" value='"Hello_Worklight_Server"'/>


<!-- Declare the jar files for DB2 access through JDBC. -->
<library id="worklight/DB2Lib">
    <fileset dir="$shared.resource.dir/worklight/db2" includes="db2jcc4.jar,db2jcc_license_cu.jar"/>
</library>

<!-- Declare the IBM Worklight Server database. -->
<dataSource jndiName="worklight/jdbc/WorklightDS" transactional="false">
    <jdbcDriver libraryRef="worklight/DB2Lib"/>
    <properties.db2.jcc databaseName="WRKLGHT" serverName="localhost" portNumber="50000" user="db2admin" password="db2admin" currentSchema="WRKLGHT"/>
</dataSource>

<!-- Declare the IBM Worklight Server reports database. -->
<dataSource jndiName="worklight/jdbc/WorklightReportsDS" transactional="false">
    <jdbcDriver libraryRef="worklight/DB2Lib"/>
    <properties.db2.jcc databaseName="WRKLGHT" serverName="localhost" portNumber="50000" user="db2admin" password="db2admin" currentSchema="WLREPORT"/>
</dataSource>

<!-- For analytics -->
<application context-root="/analytics"
     id="analytics"
     location="analytics.war"
     name="analytics"
     type="war">
</application>

<!-- End of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->

【问题讨论】:

【参考方案1】:

Worklight 仍然需要 Liberty 中的 restConnector-1.0 功能,因此您不应将其注释掉。当存在 restConnector 功能时,6.2 中提供的分析无法运行。你有两个选择:

选项 1 - 下载最新的 iFix。最新的 iFix 带有一个可以使用 restConnector 功能运行的分析版本。您必须将“parentLast”类加载器声明添加到 server.xml 中的分析条目。示例:

< application context-root="/analytics" id="analytics"location="analytics.war" name="analytics" type="war">
       < classloader delegation="parentLast"/>
     </ application>

选项 2 - 在单独的 Liberty 服务器上安装分析(推荐用于生产服务器的方法)

上述文档将在下一个补丁包中更新。

附带说明,您确定“无运行时”错误与分析有关,而不仅仅是巧合吗?当您删除分析并反转您为安装所做的步骤时,该错误是否仍然出现?

【讨论】:

感谢您的回答。一旦我取消注释掉 server.xml 中的 restConnector-1.0 功能,worklight 控制台就会工作。但是,现在我得到了未找到用于分析的上下文根。我计划尝试选项 1,并将发布更新。 我使用 Installation Manager(更新)应用了 6.2.0.0-WL-Server-IF201407191643。 Worklight 控制台很好,但是当我尝试在浏览器上打开分析时,找不到 Context Root。然后,我在 server.xml 中添加了“parentLast”类加载器,Worklight Console 和 Analytics 均已损坏(此网页不可用)。如果我删除了“parentLast”类加载器,Worklight 控制台很好,但 Analytics 再次显示找不到上下文根 应用> 刚刚注意到“ 已注释掉 restConnector-1.0 现在回到分析控制台工作但 Worklight 控制台上没有运行时的原始问题。我是否应用了错误的 ifix?

以上是关于安装分析后,我的 Worklight 6.2 控制台上没有运行时的主要内容,如果未能解决你的问题,请参考以下文章

IBM Worklight 6.2。分析拓扑。主节点和数据节点

手动安装 Worklight 服务器并声明 Worklight 运行时 (WL 6.2)

IBM Worklight 6.2 WAS ND 8.5.5 中没有运行时控制台

eclipse worklight studio 6.2:以工作灯控制台中的错误开始 IPAS 不存在

Worklight 6.2 使用 OpenDS 对 LDAP 进行身份验证

IBM Worklight 6.2 无法设置状态。响应已提交