Java, Error occurred during initialization of VM, Minecraft

So, you're trying to run something in java on your server and your just getting:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

Try the following from span style="text-decoration:line-through">http://linux.techzinformatica.in/?p=714:

If it is a cpanel/WHM server then add the following code in the start of the /etc/profile file. Quote:
#cPanel Added Limit Protections — BEGIN 
#unlimit so we can run the whoami
ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null

if [ -e "/usr/bin/whoami" ]; then
if [ "$LIMITUSER" != "root" ]; then
ulimit -n 100 -u 20 -m 200000 -d 200000 -s 8192 -c 200000 -v 200000 2>/dev/null
ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null
#cPanel Added Limit Protections — END

Save and exit.

Restart your profile
. /etc/profile
sudo . /etc/profile
Read More

Restoring cpanel accounts without backups (rm -Rf in root ? Silly You.)

Right, if for some reason someone managed to rm -Rf your root or etc directory,
this may help you to recover a fair amount of your cpanel files.

The process basically involves copying the old files into a new installation of cpanel (same ip as the license from the previous, or just replace the license afterwards)
Then, copying over old mysql files / folders, and using cpanel to package up what files i thinks it can find into a cpmove,
then restoring the cpmove folder back again to pull all the data back into cpanel properly.


I accidentally restored one or two of these which turned out to be old onmes, and obviously, all the old data was imported back in and overwritten the new data.
So either restore them using cpanel normally, or move the old cpbackup / move files elsewhere.

cpadduser.sh contents: (DEF$1 is the password, so for user cake, the password would become DEFcake. to manually add passwords when running the script, change DEF$1 to $2.)


set -u
if [ "$1" = "-help" ]
        echo "Use: ./cpadduser.sh username"
        /scripts/adduser "$1" /home DEF$1
        /scripts/pkgacct $1
        /scripts/restorepkg --force /home/cpmove-$1.tar.gz
        chown -R $1:nobody /home/$1
        chmod -R 0755 /home/$1/public_html
        /usr/local/cpanel/bin/rebuild_phpconf 5 none dso 1
        exit 0



use rysnc from the old home to the new home to preserve as much as possible in terms of permissions etc.
if you want secure rsync across servers, then ensure to use ssh.

e.g below:
/home/oldhomefiles is my files from home directory,
/home/otherfiles is any other files/folders that cpanel uses.
do not worry if you do not have all of the folders/files that i put in /home/otherfiles/ to sync to the new installation, i didnt have all of them either.

rsync -vrplogDtH -e ssh /home/oldhomefiles/* USER@SE.RV.ER.IP:/home
rsync -vrplogDtH -e ssh /home/otherfiles/usr/local/cpanel USER@SE.RV.ER.IP:/usr/local
rsync -vrplogDtH -e ssh /home/otherfiles/var/lib/mysql USER@SE.RV.ER.IP:/var/lib
rsync -vrplogDtH -e ssh /home/otherfiles/var/cpanel USER@SE.RV.ER.IP:/var
rsync -vrplogDtH -e ssh /home/otherfiles/usr/share/ssl USER@SE.RV.ER.IP:/usr/share
rsync -vrplogDtH -e ssh /home/otherfiles/var/ssl USER@SE.RV.ER.IP:/var
rsync -vrplogDtH -e ssh /home/otherfiles/usr/local/cpanel/3rdparty/mailman USER@SE.RV.ER.IP:/usr/local/cpanel/3rdparty
rsync -vrplogDtH -e ssh /home/otherfiles/var/log/bandwidth USER@SE.RV.ER.IP:/var/log
rsync -vrplogDtH -e ssh /home/otherfiles/usr/local/frontpage USER@SE.RV.ER.IP:/usr/local rsync -vrplogDtH -e ssh /home/otherfiles/var/spool/cron USER@SE.RV.ER.IP:/var/spool

rsync -vrplogDtH -e ssh /home/otherfiles/usr/local/apache/conf USER@SE.RV.ER.IP:/usr/local/apache
rsync -vrplogDtH -e ssh /home/otherfiles/var/named USER@SE.RV.ER.IP:/var
rsync -vrplogDtH -e ssh /home/otherfiles/root/.my.cnf USER@SE.RV.ER.IP:/root
rsync -vrplogDtH -e ssh /home/otherfiles/etc/httpd/conf/httpd.conf USER@SE.RV.ER.IP:/etc/httpd/conf

cd to the old etc directory:
cd /fhdevsda1/etc

And copy some files from here:
rsync -vrplogDtH -e ssh secondarymx domainalias valiases vfilters exim* proftpd* pure-ftpd* passwd* group* *domain* *named* wwwacct.conf cpupdate.conf quota.conf shadow* *rndc* ips* ipaddrpool* ssl hosts /etc


/scripts/mysqlup --force
/usr/local/cpanel/bin/updatephpmyadmin --force
/scripts/upcp --force


/scripts/restartsrv httpd
/scripts/restartsrv cpanel
/scripts/restartsrv mysql
/scripts/restartsrv named
/scripts/restartsrv exim


use cpadduser.sh to restore accounts.

passwords can be set by altering the cpadduser script to take a second variable for password.


If permissions are rather broken, try some / all of the following:
any directories requiring 777 (e.g. whmcs templates_c) will have to have the permissions changed back again afterwards.
cd /home 
find -perm 777 -exec chmod 755 {} \; -print
find -perm 666 -exec chmod 644 {} \; -print

Hopefully this has been of some help to some people, after spending over 19 hours solid trying to restore 120 accounts this is what i managed to come up with.
Not everything may run, some files may not be found etc, but it might get you somewhere.

I take no responsibilty for any dataloss or currupt cpanel accounts from anyone using this,
however with most people when you say "my root drive is broken, how do i restore my cpanel accounts, my backups are old / nonexistent?" they say "You Can't!"

Good luck! If anyone would like to make this process easier, or knows a way to restore account passwords, or a better way for this process, please contact me at support@ganey.co.uk.
Thanks. Read More

Dedicated Server API

The Dedicated Server API for re-installs and restarts is finally finished! Some creases may need to be ironed out in the future, but so far the scripts seem pretty solid.
Upon fresh installs the passwords are retrieved and displayed within the management panel for you. The current status of the install is also displayed (The install progress).

Hopefully some of the clients find it useful! Read More


Ace of Spades

Ace of Spades.com Is odd, 99% of the time I cannot join servers, several people are experiencing this. I have tried creating my own server in various locations, Work servers, at home, all with port forwarding only to receive "Server Connection Failed:it's either full or misconfigured." when I try to join my servers. After Googling for hours I still haven't found results. Read More


Folding@Home & FH Monitor for Rainmeter

Today i have been playing with rainmeter. I started by doing server stats for fuelledhosting. These are pulled from the server status page. The rainmeter files for these are FuelledHosting_Rainmeter.exe. I then spent several hours working on pulling folding@home stats. Team & user statistics. I eventually got this to work after repeatedly tring different code. The file can be downloaded FAH_Stats_rainmeter.zip. The files need to be put in documents/rainmeter/skins/ edit the files and change the variables as needed, then enable in rainmeter. Enjoy!
Read More

Web Barcode Login

Now have a working barcode scanner that can read the barcode of an ID card to allow users to login/checkin to a website by simply scanning thier card. Automatic Form Submission and no repeat logins for the barcode on the same day. New login data for each day happens automatically. Read More