Router configuration not working

170 views
Skip to first unread message

Vaibhav R

unread,
Oct 24, 2018, 1:05:44 AM10/24/18
to jbpm-...@googlegroups.com, drools...@googlegroups.com, Maciej Swiderski
Hi,

I am trying to configure router with kie-server and workbench, but its not working. I followed below steps:

Environment:

Node-1, EAP 7.1+  workbench (kie-server.war is not deployed on this node)
Node-2  EAP 7.1 + kie-server.war (kie-server running in unmanaged mode.)
Node-2  Router started through rhpam-7.1-smart-router.jar file.

Steps: 
1. First router started with below command:
~~~
java -jar rhpam-7.1-smart-router.jar
~~~
2. Started workbench with below command:
~~~
$JBOSS_HOME/bin/standalone.sh
~~~

3. Started kie-server.war with router property:
~~~
$JBOSS_HOMe/bin/standalone.sh -Dorg.kie.server.id=default-server -Dorg.kie.server.location=http://10.10.10.10:8080/kie-server/services/rest/server -Dorg.kie.server.router=http://10.10.10.10:9000
~~~

4. Restarted router with workbench location:
~~~
java -Dorg.kie.server.router.host=10.10.10.10 -Dorg.kie.server.router.port=9000 -Dorg.kie.server.controller=http://20.20.20.20:8080/business-central/rest/controller -Dorg.kie.server.controller.user=User1 -Dorg.kie.server.controller.pwd=admin12@ -Dorg.kie.server.router.config.watcher.enabled=true -jar rhpam-7.1-smart-router.jar
~~~

When I login into workbench, and try to create container on kie-server.war running on node-2, its not working. In the console I can see below error:

~~~
 WARN  [org.kie.server.controller.impl.KieServerInstanceManager] (Thread-195) Unable to get list of containers from remote server at url http://10.10.10.10:9000 due to Unexpected HTTP response code when requesting URI 'http://10.10.10.10:9000/containers'! Error code: 404, message: 
 ERROR [stderr] (Thread-195) Exception in thread "Thread-195" org.kie.server.api.exception.KieServicesHttpException: Unexpected HTTP response code when requesting URI 'http://10.10.10.10:9000/containers'! Error code: 404, message: 
 ERROR [stderr] (Thread-195) at org.kie.server.client.impl.AbstractKieServicesClientImpl.createExceptionForUnexpectedResponseCode(AbstractKieServicesClientImpl.java:617)
 ERROR [stderr] (Thread-195) at org.kie.server.client.impl.AbstractKieServicesClientImpl.makeHttpGetRequestAndCreateServiceResponse(AbstractKieServicesClientImpl.java:191)
 ERROR [stderr] (Thread-195) at org.kie.server.client.impl.KieServicesClientImpl.listContainers(KieServicesClientImpl.java:175)
 ERROR [stderr] (Thread-195) at org.kie.server.client.impl.KieServicesClientImpl.listContainers(KieServicesClientImpl.java:167)
 ERROR [stderr] (Thread-195) at org.kie.server.controller.impl.KieServerInstanceManager.getContainers(KieServerInstanceManager.java:389)
 ERROR [stderr] (Thread-195) at org.kie.workbench.common.screens.server.management.backend.runtime.AsyncKieServerInstanceManager.access$701(AsyncKieServerInstanceManager.java:53)
 ERROR [stderr] (Thread-195) at org.kie.workbench.common.screens.server.management.backend.runtime.AsyncKieServerInstanceManager$7.run(AsyncKieServerInstanceManager.java:206)
 ERROR [stderr] (Thread-195) at org.uberfire.backend.server.cdi.workspace.WorkspaceExecutorService.lambda$generateRunnable$0(WorkspaceExecutorService.java:134)
 ERROR [stderr] (Thread-195) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 ERROR [stderr] (Thread-195) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 ERROR [stderr] (Thread-195) at java.lang.Thread.run(Thread.java:745)

~~~

Why there is no documentation on router configuration ? Or I missed it. 

Maciej Swiderski

unread,
Oct 24, 2018, 2:44:15 AM10/24/18
to Vaibhav R, jBPM Usage, drools...@googlegroups.com
I’d encourage to go over these two articles:

Where you will find following:
"Router cannot be used to deploy new containers - this is due to it will not know given container id yet and thus won’t be able to decide in which server it should be deployed"
Maciej

Vaibhav R

unread,
Nov 1, 2018, 10:19:49 AM11/1/18
to Maciej Swiderski, jbpm-...@googlegroups.com, drools...@googlegroups.com
Hi Maciej,

Sorry for the late reply.

As suggested by you I have created kie-containers first and then started smart router, I am able to see both kie-containers in workbench console. But in 'Process Definitions' tab I can process from only one kie-container. Also when I try to start process instance through kie-workbench it fails with exception:

Exception in kie-server node:
~~~~
 ERROR [org.kie.server.remote.rest.jbpm.QueryDataResource] (default task-10) Unexpected error during processing: Query jbpmHumanTasksWithUser not found: org.jbpm.services.api.query.QueryNotFoundException: Query jbpmHumanTasksWithUser not found
~~~~
Complete stack trace(kieServerException) attached to mail

At router end below exception logged:
~~~
~~~
Complete stack trace attached(Router exception).

Am I missing any configuration ? 

FYI, I am using RHPAM 7.1 release.



--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-usage/F594D40D-8CE5-4683-98C8-E3ADAA0D451B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
KieServerException
RouterException

Maciej Swiderski

unread,
Nov 5, 2018, 3:25:53 AM11/5/18
to Vaibhav R, jBPM Usage, drools...@googlegroups.com
This error means your kie servers did not get queries registered from workbench. So depending on your setup there are two options:
- make kie servers managed - meaning point kie servers to workbench so they register in the controller and then will get queries registered by default
- extract query definitions from workbench and place them in kie server.war/WEB-INF/classes in a file named default-query-definitions.json https://github.com/kiegroup/jbpm-wb/blob/master/jbpm-wb-kie-server/jbpm-wb-kie-server-backend/src/main/resources/default-query-definitions.json

Maciej

<KieServerException><RouterException>

Reply all
Reply to author
Forward
0 new messages