sbbs
sbbs

Reputation: 1918

Unrecognized VM option 'MaxPermSize=512m' when running Zeppelin

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)

Upvotes: 59

Views: 145921

Answers (7)

mckeed
mckeed

Reputation: 9827

In case it helps someone else who follows the same Google path I did:

My issue was I had long ago set the JAVA_OPTS environment variable in my shell profile, and this option was set in that. Since I rarely use Java, it took me a while to realize that's where it was being picked up from.

Upvotes: 0

Maryam
Maryam

Reputation: 51

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**

Upvotes: 0

lgmg
lgmg

Reputation: 861

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

Upvotes: 86

Alper Sahin
Alper Sahin

Reputation: 151

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

Upvotes: 15

JesusDMedinaC
JesusDMedinaC

Reputation: 430

Maybe this could answer your question: https://stackoverflow.com/a/12114284/3957538

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

Instead, just remove MaxPermSize or use it respective sustitution.

Upvotes: 2

maulzey
maulzey

Reputation: 4240

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 :)

Upvotes: 9

sbbs
sbbs

Reputation: 1918

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.

Upvotes: 27

Related Questions