[Geoserver-users] tomcat7 wont start with -XX:+UseParallelGC

Hi,

I have geoserver up and running but during install (aws Ubuntu 14.04) i
found http://docs.geoserver.org/stable/en/user/production/container.html
recommends setting -XX:+UseParallelGC. This caused Tomcat7 to fail to start.

I found reference elsewhere to -XX:+UseParNewGC being similar. With this
setting Tomcat7 and consequently GeoServer does run but i wonder whether
anyone has had a similar issue and/or knows whether this alternative setting
is really going to have the desired effect?

Thanks

Andy

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/tomcat7-wont-start-with-XX-UseParallelGC-tp5150938.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Andy,

I am using GeoServer 2.5.1 and Tomcat 7.0.54 on a Windows 2008 R2 server,
and I am using -XX:+UseParallelGC as one of my JAVA startup parameters
without any problem. Could something else be causing Tomcat to fail to
start? I am not familiar with the other setting that you mentioned.

Jerome Wendell

-----Original Message-----
From: AndyT [mailto:andy@anonymised.com]
Sent: Monday, July 14, 2014 11:31 AM
To: geoserver-users@lists.sourceforge.net
Subject: [Geoserver-users] tomcat7 wont start with -XX:+UseParallelGC

Hi,

I have geoserver up and running but during install (aws Ubuntu 14.04) i
found http://docs.geoserver.org/stable/en/user/production/container.html
recommends setting -XX:+UseParallelGC. This caused Tomcat7 to fail to start.

I found reference elsewhere to -XX:+UseParNewGC being similar. With this
setting Tomcat7 and consequently GeoServer does run but i wonder whether
anyone has had a similar issue and/or knows whether this alternative setting
is really going to have the desired effect?

Thanks

Andy

--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/tomcat7-wont-start-with-XX-UseParallelGC
-tp5150938.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

----------------------------------------------------------------------------
--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck® Code
Sight™ - the same software that powers the world's largest code search
on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi Jerome,

Thanks for the response.

I tried removing the parameters one at a time when i had the issues. I found
that by just adding or removing this specific option (and no others) i would
get tomcat starting successfully or not.

Andy

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/tomcat7-wont-start-with-XX-UseParallelGC-tp5150938p5150943.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Andy,

Does the following affect your installation:

◦-XX:+UseConcMarkSweepGC
◦To enable a parallel young generation GC with the concurrent GC add -XX:+UseParNewGC to the startup. Don't add -XX:+UseParallelGC with this option.

Jerome

-----Original Message-----
From: AndyT [mailto:andy@anonymised.com]
Sent: Monday, July 14, 2014 12:06 PM
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] tomcat7 wont start with -XX:+UseParallelGC

Hi Jerome,

Thanks for the response.

I tried removing the parameters one at a time when i had the issues. I found that by just adding or removing this specific option (and no others) i would get tomcat starting successfully or not.

Andy

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/tomcat7-wont-start-with-XX-UseParallelGC-tp5150938p5150943.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck® Code Sight™ - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Jerome,

I added -XX:+UseConcMarkSweepGC and tomcat started. I tried it with and
without the -XX:+UseParNewGC

Does this help to identify what the issue with -XX:+UseParallelGC might be
or just add something to ensure i'm achieving the same? Apologies for my
ignorance and thanks again!

Andy

Jerome A. Wendell wrote

Andy,

Does the following affect your installation:

◦-XX:+UseConcMarkSweepGC
◦To enable a parallel young generation GC with the concurrent GC add
-XX:+UseParNewGC to the startup. Don't add -XX:+UseParallelGC with this
option.

Jerome

-----Original Message-----
From: AndyT [mailto:

andy@anonymised.com

]
Sent: Monday, July 14, 2014 12:06 PM
To:

geoserver-users@anonymised.com

Subject: Re: [Geoserver-users] tomcat7 wont start with -XX:+UseParallelGC

Hi Jerome,

Thanks for the response.

I tried removing the parameters one at a time when i had the issues. I
found that by just adding or removing this specific option (and no others)
i would get tomcat starting successfully or not.

Andy

--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/tomcat7-wont-start-with-XX-UseParallelGC-tp5150938p5150943.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck®
Code Sight™ - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Geoserver-users mailing list

Geoserver-users@anonymised.com

https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck®
Code Sight™ - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Geoserver-users mailing list

Geoserver-users@anonymised.com

https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/tomcat7-wont-start-with-XX-UseParallelGC-tp5150938p5150952.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Andy,

I am not sure of the answer to your question. Hopefully someone a lot more knowledgeable than myself on the list will respond to your question.

