Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-4424

Repeated WARN message "Marking endpoint 'http://localhost:8080/kie-server/services/rest/server' as failed due to Connection refused (Connection refused)" after the kie server was configured to use different port then 8080

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Minor
    • None
    • 7.12.0.GA, 7.12.1.GA
    • Kie-Server
    • None
      • Red Hat Process Automation Manager (RHPAM) 7.12.0, 7.12.1
    • False
    • None
    • False
    • Workaround Exists
    • Hide

      The WARN messages will disappear if the following section is removed from the template file and change is pushed back to the system.git:

       

      ***************************************

      <org.kie.server.controller.api.model.runtime.ServerInstanceKey>
            <serverInstanceId>myDefault-kieserver@localhost:8080</serverInstanceId>
            <serverName>myDefault-kieserver@localhost:8080</serverName>
            <serverTemplateId>myDefault-kieserver</serverTemplateId>
            <url>http://localhost:8080/kie-server/services/rest/server</url>
            <online>false</online>
          </org.kie.server.controller.api.model.runtime.ServerInstanceKey>

      ***************************************

      Show
      The WARN messages will disappear if the following section is removed from the template file and change is pushed back to the system.git:   *************************************** <org.kie.server.controller.api.model.runtime.ServerInstanceKey>       <serverInstanceId>myDefault-kieserver@localhost:8080</serverInstanceId>       <serverName>myDefault-kieserver@localhost:8080</serverName>       <serverTemplateId>myDefault-kieserver</serverTemplateId>       <url> http://localhost:8080/kie-server/services/rest/server </url>       <online>false</online>     </org.kie.server.controller.api.model.runtime.ServerInstanceKey> ***************************************
    • Hide

      1. To reproduce the error configure kie server to use 8080 port and then start it. This will cause the file similar to the following to be created in the .niogit folder as kie-server's template:

      ***************************************
      <org.kie.server.controller.api.model.spec.ServerTemplate>
        <id>myDefault-kieserver</id>
        <name>myDefault-kieserver</name>
        <containersSpec class="list">
          <org.kie.server.controller.api.model.spec.ContainerSpec>
            <id>com.myspace:timerProject:1.0.0-SNAPSHOT</id>
            <containerName></containerName>
            <serverTemplateKey>
              <id>myDefault-kieserver</id>
              <name>myDefault-kieserver</name>
            </serverTemplateKey>
            ...
        <configs class="enum-map" enum-type="org.kie.server.controller.api.model.spec.Capability"/>
        <serverInstances class="list">
          <org.kie.server.controller.api.model.runtime.ServerInstanceKey>
            <serverInstanceId>myDefault-kieserver@localhost:8080</serverInstanceId>
            <serverName>myDefault-kieserver@localhost:8080</serverName>
            <serverTemplateId>myDefault-kieserver</serverTemplateId>
            <url>http://localhost:8080/kie-server/services/rest/server</url>
            <online>true</online>
          </org.kie.server.controller.api.model.runtime.ServerInstanceKey>
        </serverInstances>
        ...
      </org.kie.server.controller.api.model.spec.ServerTemplate>
      ****************************************

      2. Stop the server, change the port offset and the appropriate port in the kie server location and start the server again. This time, the content of the template file will be:

      ***************************************
      <org.kie.server.controller.api.model.spec.ServerTemplate>
        <id>myDefault-kieserver</id>
        <name>myDefault-kieserver</name>
        <containersSpec class="list">
          <org.kie.server.controller.api.model.spec.ContainerSpec>
            <id>com.myspace:timerProject:1.0.0-SNAPSHOT</id>
            <containerName></containerName>
            <serverTemplateKey>
              <id>myDefault-kieserver</id>
              <name>myDefault-kieserver</name>
            </serverTemplateKey>
            ...
        <configs class="enum-map" enum-type="org.kie.server.controller.api.model.spec.Capability"/>
        <serverInstances class="list">
          <org.kie.server.controller.api.model.runtime.ServerInstanceKey>
            <serverInstanceId>myDefault-kieserver@localhost:8080</serverInstanceId>
            <serverName>myDefault-kieserver@localhost:8080</serverName>
            <serverTemplateId>myDefault-kieserver</serverTemplateId>
            <url>http://localhost:8080/kie-server/services/rest/server</url>
            <online>false</online>
          </org.kie.server.controller.api.model.runtime.ServerInstanceKey>
         <org.kie.server.controller.api.model.runtime.ServerInstanceKey>
            <serverInstanceId>myDefault-kieserver@localhost:8180</serverInstanceId>
            <serverName>myDefault-kieserver@localhost:8180</serverName>
            <serverTemplateId>myDefault-kieserver</serverTemplateId>
            <url>http://localhost:8180/kie-server/services/rest/server</url>
            <online>true</online>
          </org.kie.server.controller.api.model.runtime.ServerInstanceKey>
        </serverInstances>
        ...
      </org.kie.server.controller.api.model.spec.ServerTemplate>
      ****************************************

      and the server.log will show something like:
      ****************************************
      2022-06-28 12:52:09,764 INFO  [org.jboss.as.server] (ServerService Thread Pool – 45) WFLYSRV0010: Deployed "business-central.war" (runtime-name : "business-central.war")
      2022-06-28 12:52:09,766 INFO  [org.jboss.as.server] (ServerService Thread Pool – 45) WFLYSRV0010: Deployed "kie-server.war" (runtime-name : "kie-server.war")
      2022-06-28 12:52:09,899 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
      2022-06-28 12:52:09,937 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: JBoss EAP 7.4.0.GA (WildFly Core 15.0.2.Final-redhat-00001) started in 60774ms - Started 1141 of 1326 services (386 services are lazy, passive or on-demand)
      2022-06-28 12:52:09,948 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:10090/management
      2022-06-28 12:52:09,948 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:10090
      2022-06-28 12:52:10,519 WARN  [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (KieServer-ControllerConnect) Exception encountered while syncing with controller at http://localhost:8180/business-central/rest/controller/server/default-kieserver error Read timed out
      2022-06-28 12:52:11,352 INFO  [org.kie.server.controller.impl.KieServerControllerImpl] (default task-3) Server http://localhost:8180/kie-server/services/rest/server connected to controller
      ...
      2022-06-28 12:52:13,683 WARN  [org.kie.server.client.impl.AbstractKieServicesClientImpl] (Thread-119) Marking endpoint 'http://localhost:8080/kie-server/services/rest/server' as failed due to Connection refused (Connection refused)
      2022-06-28 12:52:13,683 WARN  [org.kie.server.client.impl.AbstractKieServicesClientImpl] (Thread-119) Cannot invoke request - 'No available endpoints found'
      2022-06-28 12:52:18,768 WARN  [org.kie.server.client.impl.AbstractKieServicesClientImpl] (Thread-119) Marking endpoint 'http://localhost:8080/kie-server/services/rest/server' as failed due to Connection refused (Connection refused)
      2022-06-28 12:52:18,772 WARN  [org.kie.server.client.im

      Show
      1. To reproduce the error configure kie server to use 8080 port and then start it. This will cause the file similar to the following to be created in the .niogit folder as kie-server's template: *************************************** <org.kie.server.controller.api.model.spec.ServerTemplate>   <id>myDefault-kieserver</id>   <name>myDefault-kieserver</name>   <containersSpec class="list">     <org.kie.server.controller.api.model.spec.ContainerSpec>       <id>com.myspace:timerProject:1.0.0-SNAPSHOT</id>       <containerName></containerName>       <serverTemplateKey>         <id>myDefault-kieserver</id>         <name>myDefault-kieserver</name>       </serverTemplateKey>       ...   <configs class="enum-map" enum-type="org.kie.server.controller.api.model.spec.Capability"/>   <serverInstances class="list">     <org.kie.server.controller.api.model.runtime.ServerInstanceKey>       <serverInstanceId>myDefault-kieserver@localhost:8080</serverInstanceId>       <serverName>myDefault-kieserver@localhost:8080</serverName>       <serverTemplateId>myDefault-kieserver</serverTemplateId>       <url> http://localhost:8080/kie-server/services/rest/server </url>       <online>true</online>     </org.kie.server.controller.api.model.runtime.ServerInstanceKey>   </serverInstances>   ... </org.kie.server.controller.api.model.spec.ServerTemplate> **************************************** 2. Stop the server, change the port offset and the appropriate port in the kie server location and start the server again. This time, the content of the template file will be: *************************************** <org.kie.server.controller.api.model.spec.ServerTemplate>   <id>myDefault-kieserver</id>   <name>myDefault-kieserver</name>   <containersSpec class="list">     <org.kie.server.controller.api.model.spec.ContainerSpec>       <id>com.myspace:timerProject:1.0.0-SNAPSHOT</id>       <containerName></containerName>       <serverTemplateKey>         <id>myDefault-kieserver</id>         <name>myDefault-kieserver</name>       </serverTemplateKey>       ...   <configs class="enum-map" enum-type="org.kie.server.controller.api.model.spec.Capability"/>   <serverInstances class="list">     <org.kie.server.controller.api.model.runtime.ServerInstanceKey>       <serverInstanceId>myDefault-kieserver@localhost:8080</serverInstanceId>       <serverName>myDefault-kieserver@localhost:8080</serverName>       <serverTemplateId>myDefault-kieserver</serverTemplateId>       <url> http://localhost:8080/kie-server/services/rest/server </url>       <online>false</online>     </org.kie.server.controller.api.model.runtime.ServerInstanceKey>    <org.kie.server.controller.api.model.runtime.ServerInstanceKey>       <serverInstanceId>myDefault-kieserver@localhost:8180</serverInstanceId>       <serverName>myDefault-kieserver@localhost:8180</serverName>       <serverTemplateId>myDefault-kieserver</serverTemplateId>       <url> http://localhost:8180/kie-server/services/rest/server </url>       <online>true</online>     </org.kie.server.controller.api.model.runtime.ServerInstanceKey>   </serverInstances>   ... </org.kie.server.controller.api.model.spec.ServerTemplate> **************************************** and the server.log will show something like: **************************************** 2022-06-28 12:52:09,764 INFO   [org.jboss.as.server] (ServerService Thread Pool – 45) WFLYSRV0010: Deployed "business-central.war" (runtime-name : "business-central.war") 2022-06-28 12:52:09,766 INFO   [org.jboss.as.server] (ServerService Thread Pool – 45) WFLYSRV0010: Deployed "kie-server.war" (runtime-name : "kie-server.war") 2022-06-28 12:52:09,899 INFO   [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server 2022-06-28 12:52:09,937 INFO   [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: JBoss EAP 7.4.0.GA (WildFly Core 15.0.2.Final-redhat-00001) started in 60774ms - Started 1141 of 1326 services (386 services are lazy, passive or on-demand) 2022-06-28 12:52:09,948 INFO   [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:10090/management 2022-06-28 12:52:09,948 INFO   [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:10090 2022-06-28 12:52:10,519 WARN   [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (KieServer-ControllerConnect) Exception encountered while syncing with controller at http://localhost:8180/business-central/rest/controller/server/default-kieserver error Read timed out 2022-06-28 12:52:11,352 INFO   [org.kie.server.controller.impl.KieServerControllerImpl] (default task-3) Server http://localhost:8180/kie-server/services/rest/server connected to controller ... 2022-06-28 12:52:13,683 WARN   [org.kie.server.client.impl.AbstractKieServicesClientImpl] (Thread-119) Marking endpoint 'http://localhost:8080/kie-server/services/rest/server' as failed due to Connection refused (Connection refused) 2022-06-28 12:52:13,683 WARN   [org.kie.server.client.impl.AbstractKieServicesClientImpl] (Thread-119) Cannot invoke request - 'No available endpoints found' 2022-06-28 12:52:18,768 WARN   [org.kie.server.client.impl.AbstractKieServicesClientImpl] (Thread-119) Marking endpoint 'http://localhost:8080/kie-server/services/rest/server' as failed due to Connection refused (Connection refused) 2022-06-28 12:52:18,772 WARN  [org.kie.server.client.im
    • ---
    • ---

    Description

      The way how the kie-server template file (located in the .niogit/system/system.git) is created/updated is changed starting with RHPAM 7.12.0 and this cause WARN messages like the following to be logged in the server.log file:

      ************************************
      11:39:13,993 WARN  [org.kie.server.client.impl.AbstractKieServicesClientImpl] (Thread-145) Marking endpoint 'http://localhost:8080/kie-server/services/rest/server' as failed due to Connection refused (Connection refused)
      11:39:14,017 WARN  [org.kie.server.client.impl.AbstractKieServicesClientImpl] (Thread-145) Cannot invoke request - 'No available endpoints found'
      ************************************

      In previous versions of the product if the port of the kie server is changed, initially added kie server would be removed and a new one (with the changed port value) would be added in this template file.

       

      However, starting with RHPAM 7.12.0 we introduced <online> tag which can be "true" or "false" and the initial kie server will stay in the template file with the value <online> set to false and a new one would be added with the value <online> set to true. But, when the server with the updated port value is started, the above WARN messages will be repeatedly logged in the log file. The correct kie server will be properly connected to the business central but WARN messages are very misleading. 

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-bkramer1 Biljana Kramer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: