I'm trying to create a minecraft server and the following error: - minecraft

I'm trying to create a minecraft server and the following error:
E:\Documentos\Minecraft>java -Xms1G -Xmx2G -jar server.jar -o false
Error occurred during initialization of VM Could not reserve enough
space for 2097152KB object heap E:\Documentos\Minecraft>PAUSE
Pressione qualquer tecla para continuar. . .
Can someone help me?

Your error message states
"Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap"
You don't have enough memory to run your server. Try upgrading your storage capacity.

The computer you are running this on does not have enough memory to allocate 1 gigabyte to a process. You will need to get a computer with more RAM to run a server.

You are using more RAM to the server that you have, in run.bat change:
java -Xms1G -Xmx2G -jar server.jar -o false
to
java -Xms1G -Xmx1G -jar server.jar
In recent versions "-o" don't works more.

Related

I am getting an error when redeploying the Mule Api on my local anypoint studio or you can say local machine

when I deploy a Mule API and after deployment, I do some changes and save it then my API gets redeploy.
during redeployment, I am getting the below error in the console that stops the deployment.
java.lang.OutOfMemoryError: Metaspace
Dumping heap to java_pid19656.hprof ...
Heap dump file created [197920637 bytes in 0.811 secs]
#
# java.lang.OutOfMemoryError: Metaspace
# -XX:OnOutOfMemoryError="taskkill /F /PID %p"
# Executing "taskkill /F /PID 19656"...
JVM exited unexpectedly.
Automatic JVM Restarts disabled. Shutting down.
<-- Wrapper Stopped
anyone can help me to fix this issue?
Thanks
Probably you are having a known issue related to redeployments that cause the metaspace are to get exhausted. It is recommended to use the latest version of Mule and the latest version of every connector used in your applications to mitigate that issue.
Also ensure that the MetaspaceSize is half of MaxMetaspaceSize. You can increase MaxMetaspaceSize if you feel you are deploying lots of classes or applications, but keep the proportion mentioned.
wrapper.java.additional.7=-XX:MetaspaceSize=128m
wrapper.java.additional.8=-XX:MaxMetaspaceSize=256m

apache rockerMQ broker doesn't start

i try to star rockerMQ broker,but i got the error message:
There is insufficient memory for the Java Runtime Environment to continue.
Native memory allocation (mmap) failed to map 8589934592 bytes for committing reserved memory.
An error report file with more information is saved as:
/usr/local/soft/rocketMQ/incubator-rocketmq/distribution/target/apache-rocketmq/hs_err_pid6034.log
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000005c0000000, 8589934592, 0) failed; error='Cannot allocate memory' (errno=12)
and i got something from the error log file about message of memory:
Memory: 4k page, physical 4089840k(551832k free), swap 2621432k(2621432k free)
vm_info: Java HotSpot(TM) 64-Bit Server VM (25.144-b01) for linux-amd64 JRE (1.8.0_144-b01), built on Jul 21 2017 21:57:33 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8)
how can i let the rockerMQ broker working for me
You can reduce the JVM heap size.
Open the distribution/bin/runbroker.sh file of your project and change the following line
JAVA_OPT="${JAVA_OPT} -server -Xms8g -Xmx8g -Xmn4g"
as
JAVA_OPT="${JAVA_OPT} -server -Xms4g -Xmx4g -Xmn2g"
now broker will only generate a 4G heap .I hope it will solve your problem.Now you can try to build and run.
Try modifying the start shell scripts to make a smaller JVM heap size in your dev/test env

Error on starting weblogic server in jdeveloper

Can anyone please help me to resolve this error?
Below is the weblogic server log...
I'm using Jdk 7, and Java Developer for ADF
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: -jrockit
Process exited.
--Weblogic server log-------
*** Using HTTP port 7101 ***
*** Using SSL port 7102 ***
C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\DefaultDomain\bin\startWebLogic.cmd
[waiting for the server to complete its initialization...]
.
.
JAVA Memory arguments: -Xms256m -Xmx512m
.
WLS Start Mode=Development
.
CLASSPATH=C:\Oracle\Middleware\oracle_common\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;C:\Oracle\Middl
eware\patch_wls1035\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\Middleware\p
atch_jdev1112\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\jdk1.7.0_67
\lib\tools.jar;C:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic_sp.jar;C:\Oracle\Middleware\wls
erver_10.3\server\lib\weblogic.jar;C:\Oracle\Middleware\modules\features\weblogic.server.modules_10.3
.5.0.jar;C:\Oracle\Middleware\wlserver_10.3\server\lib\webservices.jar;C:\Oracle\Middleware\modules\o
rg.apache.ant_1.7.1/lib/ant-all.jar;C:\Oracle\Middleware\modules\net.sf.antcontrib_1.1.0.0_1-
0b2/lib/ant-
contrib.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jrf_11.1.1\jrf.jar;C:\Oracle\Middleware
\wlserver_10.3\common\derby\lib\derbyclient.jar;C:\Oracle\Middleware\wlserver_10.3\server\lib\xqrl.jar
.
PATH=C:\Oracle\Middleware\patch_wls1035\profiles\default\native;C:\Oracle\Middleware\patch_jdev1112\p
rofiles\default\native;C:\Oracle\Middleware\wlserver_10.3\server\native\win\32;C:\Oracle\Middleware\w
lserver_10.3\server\bin;C:\Oracle\Middleware\modules\org.apache.ant_1.7.1\bin;C:\PROGRA~1\Java\jdk1.7
.0_67\jre\bin;C:\PROGRA~1\Java\jdk1.7.0_67\bin;E:\DB\app\oracle\product\11.2.0\server\bin;;c:\Program
Files\RSA SecurID Token Common;C:\Program Files\Intel\iCLS
Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell
\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program
Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program
Files\Java\jdk1.7.0_67\bin;C:\Oracle\Middleware\wlserver_10.3\server\native\win\32\oci920_8
.
***************************************************
* To start WebLogic Server, use a username and *
* password assigned to an admin-level user. For *
* server administration, use the WebLogic Server *
* console at http:\\hostname:port\console *
***************************************************
starting weblogic with Java version:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: -jrockit
Starting WLS with line:
C:\PROGRA~1\Java\jdk1.7.0_67\bin\java -jrockit -Xms256m -Xmx512m -Dweblogic.Name=DefaultServer
-Djava.security.policy=C:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.policy -
Djavax.net.ssl.trustStore=C:\Users\inatar\AppData\Local\Temp\trustStore8547229804589400188.jks -
Doracle.jdeveloper.adrs=true -Dweblogic.nodemanager.ServiceEnabled=true -Xverify:none -da -
Dplatform.home=C:\Oracle\Middleware\wlserver_10.3 -
Dwls.home=C:\Oracle\Middleware\wlserver_10.3\server -
Dweblogic.home=C:\Oracle\Middleware\wlserver_10.3\server -Djps.app.credential.overwrite.allowed=true
-Dcommon.components.home=C:\Oracle\Middleware\oracle_common -Djrf.version=11.1.1 -
Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -
Ddomain.home=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\DefaultDomain -
Djrockit.optfile=C:\Oracle\Middleware\oracle_common\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -
Doracle.server.config.dir=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\Defaul
tDomain\config\fmwconfig\servers\DefaultServer -
Doracle.domain.config.dir=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\Defaul
tDomain\config\fmwconfig -
Digf.arisidbeans.carmlloc=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\Defaul
tDomain\config\fmwconfig\carml -
Digf.arisidstack.home=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\DefaultDom
ain\config\fmwconfig\arisidprovider -
Doracle.security.jps.config=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\Defa
ultDomain\config\fmwconfig\jps-config.xml -
Doracle.deployed.app.dir=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\Default
Domain\servers\DefaultServer\tmp\_WL_user -Doracle.deployed.app.ext=\- -
Dweblogic.alternateTypesDirectory=C:\Oracle\Middleware\oracle_common\modules\oracle.ossoiap_11.1.1,C:
\Oracle\Middleware\oracle_common\modules\oracle.oamprovider_11.1.1 -
Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dweblogic.jdbc.remoteEnabled=false -
Dwsm.repository.path=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\DefaultDoma
in\oracle\store\gmds -Dweblogic.management.discover=true -Dwlw.iterativeDev= - Dwlw.testConsole= -
Dwlw.logErrorsToConsole= -
Dweblogic.ext.dirs=C:\Oracle\Middleware\patch_wls1035\profiles\default\sysext_manifest_classpath;C:\O
racle\Middleware\patch_jdev1112\profiles\default\sysext_manifest_classpath weblogic.Server
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: -jrockit
Process exited.
Unrecognized option: -jrockit Process exited. is the critical error. -jrockit is not an option available to the standard java jdk.
e.g. C:\PROGRA~1\Java\jdk1.7.0_67\bin\java -jrockit is the issue
Your JAVA_VENDOR is being set incorrectly in your setDomainEnv.cmd or startWebLogic.cmd script. It's being set to Oracle but should be set to Sun. You either need to figure out how that environment variable is being set incorrectly or manually fix one of the two .cmd files.
My last post was bad!
Here is the unwrapped set of lines I added:
echo "==> Force JAVA_VM to use -server:"
JAVA_VM=-server
export JAVA_VM
echo "."
echo "."
echo "JAVA Machine: ${JAVA_VM}"
THIS ISSUE IS RESOLVED FOR ME. I JUST WANTED TO POST THE SOLUTION SOMEWHERE...
I was working through exercise 1 on the NoSQL intro: http://www.oracle.com/technetwork/topics/bigdata/articles/intro-to-oracle-nosql-db-hol-1937059.pdf
I tried to deploy the Movieplex application to JDeveloper's internal weblogic server but kept getting hit with a -jrockit VM not found. This was difficult for me to get fixed because: 1 - I am not a heavy java programmer, and 2 - I apparently do not read very well. As for point 1, JRockit is an optimized special JAVA VM that some folks use. You can look that up oon line I guess, but it looks like we do not need it for this tutorial. As for point 2, I spent hours (I ashamedly admit) trying to figure out what .sh scripts were being run to start the Weblogic server running. I did all sorts of find commands, hunted through the binaries and folders underneath the Middleware folders. In the end, all I has to do was read the output log carefully, the script for me is: /home/oracle/.jdeveloper/system11.1.1.6.38.61.92/DefaultDomain/bin/startWebLogic.sh.
I edited the script REPLACING line 129 with below:
echo "==> Force JAVA_VM to use -server:"
JAVA_VM=-server
export JAVA_VM
echo "."
echo "."
echo "JAVA Machine: ${JAVA_VM}"
NOTE: there is another shell script that may be involved, /home/oracle/.jdeveloper/system11.1.1.6.38.61.92/Default/init-info/Domain