Jerome

-----Original Message-----
From: AndyT [mailto:andy@anonymised.com]
Sent: Monday, July 14, 2014 12:35 PM
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] tomcat7 wont start with -XX:+UseParallelGC

Jerome,

I added -XX:+UseConcMarkSweepGC and tomcat started. I tried it with and without the -XX:+UseParNewGC

Does this help to identify what the issue with -XX:+UseParallelGC might be or just add something to ensure i'm achieving the same? Apologies for my ignorance and thanks again!

Andy

Jerome A. Wendell wrote

Andy,

Does the following affect your installation:

◦-XX:+UseConcMarkSweepGC
◦To enable a parallel young generation GC with the concurrent GC add
-XX:+UseParNewGC to the startup. Don't add -XX:+UseParallelGC with
this option.

Jerome

-----Original Message-----
From: AndyT [mailto:

andy@anonymised.com

]
Sent: Monday, July 14, 2014 12:06 PM
To:

geoserver-users@anonymised.com

Subject: Re: [Geoserver-users] tomcat7 wont start with
-XX:+UseParallelGC

Hi Jerome,

Thanks for the response.

I tried removing the parameters one at a time when i had the issues. I
found that by just adding or removing this specific option (and no
others) i would get tomcat starting successfully or not.

Andy

--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/tomcat7-wont-start-with-XX-UsePara
llelGC-tp5150938p5150943.html Sent from the GeoServer - User mailing
list archive at Nabble.com.

----------------------------------------------------------------------
-------- Want fast and easy access to all the code in your enterprise?
Index and search up to 200,000 lines of code with a free copy of Black
Duck® Code Sight™ - the same software that powers the
world's largest code search on Ohloh, the Black Duck Open Hub! Try it
now.
http://p.sf.net/sfu/bds
_______________________________________________
Geoserver-users mailing list

Geoserver-users@anonymised.com

https://lists.sourceforge.net/lists/listinfo/geoserver-users

----------------------------------------------------------------------
-------- Want fast and easy access to all the code in your enterprise?
Index and search up to 200,000 lines of code with a free copy of Black
Duck® Code Sight™ - the same software that powers the
world's largest code search on Ohloh, the Black Duck Open Hub! Try it
now.
http://p.sf.net/sfu/bds
_______________________________________________
Geoserver-users mailing list

Geoserver-users@anonymised.com

https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/tomcat7-wont-start-with-XX-UseParallelGC-tp5150938p5150952.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck® Code Sight™ - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

What JVM are you using? What is the output of these commands?
update-alternatives --display java
java -version

On 14/07/14 23:31, AndyT wrote:

Hi,

I have geoserver up and running but during install (aws Ubuntu 14.04) i
found http://docs.geoserver.org/stable/en/user/production/container.html
recommends setting -XX:+UseParallelGC. This caused Tomcat7 to fail to start.

I found reference elsewhere to -XX:+UseParNewGC being similar. With this
setting Tomcat7 and consequently GeoServer does run but i wonder whether
anyone has had a similar issue and/or knows whether this alternative setting
is really going to have the desired effect?

Thanks

Andy

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/tomcat7-wont-start-with-XX-UseParallelGC-tp5150938.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck®
Code Sight™ - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Mineral Resources Flagship
Australian Resources Research Centre

Hi Ben

Java versions as requested:

xxx@anonymised.com:~$ update-alternatives --display java
java - manual mode
  link currently points to /usr/lib/jvm/java-6-oracle/jre/bin/java
/usr/lib/jvm/java-6-oracle/jre/bin/java - priority 1
  slave java.1.gz: /usr/lib/jvm/java-6-oracle/man/man1/java.1.gz
Current 'best' version is '/usr/lib/jvm/java-6-oracle/jre/bin/java'.

xxx@anonymised.com:~$ java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

Andy

What JVM are you using? What is the output of these commands?
update-alternatives --display java
java -version

On 14/07/14 23:31, AndyT wrote:

Hi,

I have geoserver up and running but during install (aws Ubuntu 14.04) i
found http://docs.geoserver.org/stable/en/user/production/container.html
recommends setting -XX:+UseParallelGC. This caused Tomcat7 to fail to
start.

I found reference elsewhere to -XX:+UseParNewGC being similar. With this
setting Tomcat7 and consequently GeoServer does run but i wonder whether
anyone has had a similar issue and/or knows whether this alternative
setting
is really going to have the desired effect?

Thanks

Andy

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/tomcat7-wont-start-with-XX-UseParallelGC-tp5150938p5151083.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hmm, that looks fine.

