marlin renderer geoserver compatibility

311 views
Skip to first unread message

massimo basile

unread,
Feb 28, 2020, 11:34:08 AM2/28/20
to marlin-renderer
Hi Marlin,

I'm currently trying to run Geoserver 2.16.2 while enabling marlin renderer. 
I'm running it on Tomcat 9 and using openjdk 11. 

I've followed the instruction in the How-to-use section here

And I'm running java with the following options for the JVM

JAVA_OPTS="$JAVA_OPTS --patch-module java.desktop=/usr/local/tomcat/marlin-0.9.4.2-Unsafe-OpenJDK9.jar"

As a result I have a running Geoserver, but I'm not able to understand if marlin renderer is correctly configured, since there are no logs saying: 
INFO: ===============================================================================
INFO: Marlin software rasterizer           = ENABLED
INFO: Version                              = [marlin-X.Y.Z-Unsafe]
INFO: sun.java2d.renderer                  = org.marlin.pisces.MarlinRenderingEngine
...

I've done the same test by using openjdk 8 and setting my JAVA_OPTS as follows: 

$JAVA_OPTS -Xbootclasspath/a:/usr/local/tomcat/marlin-0.9.4.3-Unsafe-sun-java2d.jar -Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine"

With the same result.

Is Geoserver 2.16.2 incompatible with marlin renderer? How can I know if it is configured correctly?
Thank you,
Massimo Basile

Laurent Bourgès

unread,
Feb 28, 2020, 12:22:01 PM2/28/20
to marlin-...@googlegroups.com
Hi Basile,

I think logs are disabled by default:
Just add this jvm arg:
-Dsun.java2d.renderer.log=true

I recommend using -Dsun.java2d.renderer=org.marlin.pisces.DMarlinRenderingEngine

D for Double precision: better quality / same perf.

I will update the doc, it is not up to date. V0.7.5 was released in 2016 !
I can assure it rocks.
See my docker file for jdk8:


Bye,
Laurent

massimo basile

unread,
Feb 28, 2020, 12:55:10 PM2/28/20
to marlin-...@googlegroups.com
Hi Marlin,

Thank you very much for the quick and kind answer.

Just some points I didn’t get:

- In the wiki you wrote that for Java 9+ I should use patch module instead of -Xbootclasspath/a:/usr/local/tomcat/marlin-0.9.4.3-Unsafe-sun-java2d.jar -Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine". Isn’t that correct?
- In case I use Java 11, should I add to the patch-module option also the one you mentioned in your answer (-Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine) together with the one for the logs ?
- I saw your Docker image, any reason for not using Java 11? 

Thanks again,
Massimo

Inviato da iPhone

Il giorno 28 feb 2020, alle ore 17:34, massimo basile <basil...@gmail.com> ha scritto:


--
You received this message because you are subscribed to the Google Groups "marlin-renderer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marlin-render...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/marlin-renderer/73d13b04-2ad5-418a-b7f4-8c0a59c1eeb0%40googlegroups.com.

Laurent Bourgès

unread,
Feb 28, 2020, 1:59:39 PM2/28/20
to marlin-...@googlegroups.com
Hi


Le ven. 28 févr. 2020 à 18:55, massimo basile <basil...@gmail.com> a écrit :
Hi Marlin,

Thank you very much for the quick and kind answer.

Just some points I didn’t get:

- In the wiki you wrote that for Java 9+ I should use patch module instead of -Xbootclasspath/a:/usr/local/tomcat/marlin-0.9.4.3-Unsafe-sun-java2d.jar -Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine". Isn’t that correct?

For 11 you need to  patch module but use DMarlin...

- In case I use Java 11, should I add to the patch-module option also the one you mentioned in your answer (-Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine) together with the one for the logs ?

DM... not M...

- I saw your Docker image, any reason for not using Java 11? 

I patched ian's docker image using jdk8, that's all. I could make another dockerfile with 11...

Cheers,
Laurent

massimo basile

