Giter Site home page Giter Site logo

geoserver-docker's Introduction

geoserver-docker

GeoServer is an open source server for sharing geospatial data. This is a docker image that eases setting up a GeoServer running specifically for GeoNode with an additional separated data directory.

The image is based on the official Tomcat 9 image

Installation

This image is available as a trusted build on the docker hub, and is the recommended method of installation. Simple pull the image from the docker hub.

$ docker pull geonode/geoserver

Alternatively you can build the image locally

$ git clone https://github.com/geonode/geoserver-docker.git
$ cd geoserver-docker
$ docker build -t "geonode/geoserver" .

Quick start

You can quick start the image using the command line

Before run the container, dowload lastest data-2.xx.x.zip file from https://build.geo-solutions.it/geonode/geoserver/latest/
Create folder geoserver on your host:

$ sudo mkdir /opt/geoserver/
$ sudo unzip ~/Dowmload/data-2.15.x.zip -d /opt/geoserver/

then run the container:

$ docker run --name "geoserver" -v /var/run/docker.sock:/var/run/docker.sock -v /opt/geoserver/data/:/geoserver_data/data -d -p 8080:8080 geonode/geoserver

Point your browser to http://localhost:8080/geoserver and login using GeoServer's default username and password:

  • Username: admin
  • Password: geoserver

How to use different versions

There are mainly two different versions of this image which are useful for running GeoNode with different authentication system types. These versions are released as specific tags for two authentication mechanisms:

Cookie based authn:

Oauth2 based authn:

You can declare what version to use along with the data directory tag which corresponds to the same version.

Configuration

Data volume

This GeoServer container keeps its configuration data at /geoserver_data/data which is exposed as volume in the dockerfile. The volume allows for stopping and starting new containers from the same image without losing all the data and custom configuration.

You may want to map this volume to a directory on the host. It will also ease the upgrade process in the future. Volumes can be mounted by passing the -v flag to the docker run command:

-v /your/host/data/path:/geoserver_data/data

Data volume container

In case you are running Compose for automatically having GeoServer up and running then a data volume container will be mounted with a default preloaded GEOSERVER_DATA_DIR at the configuration data directory of the container. Make sure that the image from the repository data-docker is available from the GeoNode Docker Hub or has been built locally:

docker build -t geonode/geoserver_data .

Persistance behavior

If you run:

docker-compose stop

Data are retained in the GEOSERVER_DATA_DIR and can then be mounted in a new GeoServer instance by running again:

docker-compose up

If you run:

docker-compose down

Data are completely gone but you can ever start from the base GeoServer Data Directory built for Geonode.

Data directory versions

There has to be a correspondence one-to-one between the data directory version and the tag of the GeoServer image used in the Docker compose file. So at the end you can consume these images below:

Database

GeoServer recommends the usage of a spatial database

PostGIS container (PostgreSQL + GIS Extension)

If you want to use a PostGIS container, you can link it to this image. You're free to use any PostGIS container. An example with kartooza/postgis image:

$ docker run -d --name="postgis" kartoza/postgis

For further information see kartooza/postgis.

Now start the GeoServer instance by adding the --link option to the docker run command:

--link postgis:postgis

geoserver-docker's People

Contributors

bcag2 avatar francbartoli avatar giohappy avatar ingenieroariel avatar jj0hns0n avatar jorgemartinezg avatar t-book avatar waybarrios avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

geoserver-docker's Issues

missing libspatialitejdbc.so

java.lang.UnsatisfiedLinkError: /usr/local/tomcat/temp/spatialite-3.7.22.4-libspatialitejdbc.so: libgeos_c.so.1: cannot open shared object file: No such file or directory
08:25:38,246 |-INFO in ch.qos.logback.core.db.DataSourceConnectionSource@3d6efb3d - Driver name=SQLiteJDBC
08:25:38,246 |-INFO in ch.qos.logback.core.db.DataSourceConnectionSource@3d6efb3d - Driver version=native

allow SSL?

I'm trying to connect to a digital ocean hosted postgres database and

org.postgresql.Driver.connect Connection error:
org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host XXXXX  user "xxx", database "xxx", SSL off

are there any plans to add SSL support? or just not specifying the SSL parameter altogether

docker run logs error - cannot find service/config.xml

