Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run newest docker image with docker-compose #241

Closed
Niklas345 opened this issue Jul 1, 2020 · 3 comments
Closed

Unable to run newest docker image with docker-compose #241

Niklas345 opened this issue Jul 1, 2020 · 3 comments

Comments

@Niklas345
Copy link

Niklas345 commented Jul 1, 2020

Dear FROST-Team,

We have encountered an issue with the fraunhoferiosb/frost-server:latest Docker Image. When trying to run frost-server with the following docker-compose, we are encountering a permission denied error.

version: '2'

services:
  web:
    image: fraunhoferiosb/frost-server:latest
    environment:
      - serviceRootUrl=http://localhost:8080/FROST-Server
      - http_cors_enable=true
      - http_cors_allowed.origins=*
      - persistence_db_driver=org.postgresql.Driver
      - persistence_db_url=jdbc:postgresql://database:5432/sensorthings
      - persistence_db_username=sensorthings
      - persistence_db_password=ChangeMe
      - persistence_autoUpdateDatabase=true
    ports:
      - 8080:8080
      - 1883:1883
    depends_on:
      - database

  database:
    image: postgis/postgis:11-2.5-alpine
    environment:
      - POSTGRES_DB=sensorthings
      - POSTGRES_USER=sensorthings
      - POSTGRES_PASSWORD=ChangeMe
    volumes:
      - postgis_volume:/var/lib/postgresql/data
volumes:
    postgis_volume:
01-Jul-2020 05:55:30.638 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.56
01-Jul-2020 05:55:30.663 SEVERE [Catalina-startStop-1] org.apache.catalina.startup.HostConfig.beforeStart Unable to create directory for deployment: [/usr/local/tomcat/conf/Catalina/localhost]
01-Jul-2020 05:55:30.736 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/usr/local/tomcat/webapps/FROST-Server.war]
01-Jul-2020 05:55:30.777 SEVERE [localhost-startStop-1] org.apache.catalina.startup.ContextConfig.beforeStart Exception fixing docBase for context [/FROST-Server]
        java.io.IOException: Unable to create the directory [/usr/local/tomcat/webapps/FROST-Server]
                at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:115)
                at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:616)
                at org.apache.catalina.startup.ContextConfig.beforeStart(ContextConfig.java:749)
                at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:301)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:182)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:970)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1840)
                at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
                at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
                at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
                at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
                at java.base/java.lang.Thread.run(Thread.java:834)

This error will prevent the application from executing queries, e.g. when calling http://localhost:8080/FROST-Server/v1.0/Datastreams.

The issue exists on both Windows (Win 10) and Linux (Ubuntu 18 LTS).

We suspect that the change in permission on commit d20101a may have caused these issues.

frost-server runs without issues when using the fraunhoferiosb/frost-server:1.11.2 image

Greetings,
Niklas

@phertweck
Copy link
Contributor

Hi Niklas,

thanks for reporting this issue.

We're already aware of it. A solution, we're currently testing is available on the fixes-userRights branch (https://github.com/FraunhoferIOSB/FROST-Server/tree/fixes-userRights). There's also a disussion in this pull request (#240), which introduced the permission change.

@Niklas345
Copy link
Author

Hey,

Thanks for the fast reply! We'll be watching for the new release then

@hylkevds
Copy link
Member

hylkevds commented Jul 1, 2020

It should now be fixed in the latest docker images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants