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

Test the new printing plugin #175

Closed
3 tasks done
giohappy opened this issue Sep 19, 2023 · 11 comments
Closed
3 tasks done

Test the new printing plugin #175

giohappy opened this issue Sep 19, 2023 · 11 comments
Assignees

Comments

@giohappy
Copy link
Contributor

giohappy commented Sep 19, 2023

As mentioned here a new version of the printing plugin is available on Geoserver 2.24.x (currently main) branch, which uses print-lib:2.3-SNAPSHOT. This snapshot is the result of the work done to merge the https://github.com/geosolutions-it/mapfish-print fork into https://github.com/mapfish/mapfish-print-v2 and its refactoring to make it build with Java 11 and the GeoTools API change.
Further details are available at geosolutions-it/mapfish-print#65.

Tests have been already performed in the context of the MapStore framework, where the print-lib is used for its own printing service, and results look good.

In preparation for adopting the updated printing plugin, and getting rid of the forked libs inside Geoserver for GeoNode, we want to do a test drive of Geoserver 2.2.4.x with GeoNode master.

Steps:

  • Build Geoserver 2.2.4.SNAPSHOT (Jenkins job) without the inclusion of the forked libs
  • Run GeoNode with Docker, with the Geoserver image built and configured with Geoserver 2.24.SNAPSHOT
  • execute tests. At the moment no automation tests are available for the printing, and this would be a good opportunity to implement some
@giohappy
Copy link
Contributor Author

giohappy commented Sep 20, 2023

Geoserver 2.24.x for GeoNode has been built. Notes:

  • it's built from Geoserver main branch with the following command:
    maven -T 4 clean install dependency:tree -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.count=100 -Djava.awt.headless=true -Dtest.maxHeapSize=256M -DskipTests -U -PsldService,printing,monitor,control-flow,wps,kmlppio,wps-download,excel,querylayer,gdal,authkey,css,ysld,importer,wmts-multi-dimensional,backup-restore,oauth2-geonode,oauth2-openid-connect,geofence-server,geofence-wps
  • NO custom libs were used

As expected the war contains print-lib-2.3-SNAPSHOT.jar

@giohappy
Copy link
Contributor Author

The layer of Italy is not visible, but we have the PDF and the background at least :)
We need to investigate why the expected layer is not rendered...

image

@giohappy
Copy link
Contributor Author

The following error is reported:

20 Sep 10:22:31 ERROR  [print.PDFUtils] - Server returned an error for http://localhost/geoserver/ows?BBOX=-337374.61413358245%2C3322756.347191903%2C2965507.2361090323%2C7026923.01385857&WIDTH=713&HEIGHT=800&format_options=dpi%3A96&map_resolution=96&FORMAT=image%2Fpng&STYLES=geonode%3Aitaly_3857&ENV=&LAYERS=geonode%3Aitaly_3857&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&access_token=b9O7wdkfkXM0AyqmOaUsPiKbJyoixK&TILED=true&REQUEST=GetMap&SRS=EPSG%3A3857&VERSION=1.1.1&SERVICE=WMS&scaleMethod=accurate&DPI=96&TRANSPARENT=true: Connection refused (Connection refused)
20 Sep 10:22:31 ERROR  [print.PDFCustomBlocks] - Error while adding a PDF elementjava.lang.IllegalStateException: unsupported protocol: 'jar'

Notice that the URL is actually working if called from the browser

@gannebamm
Copy link

Is there a testable docker setup?

[print.PDFUtils] - Server returned an error for http://localhost/geoserver[...]

I am always unsure if those calls source at a container (where the route to localhost will fail) or from the client (by which localhost/geoserver would be fine).

Additionally, there is the -DPRINT_BASE_URL=http://geoserver:8080/geoserver/pdf which states the container name.

Will it be enough to change https://github.com/GeoNode/geonode-project/blob/master/docker/geoserver/Dockerfile#L13 to 2.24.0 and changing the .war download path here: https://github.com/GeoNode/geonode-project/blob/master/docker/geoserver/Dockerfile#L24 to the s3 bucket listed in your comment #175 (comment) @giohappy ?

@giohappy
Copy link
Contributor Author

giohappy commented Sep 22, 2023

@gannebamm I paused the tests but this error is due to running docker compose locally, with localhost.
I will report the advancements as soon as I resume them.

2.24.x is not ready for deployment or a switch of geonode master. We're just testing the new print plugin in Geoserver for GeoNode. This test was asked to move the release of Geoserver forward.

@jodygarnett
Copy link

2.24-RC is now available and we would love your feedback :)

@giohappy
Copy link
Contributor Author

giohappy commented Oct 2, 2023

@jodygarnett I will resume tests the next few days but I'm quite confident that they will be positive. The only issue I've had so far was do to a misconfiguration.

@jodygarnett
Copy link

Perfect, I am just checking in as part of the RC announcement.

I have been really impressed with all the downstream projects testing. I know we do not usually do such big changes, but it is great to know that people have been able to test when needed this time.

@giohappy
Copy link
Contributor Author

giohappy commented Oct 3, 2023

@jodygarnett tests were succesful. I've removed any custom lib from Geoserver for GeoNode and printing still works :)

image

@giohappy giohappy closed this as completed Oct 9, 2023
@jodygarnett
Copy link

The 2.24.0 release goes out today and can be shared with GeoNode community.

@giohappy
Copy link
Contributor Author

The 2.24.0 release goes out today and can be shared with GeoNode community.

Thanks for the update @jodygarnett

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