How did you set -XX:+UseParallelGC? In JAVA_OPTS in /etc/default/tomcat7? If two contradictory options are provided, tomcat7 may refuse to start.

Did you see any errors in the logs or when running "service tomcat7 start"?

Kind regards,
Ben.

On 15/07/14 16:17, AndyT wrote:

Hi Ben

Java versions as requested:

xxx@anonymised.com:~$ update-alternatives --display java
java - manual mode
   link currently points to /usr/lib/jvm/java-6-oracle/jre/bin/java
/usr/lib/jvm/java-6-oracle/jre/bin/java - priority 1
   slave java.1.gz: /usr/lib/jvm/java-6-oracle/man/man1/java.1.gz
Current 'best' version is '/usr/lib/jvm/java-6-oracle/jre/bin/java'.

xxx@anonymised.com:~$ java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

Andy

What JVM are you using? What is the output of these commands?
update-alternatives --display java
java -version

On 14/07/14 23:31, AndyT wrote:

Hi,

I have geoserver up and running but during install (aws Ubuntu 14.04) i
found http://docs.geoserver.org/stable/en/user/production/container.html
recommends setting -XX:+UseParallelGC. This caused Tomcat7 to fail to
start.

I found reference elsewhere to -XX:+UseParNewGC being similar. With this
setting Tomcat7 and consequently GeoServer does run but i wonder whether
anyone has had a similar issue and/or knows whether this alternative
setting
is really going to have the desired effect?

Thanks

Andy

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/tomcat7-wont-start-with-XX-UseParallelGC-tp5150938p5151083.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Mineral Resources Flagship
Australian Resources Research Centre

Hi Ben,

It's set in /etc/default/tomcat7

I currently have "-XX:+UseConcMarkSweepGC" in there on the suggestion of
Jerome from this post.

This is my current setting:

JAVA_OPTS="-Djava.awt.headless=true -server -Xmx512m -Xms48m
-XX:+UseConcMarkSweepGC -XX:MaxPermSize=128M
-XX:SoftRefLRUPolicyMSPerMB=36000 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC"

This is the setting which fails:

JAVA_OPTS="-Djava.awt.headless=true -server -Xmx512m -Xms48m
-XX:+UseConcMarkSweepGC -XX:MaxPermSize=128M
-XX:SoftRefLRUPolicyMSPerMB=36000 -XX:+UseParallelGC "

Tomcat7 just shows "fail" when starting. I will check the logs as well.
Thanks

Andy

Hmm, that looks fine.

How did you set -XX:+UseParallelGC? In JAVA_OPTS in
/etc/default/tomcat7? If two contradictory options are provided, tomcat7
may refuse to start.

Did you see any errors in the logs or when running "service tomcat7 start"?

Kind regards,
Ben.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/tomcat7-wont-start-with-XX-UseParallelGC-tp5150938p5151102.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Andy,

you have used two conflicting options, -XX:+UseConcMarkSweepGC and -XX:+UseParallelGC, in the same JAVA_OPTS. These refer to two different garbage collectors. For example:

$ java -XX:+UseConcMarkSweepGC -XX:+UseParallelGC
Conflicting collector combinations in option list; please refer to the release notes for the combinations allowed
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

If you want try try the parallel GC, remove -XX:+UseConcMarkSweepGC from the option list. (In fact I think the parallel collector is the default for your JDK for server class machines, so will be used if you specify no options, but it will not hurt to be explicit.)

Kind regards,
Ben.

On 15/07/14 17:09, AndyT wrote:

This is the setting which fails:
JAVA_OPTS="-Djava.awt.headless=true -server -Xmx512m -Xms48m
-XX:+UseConcMarkSweepGC -XX:MaxPermSize=128M
-XX:SoftRefLRUPolicyMSPerMB=36000 -XX:+UseParallelGC "

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Mineral Resources Flagship
Australian Resources Research Centre

Hi Ben,

I'm new to Linux so excuse if i'm picking up the wrong logs. Catalina.out
seems to show a very likely issue:

Conflicting collector combinations in option list; please refer to the
release notes for the combinations allowed
Could not create the Java virtual machine.

Looking at my config again, i think i may have misunderstood Jeromes'
comment. I have now removed -XX:+UseConcMarkSweepGC and tomcat7 does start
with -XX:+UseParallelGC

Seems to be running ok now. Not sure where i got that setting originally,
perhaps it was a default. Thanks so much for help

Andy

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/tomcat7-wont-start-with-XX-UseParallelGC-tp5150938p5151106.html
Sent from the GeoServer - User mailing list archive at Nabble.com.