Unrecognized VM option 'MaxPermSize=512m' when running Zeppelin
Asked Answered
I

6

57

When I try to run Zeppelin by either

bin/zeppelin.sh

or

bin/zeppelin-deamon.sh start

I was getting the following error message.

Unrecognized VM option 'MaxPermSize=512m'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Java 9 is installed on my system (Ubuntu 16.04).

$ java -version                         
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
Islington answered 4/11, 2017 at 15:38 Comment(3)
You appear to have an ancient build of JDK 9 on your system. The JDK 9 GA build reports itself as "9", released September 2017. Your build seems to be from early 2016. In any case, the MaxPermSize option only make sense with JDK 7 and older releases. With JDK 8 and JDK 9 you will get a warning like this: "ignoring option MaxPermSize=128m; support was removed in 8.0". One final point - if zeppelin have an issue tracker then it would be good to submit a bug so that they know to update their scripts.Dives
Yeah, it does look like an ancient version. openjdk-9-jdk series was installed on my system, and I removed them.Islington
Does this answer your question? Android Studio - Unrecognized VM option 'MaxPermSize=256m'Huang
I
27

It appears the MaxPermSize VM option is no longer supported in Java 9. Perhaps they changed the parameter name or something. Instead of digging into this issue further, as I had no particular reason to insist on using Java 9, I installed Java 8 as follows:

sudo apt install openjdk-8-jdk

And made it a default Java environment

sudo update-alternatives --config java

This fixed the issue.

Islington answered 4/11, 2017 at 15:38 Comment(4)
MaxPermSize was already removed in Java 8. You should get the same warning with that version.Yukikoyukio
@DidierL is right. Zeppelin was spitting out a warning: OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0.Islington
The concept worked for me. In my case the versions were different.Tempestuous
Downgrade because of "wrong" parameters always is the worst idea.Balling
U
74

If anyone still getting this renaming MaxPermSize to MaxMetaspaceSize fixed the issue on my part, migrated from gradle7.2 to gradle8 with jdk11 previously, now on jdk17

Uncouple answered 31/3, 2023 at 10:2 Comment(5)
That should not be the accepted answer - PermGen and Metaspace are completely different beasts. Main difference for a person setting that parameter is that PermSize always had an upper bound and if unspecified it defaulted to 82MB, while Metaspace upper bound is not specified by default (so setting it actually introduces it). As such these are two completely separate properties with different meaning, and one should not recommend simply replacing one with the other. If anything general recommendation would be jsut to remove the argument alltogether and leave metaspace alone.Marchesa
@Marchesa - the docs literally recommend the replacement: docs.oracle.com/en/java/javase/17/docs/specs/man/…Holguin
@Holguin The old option was superceded. That does not mean that the new one is a drop-in replacement of it. I even mentioned why - someone setting MaxPermSize to increase it (which I believe was the most popular reason of setting it) has no need to set MaxMetaspaceSize.Marchesa
@Marchesa what are we supposed to do when the build is broken? :)Calie
@Calie if you previously set MaxPermSize to increase it - delete it. If you set it before to decrease it - find someone who knows why, these days shaving off from 82MB default doesn't seem impactful, but maybe you have a specialized usecase. If you don't know - find out.Marchesa
I
27

It appears the MaxPermSize VM option is no longer supported in Java 9. Perhaps they changed the parameter name or something. Instead of digging into this issue further, as I had no particular reason to insist on using Java 9, I installed Java 8 as follows:

sudo apt install openjdk-8-jdk

And made it a default Java environment

sudo update-alternatives --config java

This fixed the issue.

Islington answered 4/11, 2017 at 15:38 Comment(4)
MaxPermSize was already removed in Java 8. You should get the same warning with that version.Yukikoyukio
@DidierL is right. Zeppelin was spitting out a warning: OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0.Islington
The concept worked for me. In my case the versions were different.Tempestuous
Downgrade because of "wrong" parameters always is the worst idea.Balling
B
12

Starting OpenJDK17 these java options -XX:MaxPermSize=256m have been removed and using them results in an error. You need to remove -XX:MaxPermSize=512m in java option and replace with -XX:MaxMetaspaceSize=512m.

See: Removed Java Options Documentation

Boohoo answered 29/9, 2023 at 8:0 Comment(0)
D
9

Check your gradle.properties

I had this line in it

org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=2g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

removed it and everything works like charm :)

Defelice answered 10/5, 2023 at 4:41 Comment(1)
What does removing this line do?Quassia
D
2

Maybe this could answer your question: https://mcmap.net/q/99192/-what-does-xx-maxpermsize-do

You don't need to remove the full line as @Maulzey said.

Instead, just remove MaxPermSize or use it respective sustitution.

Deforest answered 27/7, 2023 at 7:6 Comment(0)
S
0

In my case. I got this error when trying to open 'eclipse'. for such situation you need to modify the configuration file by deleting this line

-startup
plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.700.v20180504-1554
-vmargs
-Xms40m
-Xmx256m
-XX:MaxPermSize=128m -> **Delete this line**
Saadi answered 10/4 at 23:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.