trying to get this running first time.
using data-2.7.4 extracted to the opt/geoserver/data folder:
error in docker log is:
cannot stat '/geoserver_data/data/security/role/geonode REST role service/config.xml': No such file or directory

Issue in geonode/geoserver version 2.23.x setup

I can not access the layer preview without login

Screenshot 2566-04-26 at 7 28 28 PM

Screenshot 2566-04-26 at 7 31 42 PM

I have setup geoserver as follow:
geoserver:
image: geonode/geoserver:2.23.x
container_name: geoserver2_${COMPOSE_PROJECT_NAME}
env_file:
- geoserver_env.txt
ports:
- "${GEOSERVER_PORT}:8080"
volumes:
- ./geoserver_data:/geoserver_data/data
- /var/run/docker.sock:/var/run/docker.sock
- ./scripts/others/web.xml:/usr/local/tomcat/webapps/geoserver/WEB-INF/web.xml
environment:
DATABASE_HOST: db
DATABASE_PORT: 5432
GEONODE_GEODATABASE:
GEONODE_GEODATABASE_PASSWORD:
GEONODE_GEODATABASE_SCHEMA: public
networks:
- 'my_network

geoserver_env.txt file contains:
GEOSERVER_LOCATION=https://geoserver/geoserver/
GEOSERVER_ADMIN_USER=admin
GEOSERVER_ADMIN_PASSWORD=riskGeo321
GEOSERVER_PORT=8084

I am confused about what to pass in the environment (GEONODE_GEODATABASE and GEONODE_GEODATABASE_PASSWORD)

Is it possible to setup without configuring GEONODE_GEODATABASE part??

I would be grateful if you could help me to solve this issue.

Anonymous access to WMS returns exception

Hi,

I'm trying to use Geoserver as a Docker service. My porblem is that when I'm not logged into Geoserver Administration panel I can't access to my Data through WMS.

Using the OpenLayers preview for example :
http://localhost:8080/geoserver/geonode/wms?service=WMS&version=1.1.0&request=GetMap&layers=geonode%3Aplanet_osm_line&bbox=636091.0%2C5645585.5%2C640413.4375%2C5653261.5&width=432&height=768&srs=EPSG%3A3857&format=application/openlayers

I get this error :

<ServiceExceptionReport version="1.1.1">
    <ServiceException code="LayerNotDefined" locator="layers">
        Could not find layer geonode:planet_osm_line
    </ServiceException>
</ServiceExceptionReport>

Here's the complete log I dumped when error occured (2.16.2)

I tried

  • To change security configuration (Service and Layers configurations. But not both at the same time, as documentation says)
  • Multiple versions (2.16.2 and 2.15.4)

But couldn't manage to make it work.

The only way for me to make this work was to run the Binary that can be found on Geoserver website. (I also tried two version, 2.16.2 and 2.17-RC). It worked without any security configuration. Importing data the same way as with Docker versions.

Has anyone been in the same situation ?

PS: Data has been imported to a Docker PostGIS using osm2pgsql.

ECW

Do you have any dockerfile to install geoserver + ECW?

Getting vsn 2.15 when I thought I asked for 2.18.2 (n00b mistake?)

Running on Debian 10 with docker-ce from the docker apt repository

I run
docker pull geonode/geoserver:2.18.2
docker run --name "geoserver" -v /var/run/docker.sock:/var/run/docker.sock -v /opt/geoserver/data/:/geoserver_data/data -d -p 8080:8080 geonode/geoserver

and the web interface at http://localhost:8080/geoserver/web/ still says:

Welcome
This GeoServer belongs to .
This GeoServer instance is running version 2.15.1. For more information please contact the administrator.

About geoserver shows:

Build Information
GeoServer Version
2.15.1
Git Revision
6028a3cc138224e46b5bf949730043d15ef6a370
Build Date
29-Apr-2019 07:40
GeoTools Version
21.1 (rev 5df58c1ab9b9585655b2fc132e8f2b15c8bf5dae)
GeoWebCache Version
1.15.1 (rev 8ed864d6bb0cbc7e197f35511eae775676493b6b/8ed864d6bb0cbc7e197f35511eae775676493b6b)

Docker images shows:

root@:/opt/geoserver# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
geonode/geoserver 2.18.2 e7705bad9aa0 5 days ago 1.17GB
geonode/geoserver latest 068f05e24faa 21 months ago 953MB
root@:/opt/geoserver#
root@:/opt/geoserver#
root@:/opt/geoserver# docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
34f71ba69a3f geonode/geoserver "/usr/local/tomcat/t…" 7 minutes ago Up 7 minutes 0.0.0.0:8080->8080/tcp geoserver
root@:/opt/geoserver#

I am confused - guidance appreciated !

-Matt

Error: 'geoserver/rest' Geoserver 2.20.6 build 2022-12-07T08:45:32.000Z

Got an error building geoserver from geonode-project v3.3.x

base image: tomcat:9-jre11-temurin-focal
Geonode failed on entrypoint when trying to reach geoserver/rest

Testing inside nginx container

etc/nginx # curl http://geoserver:8080/geoserver/rest

Ambiguous handler methods mapped for '/geoserver/rest': {public org.geoserver.rest.wrapper.RestWrapper org.geoserver.rest.IndexController.get(), public org.springframework.http.ResponseEntity org.geowebcache.rest.controller.GWCIndexController.handleRequestInternal(javax.servlet.http.HttpServletRequest)}

Notice: geonode-project 3.3.x is using 2.19.6 but I encountered problem when installing COG plugins, I used 2.20.6 and it worked but when one of our dev rebuild the entire container it failed using the new build 2.20.6 here

<Contents>
<Key>geoserver/2.20.6/geoserver.war</Key>
<LastModified>2022-12-07T08:45:32.000Z</LastModified>
<ETag>"a1b7a9a1ac45bf0ba5202808168a539f-22"</ETag>
<Size>176408577</Size>
<Owner>
<ID>0c3e2f7c4a244456fb37aca487005e17b276a8f2b4a425ccccb81da50ff8e9ab</ID>
</Owner>
<StorageClass>STANDARD</StorageClass>
</Contents>

Java version is 1.7

Logging says the Java used in the container is 1.7 even if it run from the image tomcat:9-jre8:

INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.36
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jun 9 2016 13:55:50 UTC
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.36.0
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.4.12-boot2docker
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-7-openjdk-amd64/jre
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.7.0_111-b01
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation

Layer Preview(OpenLayers) with wrong url

i was trying to preview the new added layer with OpenLayers format but the redirect url starts with genode instead of localhost:8080 hence the openlayer js&css is not loaded correctly

http://geonode/geoserver/....
expected: http://localhost:8080/geoserver/....

i am using docker-compose and here's my yml file

version: "3.8"
services:
  geoserver:
    image: "geonode/geoserver"
    ports:
      - "8080:8080"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
      - "./geoserver/data/:/geoserver_data/data"

Error when starting 2.13.x

cp: cannot stat '/geoserver_data/data/security/role/geonode REST role service/config.xml': No such file or directory

docker run --name atlasgeo --hostname atlasgeo \
--network terena \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /opt/atlasgeo:/geoserver_data/data \
-p 36402:8080 \
-d geonode/geoserver:2.13.x

GeoServer is randomly not deployed on its docker container

GeoServer deployment within Tomcat 9 fails on its docker container:

