Coder Social home page Coder Social logo

docker-qgis-server's Issues

How do I update image to current 3.16?

Hi. Just wondering if there is a 3.16 image I can use for this.

Also I'm assuming I just point desktop 3.16 to the localhost 8081 port to connect right? Thanks!

QGIS Server Crashing with memory leak on Huge GeoJSON layer.

Problem

Due to the recent crash as described here: kartoza/geosafe#538 ,
we found out that on a GeoJSON layer with big size (something like 60MB in test case), the memory usage rocket into 2GB to process these layers. Moreover, when it crash, apache doesn't release the resources, so it has memory leak.

Proposed Solutions

When processing huge GeoJSON layer like this, we might have to disable multiprocess thread.
Let's say the map client requested 4 tiles in parallel. Usually one QGIS Server instance might take all these request and handle it by forking the process in a different thread/worker. But for this case, it causes these problem:

  1. All thread work with a different memory page (not shared), so for 60 MB GeoJSON file in test case, it ends up with 4x2GB memory consumptions.
  2. When the thread crash, the memory leak stays there, it's not being cleaned up.
  3. all 4 thread will try to access the same resource and race condition happens (because it was not quick enough to process tiles).

So I suggest the following solutions:

  1. Gave an option to use a separate apache config file where scaling is handled at the container level (scaling the instance, not apache thread)
  2. In this config, we only uses maximum of 1 worker (no race condition will happen in that container)
  3. In this config, we will not use keep alive. We want to close the connection and make the worker restart fresh to avoid memory leak.

CC @timlinux

QGIS Server 3

Is is likely this process will work for QGIS Server 3?

I can set up a PR, if you like. Just wanted to confirm that it will work before I get stuck in...

server configuration error

This image does not work. Tried with the default project, copying my own into the container, and use a volume reference.

> <ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
> <ServiceException code="Service configuration error">Service unknown or unsupported</ServiceException>
> </ServiceExceptionReport>``

InvalidCRS Issue

Hi,
we are fiddling with the QGIS-Server 3 container. I have a bunch of database layers (PostGIS), all in EPSG:25832. The projct is in EPSG:25832, too. GetCapabilities lists all layers with their bounding box and tells me that EPSG:25832 is an available CRS for both the project and the individual layers. A GetMap request however returns:
<ServiceExceptionReport version="1.3.0"> <ServiceException code="InvalidCRS">Could not create output CRS</ServiceException></ServiceExceptionReport>

I can't run docker-qgis-server container

Sorry I'm a newsbee in docker but I can't run your docker-qgis-server container.

docker run --name "qgis-server" -p 2222:22 -p 8080:80 -d -t kartoza/docker-qgis-server
7109debdbfe9fa698df41c3e15584a496116a1325e539388a52b4e6b47d541aa
2014/08/27 17:21:54 Error: Cannot start container 7109debdbfe9fa698df41c3e15584a496116a1325e539388a52b4e6b47d541aa: port has already been allocated

and if I change port docker create a container but his statut is exited:

docker run --name "qgis-server" -p 2222:22 -p 8081:80 -d -t kartoza/docker-qgis-server
docker ps -a
CONTAINER ID        IMAGE                               COMMAND                CREATED             STATUS                     PORTS                    NAMES
75a6e3c0d7c6        kartoza/docker-qgis-server:latest   /bin/sh -c 'apachect   3 seconds ago       Exited (1) 2 seconds ago                            qgis-server  

For exemple I have docker ui and It works fine:

CONTAINER ID        IMAGE                               COMMAND                CREATED             STATUS                     PORTS                    NAMES
75a6e3c0d7c6        kartoza/docker-qgis-server:latest   /bin/sh -c 'apachect   3 seconds ago       Exited (1) 2 seconds ago                            qgis-server         
5835fa3b861b        crosbymichael/dockerui:latest       ./dockerui -e /docke   7 weeks ago         Up 21 minutes              0.0.0.0:8001->9000/tcp   evil_brown 

QGIS server is not working with layers coming from the database

Problem

I have my compose file setup

postgres:
  image: kartoza/postgis:9.5-2.2
  ports:
    - "35432:5432"
  environment:
    - USERNAME=docker
    - PASS=docker
qgisserver:
  image: kartoza/qgis-server:2.18.10
  hostname: qgis-server
  volumes:
    - ./web:/web
  environment:
    - QGIS_PROJECT_FILE=/web/project/project.qgs
    - PGSERVICEFILE=/web/project/pg_service.conf
  links:
    - postgres:postgres
  ports:
    - "30003:80"

When I log into the qgis-server container I can connect to the Postgres container by using the service file. psql service=gis but when I do a get capabilities on my layer the request generated is not valid.
get

I then proceed to open the project file and replace my data source with a shapefile and do a get capabilities which returns true.

I think QGIS server is not connecting properly to the Postgres container.

Error building image

When I try to build the image i get the following error:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
qgis-mapserver : Depends: qgis-providers (= 2.4.0+wheezy1) but it is not going to be installed
Depends: libgdal1 (>= 1.8.0) but it is not installable
Depends: libqgis-analysis2.4.0 but it is not going to be installed
Depends: libqgis-core2.4.0 but it is not going to be installed
Depends: libspatialindex1 but it is not installable

Add CORS by default in apache.conf

Hi,

Thank you very much for your work.

Is it ok to add "Header set Access-Control-Allow-Origin "*" " by default in in the apache conf ?
I can't request my WFS server from a client api like openlayers without CORS.

Thanks in advance

ServiceException code="InvalidCRS" (qgis-server:3.0.3)

After switching from kartoza/qgis-server:2.18 to kartoza/qgis-server:3.0.3 I encounter various issues.
Besides #17, the GetMap requests now respond with error code 400:

<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
 <ServiceException code="InvalidCRS">Could not create output CRS</ServiceException>
</ServiceExceptionReport>

This might be caused by some path/config issue, as the log indicates some database access issues(?):

...
[84][12:42:10] Can't open database: unable to open database file
[84][12:42:10] Can't open database: unable to open database file
[84][12:42:10] Can't open database: unable to open database file
[84][12:42:11] Error, could not create output CRS from EPSG

QGIS Server vs ( LTR e 3.0) is not working with layers coming from the PostGis

I have run a docker qgis server instance, everything works fine with shapefiles, but when I load layers to Qgis Desktop from PostGis installed in the host and also in a docker container, the getCapabilities are not showing the layers.

I am running an Ubuntu 20.04 LTS host and Qgis Coruña. The containers were created based on the configuration bellow:

Example QGIS Server docker compose

This file will run two QGIS Server instances

QGIS 2.18 LTR - on port 8080 publishing contents of /project

QGIS 3.0 - on port 8081 publishing contents of /project-qgis3

Please read the accompanying README for more details.

db:
image: kartoza/postgis:9.6-2.4
#volumes:
#- ./pg/postgres_data:/var/lib/postgresql
environment:
- USERNAME=docker
- PASS=docker
ports:
- "5433:5432"

qgisserver3:
#build : 3,0
image: kartoza/qgis-server:3.0.3
hostname: qgis-server
environment:
# set to '' if you plan on hosting
# multiple projects on this server an
# then add map= to your GET
# requests
- QGIS_PROJECT_FILE=''
# 0 = highest level, shows all messages
# 5 = very quiet
- QGIS_SERVER_LOG_LEVEL=0
volumes:
- /home/geo/Documents/qgis/projects:/project
ports:
- "80:80"
links:
- db:db

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.