[Bukkit Error] Need Help With an Error

Discussion in 'Bukkit Help' started by Nentify, Dec 22, 2011.

Thread Status:
Not open for further replies.
  1. OS: centos-5.4-x86_64-standard
    CB: #1611
    Hosted on: VPS

    I've tried rebooting the VPS, and changing the memory a bit, but I should have enough memory to run it, right?

    When I use ./start.sh, I get the following errors:

    Code:
    java.io.IOException: Cannot run program "sh": java.io.IOException: error=12, Cannot allocate memory
            at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
            at java.lang.Runtime.exec(Runtime.java:610)
            at java.lang.Runtime.exec(Runtime.java:483)
            at jline.UnixTerminal.exec(UnixTerminal.java:297)
            at jline.UnixTerminal.exec(UnixTerminal.java:282)
            at jline.UnixTerminal.stty(UnixTerminal.java:273)
            at jline.UnixTerminal.initializeTerminal(UnixTerminal.java:77)
            at jline.Terminal.setupTerminal(Terminal.java:75)
            at jline.Terminal.getTerminal(Terminal.java:26)
            at jline.ConsoleReader.<init>(ConsoleReader.java:191)
            at jline.ConsoleReader.<init>(ConsoleReader.java:186)
            at jline.ConsoleReader.<init>(ConsoleReader.java:174)
            at net.minecraft.server.MinecraftServer.<init>(MinecraftServer.java:84)
            at net.minecraft.server.MinecraftServer.main(MinecraftServer.java:576)
            at org.bukkit.craftbukkit.Main.main(Main.java:134)
    Caused by: java.io.IOException: java.io.IOException: error=12, Cannot allocate memory
            at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
            at java.lang.ProcessImpl.start(ProcessImpl.java:81)
            at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
            ... 14 more
    
    Mr run.sh file contains:
    Code:
    #!/bin/sh
    java -Xmx3600M -Xincgc -jar craftbukkit.jar
    My memory:
    Code:
    http://screensnapr.com/v/lMk09j.png
    All help is greatly appreciated! Thanks in advance!
    Luke
     
  2. Offline

    pyraetos

  3. Offline

    TnT

    What is the output of your
    Code:
    java -version
    command?
     
  4. OpenJDK Runtime Environment (IcedTea6 1.9.10) (rhel-1.23.1.9.10.el5_7-x86_64)
    OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

    ..Bump >_<

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 22, 2016
  5. Offline

    TnT

    Try simply this, from my research, it should work.
    Code:
    #!/bin/bash
    java -Xincgc -Xmx1G -jar craftbukkit.jar
    
    I've seen this error before, its always when people use OpenJDK (it shouldn't be a problem, but its the only common denominator I've seen). You can try using Oracle Java instead.
     
  6. Hmm, I'll try it out, thanks.
    Should it be #!/bin/bash or #!/bin/sh?
     
  7. Offline

    TnT

    I tend to write my scripts to be bash scripts, but you can use #!/bin/sh instead. It will not make a difference.
     
  8. Okay, thanks. All seems to be working, is 1G the most RAM I will be able to hold?
     
  9. Offline

    TnT

    Well, no, you shouldn't be constrained to 1GB with an x64 Java. However, for whatever reason, your OpenJDK doesn't like to allocate more. While I'm sure there is a fix for this, I do not know it. :( Might be worth a shot to re-install OpenJDK.

    Or try installing Oracle Java (1.7.x) and then try your original line again.
     
  10. Mmm, I need to find a way to increase this, or, is Oracle Java 1.7.x as reliable as OpenJDK?
     
  11. Offline

    TnT

    Minecraft.net itself recommends using Oracle Java. This recommendation does not change when using CraftBukkit.

    I find it very reliable. I run Oracle Java 1.7 on my Ubuntu CraftBukkit servers.
     
  12. How would I go about downloading Oracle Java 1.7?
     
  13. Offline

    pyraetos

Thread Status:
Not open for further replies.

Share This Page