Welcome to Knowage Q&A, where you can ask questions and receive answers from other members of the community.
0 votes
1 view
I am trying to create a cockpit and this is my error. Is anyone is aware of this error?

{"service":"","errors":[{"message":"RESTEASY003210: Could not find resource for full path: http://34.193.191.224:8080/knowage/restful-services/undefined&SBI_ENVIRONMENT=WORKSPACE&IS_TECHNICAL_USER=false&DATASET_LABEL="}]}

Thanks in advance !
Environment Knowage 6.1
in Admin and Developer Functionalities by (150 points)
Please, write as much detail as possible. How did you installed Knowage? If it is a custom installation, which is your application server? Give more info.

I think I have the same problem.

I started knowage 6.1.1 and knowagedb from a docker-compose.yml file that's slightly modified from the one available on github. I modified it so the knowage app server would have access to the postgres database I'm testing with, also in a container. Here's the compose file

version: '2'

networks:
  default:
    external:
      name: app_under_test

services:
  knowage:
      image: knowagelabs/knowage-server-docker:6.1.1
      links:
          - knowagedb:db
      ports:
          - "8080:8080"
      environment:
          - WAIT_MYSQL=true
          # Need these manually set to be compatible docker-compose v1
          - DB_PORT_3306_TCP_ADDR=knowagedb
          - DB_PORT_3306_TCP_PORT=3306
          - DB_ENV_MYSQL_USER=knowageuser
          - DB_ENV_MYSQL_DATABASE=knowagedb
          - DB_ENV_MYSQL_PASSWORD=knowagepassword
      container_name: knowage

  knowagedb:
      image: mysql:5.5
      environment:
          - MYSQL_USER=knowageuser
          - MYSQL_PASSWORD=knowagepassword
          - MYSQL_DATABASE=knowagedb
          - MYSQL_ROOT_PASSWORD=knowagerootpassword
      container_name: knowagedb

I can login to the knowage web UI at http://localhost:8080/knowage/. Most pages are fine. Trying to create a 'New Cockpit' tries to download angular resources from the ip address of the container, not from the docker-exposed port on localhost.

Start on the Document Browser page. Hit the plus sign to add a new document. Pick a Cockpit type from the dropdown. Firefox's console mentions this

XML Parsing Error: not well-formed
Location: http://localhost:8080/knowagecockpitengine/js/src/messages/messages.properties
Line Number 1, Column 1:

while the browser is waiting trying to download from http://172.22.0.4:8080, which is the ip address of the knowage docker container.

Here's one example of a resource the browser is trying to download (via firefox's network panel)

http://172.22.0.4:8080/knowage/js/lib/angular/angular-json-tree/json-tree.js

Is there a configuration in knowage somewhere to set the front part of the url that it should use, instead of detecting the ip address of the host it's running on?

Browser is

1 Answer

+1 vote
 
Best answer

Found a solution here

https://www.knowage-suite.com/qa/1788/adding-a-cockpit-blank-page-appear

In that post, the answer is to change TOMCAT_HOME/conf/server.xml and modify the host_url setting.

In the docker container version, TOMCAT_HOME/bin/entrypoint.sh sets this value every container start. It defaults the value to the ip address of the container, but that setting can be overridden by setting the environment varaible PUBLIC_ADDRESS to be 'localhost' in my case.

Here's the environment-variable section from above for the knowage container, with the new change

environment:
    - WAIT_MYSQL=true
    # Need these manually set to be compatible docker-compose v1
    - DB_PORT_3306_TCP_ADDR=knowagedb
    - DB_PORT_3306_TCP_PORT=3306
    - DB_ENV_MYSQL_USER=knowageuser
    - DB_ENV_MYSQL_DATABASE=knowagedb
    - DB_ENV_MYSQL_PASSWORD=knowagepassword
    - PUBLIC_ADDRESS=localhost
container_name: knowage

Now on my mac, knowage loads the cockpit from localhost:8080 instead of 172.22.0.4.

by (620 points)
selected by
Thanks for your answer!
...