Kie server router always response 404

167 views
Skip to first unread message

Александр Емельянов

unread,
Aug 20, 2018, 8:39:06 AM8/20/18
to Drools Setup
HI!

I have jbpm 7.7.0 instalation. In kie execution server configuration I add property:

-Dorg.kie.server.router=http://<local ip>:9000

Kie server router has next configuration:
-Dfile.encoding=UTF-8 -XX:+UseG1GC \
-Dorg.kie.server.router.host=0.0.0.0 \
-Dorg.kie.server.router.port=9000 \
-Dorg.kie.server.router.url.external=http://localhost:9000/ \
-Dorg.kie.server.controller=http://localhost:8082/kie-wb/rest/controller \
-Dorg.kie.server.controller.user=... \
-Dorg.kie.server.controller.pwd=... \

In kie workbench UI appeared KIE Server Router configuration with one remote server and I can deploy container there, but kie-wb can not do anything with router.

Kie router always answer 404 for any request, i.e.

wget --quiet \
  --method GET \
  --header 'Accept: application/json' \
  --header 'Authorization: Basic ...' \
  --header 'Cache-Control: no-cache' \
  --output-document \

what I do wrong?

Maciej Swiderski

unread,
Aug 20, 2018, 2:13:51 PM8/20/18
to drools...@googlegroups.com
Could you provide exact commands you use for starting:
- router
- workbench
- kie server

Have a look at this article as it might become helpful http://mswiderski.blogspot.com/2017/01/kie-server-router-integrated-with.html

Maciej

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/326a3f8f-5e04-4728-97a4-3ccfffa96d6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alexandr Emelyanov

unread,
Aug 21, 2018, 1:33:31 AM8/21/18
to Drools Setup
I run all in docker (all ports are mapped one to one)

Router:
ROUTER_HOME=/opt/kie-router
ROUTER_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+UseG1GC \
-Dorg.kie.server.router.host=0.0.0.0 \
-Dorg.kie.server.router.port=9000 \
-Dorg.kie.server.router.repo=$ROUTER_HOME/repo \
-Dorg.kie.server.router.url.external=$ROUTER_ADDR \
-Dorg.kie.server.controller=$WB_ADDR/rest/controller \
-Dorg.kie.server.controller.user=user \
-Dorg.kie.server.controller.pwd=pass \
"

java -jar $ROUTER_ARGUMENTS $ROUTER_HOME/kie-server-router.jar

Workbench and kie-server are sarted under tomcat 8.5.20
Tomcat users file have record
    <user username="user" password="pass" roles="usedo,analyst,admin,kie-server"/>

Workbench:
kie-wb-7.7.0.Final-tomcat8.war
copy to libs:
kie-tomcat-integration-7.7.0.Final.jar
additional jars

setenv.sh:
CATALINA_OPTS="-Xmx1024M -Dfile.encoding=UTF-8 -XX:+UseG1GC \
-Djava.security.auth.login.config=$CATALINA_HOME/webapps/kie-wb/WEB-INF/classes/login.config \
-Dorg.kie.demo=false -Dorg.uberfire.nio.git.dir=/opt/kiegit -Dorg.uberfire.metadata.index.dir=/opt/kiegit -Dorg.guvnor.m2repo.dir=/root/.m2 \
-Dorg.jboss.logging.provider=jdk \
-Dorg.kie.server.user=user \
-Dorg.kie.server.pwd=pass \
"

Kie-server:
kie-server-7.7.0.Final-webc.war
copy to libs:
kie-tomcat-integration-7.7.0.Final.jar
additional jars

environment:
WB_ADDR=http://172.18.7.27:8082/kie-wb