unread,
Feb 28, 2020, 2:03:24 PM2/28/20
to marlin-...@googlegroups.com
Thank you so much Laurent,

You made my day :)

Cheers,
Massimo

Inviato da iPhone

Il giorno 28 feb 2020, alle ore 19:59, Laurent Bourgès <mbourges...@gmail.com> ha scritto:


--
You received this message because you are subscribed to the Google Groups "marlin-renderer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marlin-render...@googlegroups.com.

massimo basile

unread,
Mar 2, 2020, 6:11:04 AM3/2/20
to marlin-renderer
Hi Laurent, 

Unfortunately I was not able to enable the marlin rasterizer, even with your precious suggestions. 
After trying to replicate as close as possible what you've done with the docker image you posted, I decided to make a test by pulling that image. 

What I've came up with is something I didn't expect, that image has my same problem, logs don't appear and as you can see in the screenshot the MarlinRendered is not enabled. 
I've simply run this command: 

docker run -p 8081:8080 ianturton/geoserver-2.16-jdk-8-zoomstack:latest 

So, don't know how to proceed :(

Thank you,
Massimo


Il giorno venerdì 28 febbraio 2020 20:03:24 UTC+1, massimo basile ha scritto:
Thank you so much Laurent,

You made my day :)

Cheers,
Massimo

Inviato da iPhone

Il giorno 28 feb 2020, alle ore 19:59, Laurent Bourgès <mbourges...@gmail.com> ha scritto:


Hi

Le ven. 28 févr. 2020 à 18:55, massimo basile <basil...@gmail.com> a écrit :
Hi Marlin,

Thank you very much for the quick and kind answer.

Just some points I didn’t get:

- In the wiki you wrote that for Java 9+ I should use patch module instead of -Xbootclasspath/a:/usr/local/tomcat/marlin-0.9.4.3-Unsafe-sun-java2d.jar -Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine". Isn’t that correct?

For 11 you need to  patch module but use DMarlin...

- In case I use Java 11, should I add to the patch-module option also the one you mentioned in your answer (-Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine) together with the one for the logs ?

DM... not M...

- I saw your Docker image, any reason for not using Java 11? 

I patched ian's docker image using jdk8, that's all. I could make another dockerfile with 11...

Cheers,
Laurent

--
You received this message because you are subscribed to the Google Groups "marlin-renderer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marlin-renderer+unsubscribe@googlegroups.com.
Screenshot_1.png

Laurent Bourgès

unread,
Mar 2, 2020, 6:24:14 AM3/2/20
to marlin-...@googlegroups.com
Hi,
Just follow instructions:

It works for me.

Laurent

To unsubscribe from this group and stop receiving emails from it, send an email to marlin-render...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "marlin-renderer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marlin-render...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/marlin-renderer/ba1643bf-7c0c-4625-b249-a00e3c05a86c%40googlegroups.com.

massimo basile

unread,
Mar 2, 2020, 8:16:25 AM3/2/20
to marlin-renderer
Hi Laurent, 

thanks again, actually it was my fault. I run your image and is working correctly.

Going back to my problem, here is my Dockerfile: 

FROM tomcat:jre8

ARG TOMCAT_APPS_PATH=${CATALINA_HOME}/webapps
WORKDIR ${TOMCAT_APPS_PATH}

COPY geoserver2.15.war geoserver.war
COPY marlin-0.9.4.3-Unsafe-sun-java2d.jar $CATALINA_HOME
COPY marlin-0.9.4.3-Unsafe.jar $CATALINA_HOME

ENV MARLIN_JAR_PREFIX=$CATALINA_HOME/usr/local/tomcat/marlin-0.9.4.3-Unsafe
ENV JAVA_OPTS="-Xbootclasspath/a:$MARLIN_JAR_PREFIX.jar -Xbootclasspath/p:$MARLIN_JAR_PREFIX-sun-java2d.jar -Dsun.java2d.renderer=org.marlin.pisces.DMarlinRenderingEngine -Dsun.java2d.renderer.log=true"

It's a very simple one, using tomcat 8 and moving the geoserver war under webapps. 
No way to see the renderer enabled. 

Do you see any problem in this Dockerfile? 

Thank you,
Massimo


Il giorno lunedì 2 marzo 2020 12:24:14 UTC+1, bourges.laurent ha scritto:
Hi,
Just follow instructions:

It works for me.

Laurent

Le lun. 2 mars 2020 à 12:11, massimo basile <basi...@gmail.com> a écrit :
Hi Laurent, 

Unfortunately I was not able to enable the marlin rasterizer, even with your precious suggestions. 
After trying to replicate as close as possible what you've done with the docker image you posted, I decided to make a test by pulling that image. 

What I've came up with is something I didn't expect, that image has my same problem, logs don't appear and as you can see in the screenshot the MarlinRendered is not enabled. 
I've simply run this command: 

docker run -p 8081:8080 ianturton/geoserver-2.16-jdk-8-zoomstack:latest 

So, don't know how to proceed :(

Thank you,
Massimo


Il giorno venerdì 28 febbraio 2020 20:03:24 UTC+1, massimo basile ha scritto:
Thank you so much Laurent,

You made my day :)

Cheers,
Massimo

Inviato da iPhone

Il giorno 28 feb 2020, alle ore 19:59, Laurent Bourgès <mbourge...@gmail.com> ha scritto:


Hi

Le ven. 28 févr. 2020 à 18:55, massimo basile <basi...@gmail.com> a écrit :
Hi Marlin,

Thank you very much for the quick and kind answer.

Just some points I didn’t get:

- In the wiki you wrote that for Java 9+ I should use patch module instead of -Xbootclasspath/a:/usr/local/tomcat/marlin-0.9.4.3-Unsafe-sun-java2d.jar -Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine". Isn’t that correct?

For 11 you need to  patch module but use DMarlin...

- In case I use Java 11, should I add to the patch-module option also the one you mentioned in your answer (-Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine) together with the one for the logs ?

DM... not M...

- I saw your Docker image, any reason for not using Java 11? 

I patched ian's docker image using jdk8, that's all. I could make another dockerfile with 11...

Cheers,
Laurent

--
You received this message because you are subscribed to the Google Groups "marlin-renderer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marlin-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "marlin-renderer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marlin-...@googlegroups.com.

Andrea Aime

unread,
Mar 2, 2020, 8:23:47 AM3/2/20
to marlin-...@googlegroups.com
On Mon, Mar 2, 2020 at 2:16 PM massimo basile <basil...@gmail.com> wrote:
COPY marlin-0.9.4.3-Unsafe-sun-java2d.jar $CATALINA_HOME
COPY marlin-0.9.4.3-Unsafe.jar $CATALINA_HOME

ENV MARLIN_JAR_PREFIX=$CATALINA_HOME/usr/local/tomcat/marlin-0.9.4.3-Unsafe

The problem seems to be here? The MARLIN_JAR_PREFIX should probably be just "$CATALINA_HOME//marlin-0.9.4.3-Unsafe" (or something like that)

Cheers
Andrea
 
==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

massimo basile

unread,
Mar 2, 2020, 8:29:14 AM3/2/20
to marlin-renderer
Hi Andrea, 

yes in the meanwhile I saw it and fixed, I just forgot to remove that path when I used that environment variable.
Not it is working.

Thank you,
Massimo

Il giorno lunedì 2 marzo 2020 14:23:47 UTC+1, Andrea Aime ha scritto:

massimo basile

unread,
Mar 2, 2020, 8:51:01 AM3/2/20
to marlin-renderer
Hi Laurent, 

Now it works simply fine thanks to your advises. I was able to run it in java 11 too. 

I have just one last doubt: 

.- Version 0.9.4.3 includes two jars, and uses -Xbootclasspath/a and -Xbootclasspath/c for setting the render on the JVM. This seems to be compatible only for java 8-

- Version 0.9.4.2 supports java 9+ but have just one jar (marlin-0.9.4.2-Unsafe-OpenJDK9.jar)

