Knowage-Server-Docker icon indicating copy to clipboard operation
Knowage-Server-Docker copied to clipboard

Knowage Dataset Python Error 401 (Linux VM)

Open HugoT852 opened this issue 4 years ago • 1 comments

Hi,

I am currently using the Knowage Docker Server on a linux VM and I would like to create a Python dataset but I am struggling to make it work.

Following the documentation, I modify the python variable of category PYTHON_CONFIGURATION: python.default.environment.url, http://knowagepython:5000

The REST methode work (code 200). I can see the Python libraries. I have authorize Edit Python/R Scripts in configuration.

When trying to preview the python dataset I get the following : The response status is not ok: status=401, response=Unauthorized [2021-12-09 09:30:53 +0000] [18] [DEBUG] GET /dataset/libraries 172.24.0.7 - - [09/Dec/2021:09:30:53 +0000] "GET /dataset/libraries HTTP/1.1" 200 1339 "-" "Jakarta Commons-HttpClient/3.0.1"

Here is my docker-compose file :

version: "3.1" services: knowage: image: knowagelabs/knowage-server-docker:8.0.4 depends_on: - knowagedb - knowagecache - hazelcast ports: - "8080:8080" networks: - main environment: - DB_HOST=$DB_HOST - DB_PORT=$DB_PORT - DB_DB=$DB_DB - DB_USER=$DB_USER - DB_PASS=$DB_PASS

  - CACHE_DB_HOST=$CACHE_DB_HOST
  - CACHE_DB_PORT=$CACHE_DB_PORT
  - CACHE_DB_DB=$CACHE_DB_DB
  - CACHE_DB_USER=$CACHE_DB_USER
  - CACHE_DB_PASS=$CACHE_DB_PASS

  - HMAC_KEY=$HMAC_KEY
  - PASSWORD_ENCRYPTION_SECRET=$PASSWORD_ENCRYPTION_SECRET
  - PUBLIC_ADDRESS=knowage

  - HAZELCAST_HOSTS=hazelcast
  - HAZELCAST_PORT=5701
volumes:
  - ./resources:/home/knowage/apache-tomcat/resources

hazelcast: image: hazelcast/hazelcast:3.6.5 networks: - main environment: - JAVA_OPTS=-Dhazelcast.local.publicAddress=hazelcast -Dhazelcast.config=/opt/hazelcast/hazelcast.xml volumes: - ./hazelcast-server.xml:/opt/hazelcast/hazelcast.xml

knowagepython: image: knowagelabs/knowage-python-docker:8.0.4 environment: - HMAC_KEY=$HMAC_KEY - KNOWAGE_PUBLIC_ADDRESS=knowage - PUBLIC_ADDRESS=knowagepython networks: - main ports: - "5000:5000"

knowager: image: knowagelabs/knowage-r-docker:8.0.4 environment: - HMAC_KEY=$HMAC_KEY networks: - main

knowagedb: image: mariadb:10.3 environment: - MYSQL_USER=$DB_USER - MYSQL_PASSWORD=$DB_PASS - MYSQL_DATABASE=$DB_DB - MYSQL_RANDOM_ROOT_PASSWORD=yes networks: - main volumes: - "db:/var/lib/mysql"

knowagecache: image: mariadb:10.3 environment: - MYSQL_USER=$CACHE_DB_USER - MYSQL_PASSWORD=$CACHE_DB_PASS - MYSQL_DATABASE=$CACHE_DB_DB - MYSQL_RANDOM_ROOT_PASSWORD=yes networks: - main volumes: - "cache:/var/lib/mysql"

volumes: db: cache:

networks: main:

HugoT852 avatar Dec 09 '21 10:12 HugoT852

add @agaldemas

HugoT852 avatar Dec 09 '21 10:12 HugoT852