geoserver4geonode | 2018-03-08T11:21:24.601926990Z  java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/geoserver]]
geoserver4geonode | 2018-03-08T11:21:24.601931568Z 	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:744)
geoserver4geonode | 2018-03-08T11:21:24.601934973Z 	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:716)
geoserver4geonode | 2018-03-08T11:21:24.601943577Z 	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
geoserver4geonode | 2018-03-08T11:21:24.601948119Z 	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1131)
geoserver4geonode | 2018-03-08T11:21:24.601951369Z 	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1865)
geoserver4geonode | 2018-03-08T11:21:24.601954402Z 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
geoserver4geonode | 2018-03-08T11:21:24.601957709Z 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
geoserver4geonode | 2018-03-08T11:21:24.601960734Z 	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
geoserver4geonode | 2018-03-08T11:21:24.601963992Z 	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
geoserver4geonode | 2018-03-08T11:21:24.601966929Z 	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1043)
geoserver4geonode | 2018-03-08T11:21:24.601969636Z 	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:433)
geoserver4geonode | 2018-03-08T11:21:24.601972204Z 	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1575)
geoserver4geonode | 2018-03-08T11:21:24.601975072Z 	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
geoserver4geonode | 2018-03-08T11:21:24.601978135Z 	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
geoserver4geonode | 2018-03-08T11:21:24.601981289Z 	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
geoserver4geonode | 2018-03-08T11:21:24.601984313Z 	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
geoserver4geonode | 2018-03-08T11:21:24.601987449Z 	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:964)
geoserver4geonode | 2018-03-08T11:21:24.601990510Z 	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
geoserver4geonode | 2018-03-08T11:21:24.601993414Z 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
geoserver4geonode | 2018-03-08T11:21:24.601996339Z 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)
geoserver4geonode | 2018-03-08T11:21:24.601999727Z 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)
geoserver4geonode | 2018-03-08T11:21:24.602002736Z 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
geoserver4geonode | 2018-03-08T11:21:24.602005655Z 	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
geoserver4geonode | 2018-03-08T11:21:24.602008412Z 	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
geoserver4geonode | 2018-03-08T11:21:24.602011253Z 	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
geoserver4geonode | 2018-03-08T11:21:24.602014193Z 	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
geoserver4geonode | 2018-03-08T11:21:24.602017117Z 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
geoserver4geonode | 2018-03-08T11:21:24.602019991Z 	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
geoserver4geonode | 2018-03-08T11:21:24.602026438Z 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
geoserver4geonode | 2018-03-08T11:21:24.602029511Z 	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
geoserver4geonode | 2018-03-08T11:21:24.602032375Z 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
geoserver4geonode | 2018-03-08T11:21:24.602034858Z 	at org.apache.catalina.startup.Catalina.start(Catalina.java:671)
geoserver4geonode | 2018-03-08T11:21:24.602037395Z 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
geoserver4geonode | 2018-03-08T11:21:24.602039927Z 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
geoserver4geonode | 2018-03-08T11:21:24.602042472Z 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
geoserver4geonode | 2018-03-08T11:21:24.602045228Z 	at java.lang.reflect.Method.invoke(Method.java:498)
geoserver4geonode | 2018-03-08T11:21:24.602048110Z 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353)
geoserver4geonode | 2018-03-08T11:21:24.602050797Z 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
geoserver4geonode | 2018-03-08T11:21:24.602053733Z 
geoserver4geonode | 2018-03-08T11:21:24.603042134Z 08-Mar-2018 11:21:24.602 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/geoserver] has finished in [16,470] ms
geoserver4geonode | 2018-03-08T11:21:24.603057870Z 08-Mar-2018 11:21:24.602 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/ROOT]
geoserver4geonode | 2018-03-08T11:21:24.664298566Z 08-Mar-2018 11:21:24.664 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/ROOT] has finished in [61] ms
geoserver4geonode | 2018-03-08T11:21:24.664490373Z 08-Mar-2018 11:21:24.664 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/examples]
geoserver4geonode | 2018-03-08T11:21:24.920701892Z 08-Mar-2018 11:21:24.917 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/examples] has finished in [252] ms
geoserver4geonode | 2018-03-08T11:21:24.921025654Z 08-Mar-2018 11:21:24.920 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/docs]
geoserver4geonode | 2018-03-08T11:21:24.944041063Z 08-Mar-2018 11:21:24.943 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/docs] has finished in [23] ms
geoserver4geonode | 2018-03-08T11:21:24.944287182Z 08-Mar-2018 11:21:24.944 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/manager]
geoserver4geonode | 2018-03-08T11:21:24.968808921Z 08-Mar-2018 11:21:24.968 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/manager] has finished in [24] ms
geoserver4geonode | 2018-03-08T11:21:24.969711134Z 08-Mar-2018 11:21:24.969 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/host-manager]
geoserver4geonode | 2018-03-08T11:21:24.995043308Z 08-Mar-2018 11:21:24.994 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/host-manager] has finished in [26] ms

GeoServer 2.12.x fails to start with creepy error

Dockerized GS may fail to deploy in tomcat with exception:

Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/geoserver] due to a StackOverflowError. Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies. The class hierarchy being processed was [org.bouncycastle.asn1.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1.ASN1EncodableVector]

related: https://stackoverflow.com/questions/29955410/how-do-i-fix-stackoverflowerror-in-org-apache-catalina-startup-contextconfig-pop

The fix is to set

org.apache.catalina.startup.ContextConfig.jarsToSkip=bcprov*.jar

Latest releases have issues when run in OpenShift