What's the difference between them? 
What is more convenient to use?

Best regards,
Massimo



Il giorno lunedì 2 marzo 2020 12:24:14 UTC+1, bourges.laurent ha scritto:
Hi,
Just follow instructions:

It works for me.

Laurent

Le lun. 2 mars 2020 à 12:11, massimo basile <basi...@gmail.com> a écrit :
Hi Laurent, 

Unfortunately I was not able to enable the marlin rasterizer, even with your precious suggestions. 
After trying to replicate as close as possible what you've done with the docker image you posted, I decided to make a test by pulling that image. 

What I've came up with is something I didn't expect, that image has my same problem, logs don't appear and as you can see in the screenshot the MarlinRendered is not enabled. 
I've simply run this command: 

docker run -p 8081:8080 ianturton/geoserver-2.16-jdk-8-zoomstack:latest 

So, don't know how to proceed :(

Thank you,
Massimo


Il giorno venerdì 28 febbraio 2020 20:03:24 UTC+1, massimo basile ha scritto:
Thank you so much Laurent,

You made my day :)

Cheers,
Massimo

Inviato da iPhone

Il giorno 28 feb 2020, alle ore 19:59, Laurent Bourgès <mbourge...@gmail.com> ha scritto:


Hi

Le ven. 28 févr. 2020 à 18:55, massimo basile <basi...@gmail.com> a écrit :
Hi Marlin,

Thank you very much for the quick and kind answer.

Just some points I didn’t get:

- In the wiki you wrote that for Java 9+ I should use patch module instead of -Xbootclasspath/a:/usr/local/tomcat/marlin-0.9.4.3-Unsafe-sun-java2d.jar -Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine". Isn’t that correct?

For 11 you need to  patch module but use DMarlin...

- In case I use Java 11, should I add to the patch-module option also the one you mentioned in your answer (-Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine) together with the one for the logs ?

DM... not M...

- I saw your Docker image, any reason for not using Java 11? 

I patched ian's docker image using jdk8, that's all. I could make another dockerfile with 11...

Cheers,
Laurent

--
You received this message because you are subscribed to the Google Groups "marlin-renderer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marlin-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "marlin-renderer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marlin-...@googlegroups.com.

Laurent Bourgès

unread,
Mar 2, 2020, 8:57:06 AM3/2/20
to marlin-...@googlegroups.com
Just check your paths !

ENV MARLIN_JAR_PREFIX=$CATALINA_HOME/usr/local/tomcat/marlin-0.9.4.3-Unsafe
=>
ENV MARLIN_JAR_PREFIX=$CATALINA_HOME/marlin-0.9.4.3-Unsafe

That's your turn to make it work.
I am on holidays.
Laurent

To unsubscribe from this group and stop receiving emails from it, send an email to marlin-render...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/marlin-renderer/1fedc263-9f7c-4c91-89cd-425b967d8fbf%40googlegroups.com.

Laurent Bourgès

unread,
Mar 2, 2020, 9:02:47 AM3/2/20
to marlin-...@googlegroups.com
Hi


Le lun. 2 mars 2020 à 14:51, massimo basile <basil...@gmail.com> a écrit :
Hi Laurent, 

Now it works simply fine thanks to your advises. I was able to run it in java 11 too. 

Good.


I have just one last doubt: 

.- Version 0.9.4.3 includes two jars, and uses -Xbootclasspath/a and -Xbootclasspath/c for setting the render on the JVM. This seems to be compatible only for java 8-
Yes: the extra jar contains fixes (png, aa shape tile...) that are specific to jdk8. Jdk11 has these fixes as I pushed them myself.


- Version 0.9.4.2 supports java 9+ but have just one jar (marlin-0.9.4.2-Unsafe-OpenJDK9.jar)
That patch upgrades the marlin renderer 0.9.1.3 to latest release for jdk11+: that's the only jar to have.

Laurent
Reply all
Reply to author
Forward
0 new messages