Max heap size reduced from java 6 to java 7?

Currently we are encountering an problem, our java application can run smoothly with JRE6, but for JRE7, it will report "Could not create the Java virtual machine" sometimes and failed to start program. we have "-Xmx1024m" option in the launch command line.
after searching in google, people suggest check the max heap size that can be requested in PC. then I tried below ones.
for JRE6,
C:\Users\joey>java -Xmx1214m -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) Client VM (build 20.45-b01, mixed mode)
C:\Users\joey>java -Xmx1215m -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
for JRE7,
D:\Program Files\Java\jre7\bin>java.exe -Xmx930m -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode)
D:\Program Files\Java\jre7\bin>java.exe -Xmx931m -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
And when i close most processes in PC and free memory to 2.5 GB, for JRE7, it will succeed with 1094m, like below.
D:\Program Files\Java\jre7\bin>java.exe -Xmx1094m -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode)
D:\Program Files\Java\jre7\bin>java.exe -Xmx1095m -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
It seems that the max heap size that JVM can request is related with system available memory size, does someone know the exact relationship?
Is there some way to enable tracing logs of JRE when creating JVM?
Thank you!
Regards,
Joey
I faced the same issue on various Windows OS flavous (Win7, Win2008R2) while having enough free RAM (3-5G), when switching from jre6_20 to jre7_51 (both 32 bit VMs)
Using vm args -Xmx1300m and -XX:MaxPermSize=256m on java 6 the VM is able to start. However, with java7 I had to lower down startup max memory (xmx with 100m or permgen with 100m) in order to be able to start VM.
The interesting part is this: if I restarted my box, the jvm 7 started with original vm args (-Xmx1300m and -XX:MaxPermSize=256m) so I suspect the root cause might be the OS with JVM combination.
I know that on Windows OSes - 32 bit VMs expect to have a single large chunk of memory, but cannot use the maximum process memory size will range from 1.4G to 1.6G (because of additional constraints)
Any troubleshooting pointers? Oracle does not provide any information in java7 release notes (or I could not spot those)
I have a similar problem Windows 7 64bit, no JAVA_HOME set nor in PATH
This fails
"C:\Program Files (x86)\Java\jdk1.7.0_51\bin\java.exe" -Xms32m -Xmx1024m -XX:MaxPermSize=256m -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
This works
"C:\Program Files (x86)\Java\jdk1.7.0_51\bin\java.exe" -Xms32m -Xmx512m -XX:MaxPermSize=256m -version
This also works (I can recompile or not, doesn't make a difference
"C:\Program Files (x86)\Java\jdk1.6.0_45\bin\java.exe" -Xms32m -Xmx1024m -XX:MaxPermSize=256m -version
I tried turning off windows DEP, didnt make a difference
http://windows.microsoft.com/en-us/windows-vista/data-execution-prevention-frequently-asked-questions
I twiddled with the Virtual Memory settings , changed from allowing Windows to Manage
http://windows.microsoft.com/en-us/windows/change-virtual-memory-size#1TC=windows-7
I upped the Virual Memory in windows and it allowed it to work, sometimes...(with xmx1024)
Nothing else is consuming a lot of resources (memory, etc, I did have oracle database running locally, but shut it down)
"C:\Program Files (x86)\Java\jdk1.7.0_51\bin\java.exe" -Xms32m -Xmx1024m -XX:MaxPermSize=256m -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
This works
"C:\Program Files (x86)\Java\jdk1.7.0_51\bin\java.exe" -Xms32m -Xmx900m -XX:MaxPermSize=256m -version
This fails
U:>"C:\Program Files (x86)\Java\jdk1.7.0_51\bin\java.exe" -Xms32m -Xmx2024m -XX
:MaxPermSize=256m -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
New version , works even with letting Windows Managage the Virtual Memory and DEP turned on
"C:\Program Files (x86)\Java\jdk1.7.0_65\bin\java.exe" -Xms32m -Xmx1024m -XX:MaxPermSize=256m -version

Failed to start Glassfish after increasing heap size

I want to increase the heap size of my Glassfish. For that, I know that I can go up to 4GB:
java -Xmx4000M -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
I tried to set in domain.xml file the -Xmx to 2GB:
<jvm-options>-Xmx2000m</jvm-options>
But I am getting the following error:
asadmin> start-domain
Waiting for ... to start .Error starting domain ...
The server exited prematurely with exit code 1.
Before it died, it produced the following output:
Error occurred during initialization of VM
The size of the object heap + VM data exceeds the maximum representable size
launchctl bsexec failed: Inappropriate ioctl for device
Launching the command with -v option gives this:
12 oct. 2011 11:46:34 com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: JVM invocation command line:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java
-XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=512m
-XX:NewRatio=2
-XX:+CMSClassUnloadingEnabled
-Xmx2000m
-Xms1000m
...
12 oct. 2011 11:46:35 com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 45 msec.
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
Command start-domain failed.
I found the problem. For some reasons which I do not understand, the "-d32" argument was passed in the command, asking to start in 32 bits mode. When adding
<jvm-options>-d64</jvm-options>
to the domain.xml file, glassfish starts. Please note that this option is not present by default in the file.
you must be using a different Java install when doing the "-version" and from within GlassFish. I can reproduce the same error with the default "java" in Mac OS' path but not when using an absolute path :
% /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Xmx2300m -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-383-11A511)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-383, mixed mode)
% java -Xmx2300m -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
Could it be that you don't have enough disk space on your system? Reserving 4GB of RAM may require MAC OS to expand swap space, and you may not have the disk space to do this. Unfortunately, this has burned me before :-/