It appears these images are written with docker in mind, not necessarily Openshift/kubernetes. That said, I've found that while the GN-2.10.1 release works well in Openshift, the 2.15.3 and 2.15.4 releases do not. In the latest releases, many pages (specifically add datastore -> PostGIS) throw this error when the page is loaded through the loadbalancer. If you reach the pages from a locally running web browser, it still works. I've tried a few generic solutions suggested on the web, such as CorsFilter, with no success so far.

HTTP Status 400 – Bad Request
Type Status Report

Message Origin does not correspond to request

Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

Apache Tomcat/9.0

errors using quick start command

modified command to display errors directly to console:

# docker run --name "geoserver" -v /var/run/docker.sock:/var/run/docker.sock -it -p 8080:8080 geonode/geoserver
Traceback (most recent call last):
File "/usr/local/tomcat/tmp/get_dockerhost_ip.py", line 8, in
print _docker_host_ip()
NameError: name '_docker_host_ip' is not defined
cp: cannot stat '/geoserver_data/data/security/role/geonode REST role service/config.xml': No such file or directory

Certificate of build repository is not trusted

wget command has to be run with proper option, otherwise the following error will raise:

--2018-10-15 10:44:47--  https://build.geo-solutions.it/geonode/geoserver/latest/geoserver-2.10.x.war
Resolving build.geo-solutions.it (build.geo-solutions.it)... 164.132.80.66
Connecting to build.geo-solutions.it (build.geo-solutions.it)|164.132.80.66|:443... connected.
ERROR: The certificate of ‘build.geo-solutions.it’ is not trusted.
ERROR: The certificate of ‘build.geo-solutions.it’ hasn't got a known issuer.

Exits immediately because of missing file

I pulled the image and ran the command from your readme. The container exits (1) immediately and the logs show
cp: cannot stat '/geoserver_data/data/security/role/geonode REST role service/config.xml': No such file or directory

Geofence build prevents layer upload

Running geonode 3.2 on geonode project docker fails on layer upload. The same is happening when one tries to publish a layer in geoserver gui. The stack trace https://hastebin.com/xilupocuri.apache indicates that something is wrong with geofence. Further debugging shows that yesterdays jars work:

-rw-r--r--  1 csgis csgis  85436 Jun  7 16:12 gs-geofence-2.18-20210225.223638-83.jar
-rw-r--r--  1 csgis csgis 112311 Jun  7 16:12 gs-geofence-server-2.18-20210225.224053-83.jar

while those from today fail

-rw-r--r--  1 docker docker  89162 Mai 24 19:41 gs-geofence-2.18-20210517.135648-138.jar
-rw-r--r--  1 docker docker 114610 Mai 24 19:41 gs-geofence-server-2.18-20210517.140149-138.jar

Cannot change the database host in geofence-datasource-ovr.properties.j2 geonode/geoserver:2.23.0

I have to use a dockerized geonode 4.1.2 but with an external DB. I have changed the .env file accordingly and the Geoserver stores but the geofence kept not working.

After some research, I found that I can edit the file /templates/geofence/geofence-datasource-ovr.properties.j2 in the geonode/geoserver container so to override the file geofence-datasource-ovr.properties in the geoserver datadir, but this file is part of the image.

This is the initial value of geofenceDataSource.url in the file with the database host "db" hardcoded:
geofenceDataSource.url=jdbc:postgresql://db:5432/{{ GEONODE_GEODATABASE }}

I want to make the database host as a parameter from the .env file by replacing the geofenceDataSource.url with the following one :

geofenceDataSource.url=jdbc:postgresql://{{ DATABASE_HOST }}:5432/{{ GEONODE_GEODATABASE }}

Please could you release a new version of the image with this edit, as I don't have access to the source code of image geonode/geoserver:2.23.0

Breaks on PIP version 10.0.0

When building and running via docker compose, I get the following error