setenv.sh:
CATALINA_OPTS="-Xmx4096M -Dfile.encoding=UTF-8 -XX:+UseG1GC \
-Dorg.jboss.logging.provider=jdk \
-Djbpm.jms.connection-factory=jms/ConnectionFactory \
-Djbpm.jms.queues.request=JBPM.REQUEST \
-Djbpm.nsi.ds=NsiDS \
-Djbpm.tsr.jndi.lookup=java:comp/env/TransactionSynchronizationRegistry \
-Djbpm.tm.jndi.lookup=java:comp/env/TransactionManager \
-Dhibernate.connection.release_mode=after_transaction \
-Dhibernate.hbm2ddl.auto=validate \
-Dorg.kie.server.id=kieserver1 \
-Dorg.kie.server.location=$ES_ADDR/services/rest/server \
-Dorg.kie.server.persistence.ds=java:comp/env/jdbc/jbpm \
-Dorg.kie.server.persistence.dialect=ru.pochta.usedo.mir.jbpm.pg.JbpmPgDialect \
-Dorg.drools.server.filter.classes=true \
-Dcom.arjuna.ats.jta.recovery.XAResourceRecovery1=com.arjuna.ats.internal.jdbc.recovery.BasicXARecovery\;abs://$CATALINA_HOME/conf/xa-recovery-properties.xml\ \;1 \
-Dorg.kie.server.controller=$WB_ADDR/rest/controller \
-Dorg.kie.server.controller.user=user \
-Dorg.kie.server.controller.pwd=pass \
-Dorg.kie.server.repo=/opt/tomcat8/kie-state-repo \
-Djbpm.wb-public-address=$WB_ADDR/ \
-Dorg.jbpm.var.log.length=1024 \
-Dkie.maven.settings.custom=/root/.m2/settings.xml \
-Dorg.quartz.properties=/opt/tomcat8/conf/quartz.properties \
-Dorg.kie.server.router=$ROUTER_ADDR \
"

понедельник, 20 августа 2018 г., 23:13:51 UTC+5 пользователь Maciej Swiderski написал:

Alexandr Emelyanov

unread,
Aug 21, 2018, 1:43:35 AM8/21/18
to Drools Setup
Maciej, can I found relevant documentation for kie router anywhere?


понедельник, 20 августа 2018 г., 23:13:51 UTC+5 пользователь Maciej Swiderski написал:
Could you provide exact commands you use for starting:

Alexandr Emelyanov

unread,
Aug 21, 2018, 1:44:27 AM8/21/18
to Drools Setup
Does it have any rest documentation? i.e. swagger?


понедельник, 20 августа 2018 г., 23:13:51 UTC+5 пользователь Maciej Swiderski написал:
Could you provide exact commands you use for starting:

Maciej Swiderski

unread,
Aug 23, 2018, 2:46:48 AM8/23/18
to drools...@googlegroups.com
Router itself has very tiny rest (like) api that consists fo three endpoints:
- /mgmt/list - list all configuration it has in terms for kie servers and their containers
- /mgmt/add - adds new kie server/container info
- /mgmt/remove - remove kieserver/container info

Other than that it mirrors KIE Server’s REST api - main difference it does not allow to use KIE Server management api - meaning create/dispose KIE containers. Other than that it should expose (forward) all other endpoints. There is no swagger docs for router itself as the same endpoints will be in KIE Server swagger docs.

Maciej


Alexandr Emelyanov

unread,
Aug 23, 2018, 7:59:48 AM8/23/18
to Drools Setup
Yes, /mgmt/list woks. But workbench have 404 errors in log:

23-Aug-2018 11:57:35.172 WARNING [Thread-36] org.kie.server.controller.impl.KieServerInstanceManager.getContainers Unable to get list of containers from remote server at url http://172.18.7.27:9000 due to Unexpected HTTP response code when requesting URI 'http://172.18.7.27:9000/containers'! Error code: 404, message: 


четверг, 23 августа 2018 г., 11:46:48 UTC+5 пользователь Maciej Swiderski написал:

Maciej Swiderski

unread,
Aug 23, 2018, 8:03:04 AM8/23/18
to drools...@googlegroups.com
Maybe this is authentication issue - router might then simply return page not found - workbench uses kieserver/kieserver1! As default credentials so double check if you have these setup on kie servers behind router.

Maciej

Alexandr Emelyanov

unread,
Aug 24, 2018, 1:42:34 AM8/24/18
to Drools Setup
I check password configuration. All is OK. Also I try to use default credentials - there no effect, error occurs again

четверг, 23 августа 2018 г., 17:03:04 UTC+5 пользователь Maciej Swiderski написал:

Maciej Swiderski

unread,
Aug 24, 2018, 3:08:31 AM8/24/18
to drools...@googlegroups.com
Turn on debug logs for org.kie.server package on workbench server, that might give us some more information what’s happening.

Maciej

Reply all
Reply to author
Forward
0 new messages