Setting up python-all-dev (2.7.13-2) ...Setting up python-cryptography (1.7.1-3) ...Setting up python-secretstorage (2.3.1-2) ...
Setting up python-keyring (10.1-1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Collecting pip
  Downloading https://files.pythonhosted.org/packages/62/a1/0d452b6901b0157a0134fd27ba89bf95a857fbda64ba52e1ca2cf61d8412/pip-10.0.0-py2.py3-none-any.whl (1.3MB)
Installing collected packages: pip
  Found existing installation: pip 9.0.1
    Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr
Successfully installed pip-10.0.0
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    from pip import main
ImportError: cannot import name main
ERROR: Service 'geoserver' failed to build: The command '/bin/sh -c apt-get update     && apt-get -y upgrade     && apt-get install -y python python-pip python-dev     && chmod +x /usr/local/tomcat/tmp/set_geoserver_auth.sh     && chmod +x /usr/local/tomcat/tmp/setup_auth.sh     && chmod +x /usr/local/tomcat/tmp/entrypoint.sh     && pip install --upgrade pip     && pip install -r requirements.txt     && chmod +x /usr/local/tomcat/tmp/get_dockerhost_ip.py     && chmod +x /usr/local/tomcat/tmp/get_nginxhost_ip.py' returned a non-zero code: 1

However, I was able to fix this issue by using an older version of pip.
Ie. Replacing line 82 in the Dockerfile from
&& pip install --upgrade pip \
to
&& pip install --upgrade pip==9.0.3 \

UTF-8 strings messy, datastore not initialized properly

I have some issues with newer GeoServer builds. The UTF-8 formatting seems off and the datastore is not properly initialized.

The build 18-Dec-2018 16:30 \ d329c0d91eee5c05ca62c486611bec2ebbbf0b4a does work properly
The build 2019-03-14T09:39:14Z \ 5a37a47c08dae167969c41d9e614106ca457aabe has the above mentioned errors

I have made a fresh setup with docker-compose from the main GeoNode (non SPC).

screenshots show german translations:
2019_03_27_002_Image
2019_03_26_003_Image
2019_03_27_001_Image

Geoserver 2.19.2

Hello,
I was trying to use the latest geoserver stable version (2.19.2 if I'm not wrong) with docker, but found that the latest version available on docker hub is the 2.18.2.

Is there any plan to release an upgraded docker image?

Thank you for your support!

Layer doesn't show up if admin is logged out

Hi,

I imported a shapefile successfully to Geoserver.

When I query the WMS service for its capabilities, i.e., https://<domain>/geoserver/ows?service=wms&version=1.3.0&request=GetCapabilities
The layer itself and all its capabilities show up fine, but only if the user is logged in as admin.
If the user is logged out (or if I try to access the service through a another browser, a private window, etc...), the Layer simply doesn't seem to show up.

A more specific example,
When I specifically query for the layer while having an admin session, i.e. https://<domain>/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=<my layer> [other parameters ommitted for brevity]
The layer is shown just fine.
If the user is logged out, I get the error Could not find layer.

Does anyone have any idea what could be causing this? Is there any privacy parameter that I might have overlooked? Any specific Docker parameter that I missed? I ask this because this doesn't seem to happen with my other non-Docker deployment.

Thank you!

geoserver with postgis

I want to get the Geonode/Geoserver running with Kartoza/Postgis with:

docker run -d --name="postgis" kartoza/postgis
docker run --name "geoserver_with_postgis" --link postgis:postgis -v /var/run/docker.sock:/var/run/docker.sock -v `pwd`/data/:/geoserver_data/data -d -p 8080:8080 geonode/geoserver

Adding a new PostGIS store with

Data Source Name: local
Host: localhost
Port: 5432
database: gis
schema: public
user: docker
password: docker

results in the following error:

Error creating data store, check the parameters. Error message: Unable to obtain connection: Cannot create PoolableConnectionFactory (Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)

For testing purposes, I run

docker run -d --name="postgis" kartoza/postgis -p 5432:5432

and can establish a successful connection with pgadmin and qgis from my real local machine. So the postgres service seems to work. Also geoserver works fine with geotiffs.

what's going on here?

Change Base Image (?)

For security reasons it would be advisable to switch to one of these base images:

Base Image                             Vulnerabilities  Severity
tomcat:10.0.0-M7-jdk14-openjdk-oracle  0                0 high, 0 medium, 0 low
tomcat:9.0.37-jdk14-openjdk-oracle     0                0 high, 0 medium, 0 low
tomcat:10.0.0-M5-jdk14-openjdk-oracle  0                0 high, 0 medium, 0 low
tomcat:9.0.31-jdk13-openjdk-oracle     0                0 high, 0 medium, 0 low

As from what I see these are all on centos we should check for a newer buster image.

Missing dependencies for use in geonode-project

Hello!

This image is almost identical to the image used in geonode-project.
One critical difference is that this image is missing several dependencies necessary for interacting with postgres&postgis. They are hibernate-spatial-postgis-1.1.3.2.jar and postgis-jdbc-1.3.3.jar, and are installed with the line here.
This means that this official prebuilt image cannot be used in the geonode-project and must be built. Installing these dependencies would make it easier to try out Geonode. It would lower the maintenance of a geonode project, since we could just change the dockerfile rather than having to reconcile updates with a newer version of geonode-project and rebuild the geoserver container. It would also help with the issue of avoiding duplication

If it's acceptable to you, I can submit an MR to port the lines from the dockerfile in geonode-project here.

./entrypoint.sh: line 11: python: command not found

When running container without DOCKER_HOST_IP set. The python call fails because python is not an alias for python3 in this image.

Found this in 2.19.6 and also in Master ...

I would suggest replace:

# old:
echo export DOCKER_HOST_IP=`python /usr/local/tomcat/tmp/get_dockerhost_ip.py` >> /root/.override_env
# new:
echo export DOCKER_HOST_IP=`python3 /usr/local/tomcat/tmp/get_dockerhost_ip.py` >> /root/.override_env

Upgrade pinned version of pip3

pip3 is currently pinned to version 9.0.3 here, and has been for about 4 years. We should probably unpin it, or at least upgrade it.
I'm happy to submit a patch for whichever we prefer.

docker-compose.yml does not start in a Rancher instance

hello,
when using the docker command "docker-compose up", geoserver-docker works perfectly. Thanks !!
but when i am tring to use it in a Rancher instance, but it does not start: the activation remains in progression ...
did you try to use Rancher ? it is a very good tool to manage docker containers.
rancher
Thanks in advance,
Ernest.

config.xml missing

Hi,

I followed the instruction, but my docker container exited, and when I check the log I get

cp: cannot stat '/geoserver_data/data/security/auth/geonodeAuthProvider/config.xml': No such file or directory

Thanks!

Server busy on delete layer

@afabiani

on a larger instance with over 3k layers (mostly raster) I'm experiencing that geoserver becomes not responding for about 2-3 Minutes when deleting a layer in geonode. The server status of geoserver than shows "Server busy". Do you know of any problem or which process (like invalidating some cache) could lock geoserver for some time?

As always verbose logs are a bit overwhelming with geoserver.

I do see a lot of geofence requests

geoserver4geonode  | 26 Mar 11:36:10 DEBUG  [org.geoserver] - Thread 117 got the lock in mode READ
geoserver4geonode  | 26 Mar 11:36:10 DEBUG  [geoserver.geofence] - Getting access limits for workspace geonode
geoserver4geonode  | 26 Mar 11:36:10 DEBUG  [geoserver.geofence] - Admin level access, returning full rights for workspace geonode
geoserver4geonode  | 26 Mar 11:36:10 DEBUG  [geoserver.geofence] - Getting access limits for Resource sbb_kart_16929_blatt_3253_4_sahab_23037
geoserver4geonode  | 26 Mar 11:36:10 DEBUG  [geoserver.geofence] - Admin level access, returning full rights for layer sbb_kart_16929_blatt_3253_4_sahab_23037
geoserver4geonode  | 26 Mar 11:36:10 DEBUG  [geoserver.geofence] - Returning mode HIDE for resource CoverageInfoImpl[sbb_kart_16929_blatt_3253_4_sahab_23037]
geoserver4geonode  | 26 Mar 11:36:10 DEBUG  [geoserver.geofence] - Getting access limits for workspace geonode
geoserver4geonode  | 26 Mar 11:36:10 DEBUG  [geoserver.geofence] - Admin level access, returning full rights for workspace geonode
geoserver4geonode  | 26 Mar 11:36:10 TRACE  [geoserver.platform] - Found Property override: 'GEOSERVER_XSTREAM_WHITELIST' to be unset
geoserver4geonode  | 26 Mar 11:36:10 TRACE  [geoserver.platform] - Found Java environment variable : 'GEOSERVER_XSTREAM_WHITELIST' to be unset
geoserver4geonode  | 26 Mar 11:36:10 TRACE  [geoserver.platform] - Found Servlet context parameter : 'GEOSERVER_XSTREAM_WHITELIST' to be unset
geoserver4geonode  | 26 Mar 11:36:10 TRACE  [geoserver.platform] - Found System environment variable : 'GEOSERVER_XSTREAM_WHITELIST' to be unset
geoserver4geonode  | 26 Mar 11:36:10 TRACE  [geoserver.platform] - Found Property override: 'GEOSERVER_XSTREAM_WHITELIST' to be unset
geoserver4geonode  | 26 Mar 11:36:10 TRACE  [geoserver.platform] - Found Java environment variable : 'GEOSERVER_XSTREAM_WHITELIST' to be unset
geoserver4geonode  | 26 Mar 11:36:10 TRACE  [geoserver.platform] - Found Servlet context parameter : 'GEOSERVER_XSTREAM_WHITELIST' to be unset
geoserver4geonode  | 26 Mar 11:36:10 TRACE  [geoserver.platform] - Found System environment variable : 'GEOSERVER_XSTREAM_WHITELIST' to be unset
geoserver4geonode  | 26 Mar 11:36:10 TRACE  [geoserver.platform] - Found Property override: 'GEOSERVER_XSTREAM_WHITELIST' to be unset
geoserver4geonode  | 26 Mar 11:36:10 TRACE  [geoserver.platform] - Found Java environment variable : 'GEOSERVER_XSTREAM_WHITELIST' to be unset
geoserver4geonode  | 26 Mar 11:36:10 TRACE  [geoserver.platform] - Found Servlet context parameter : 'GEOSERVER_XSTREAM_WHITELIST' to be unset
geoserver4geonode  | 26 Mar 11:36:10 TRACE  [geoserver.platform] - Found System environment variable : 'GEOSERVER_XSTREAM_WHITELIST' to be unset
geoserver4geonode  | 26 Mar 11:36:10 TRACE  [geoserver.platform] - Found Property override: 'PROXY_BASE_URL' to be unset
geoserver4geonode  | 26 Mar 11:36:10 TRACE  [geoserver.platform] - Found Java environment variable : 'PROXY_BASE_URL' to be unset
geoserver4geonode  | 26 Mar 11:36:10 TRACE  [geoserver.platform] - Found Servlet context parameter : 'PROXY_BASE_URL' to be unset
geoserver4geonode  | 26 Mar 11:36:10 TRACE  [geoserver.platform] - Found System environment variable : 'PROXY_BASE_URL' to be unset
geoserver4geonode  | 26 Mar 11:36:10 DEBUG  [geoserver.filters] - Compressing output for mimetype: application/xml
geoserver4geonode  | 26 Mar 11:36:10 DEBUG  [org.geoserver] - Thread 117 locking in mode READ
geoserver4geonode  | 26 Mar 11:36:10 DEBUG  [org.geoserver] - Thread 117 releasing the lock in mode READ

Also some WPS Exceptions

geoserver4geonode  | 26 Mar 11:36:17 TRACE  [platform.resource] - delta computed in 10ms for /geoserver_data/data/gwc-layers
geoserver4geonode  | 26 Mar 11:36:18 DEBUG  [geoserver.geofence] - Getting access limits for workspace geonode
geoserver4geonode  | 26 Mar 11:36:18 DEBUG  [geoserver.geofence] - Admin level access, returning full rights for workspace geonode
geoserver4geonode  | 26 Mar 11:36:18 DEBUG  [config.impl] - Could not locate service of type interface org.geoserver.wps.WPSInfo in workspace null, available services were []
geoserver4geonode  | 26 Mar 11:36:18 ERROR  [config.impl] - Could not locate service of type interface org.geoserver.wps.WPSInfo, local workspace is null
geoserver4geonode  | 26 Mar 11:36:18 ERROR  [config.impl] - Error occurred processing a configuration change listener
geoserver4geonode  | java.lang.NullPointerException
geoserver4geonode  | 	at org.geoserver.wps.WPSInitializer.initWPS(WPSInitializer.java:79)
geoserver4geonode  | 	at org.geoserver.wps.WPSInitializer$1.handlePostGlobalChange(WPSInitializer.java:71)

But cannot find any real cause yet. (Version is gn 4.1.x and geoserver 2.23.x)

not work

cp: cannot stat '/geoserver_data/data/security/role/geonode REST role service/config.xml': No such file or directory

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.