Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having a little problem here: I got the amazon free usage tier to test it, launched a ami-465c6932 (Ubuntu 10.10 32bit iirc) on an eu west server. I installed postgresql and made sure it is persistent using an EBS. Till this point all is cool. The problem is I now need to install java (as I want to deploy a JEE app using tomcat) so I did "sudo apt-get install openjdk-6-jdk" but it froze at some point. Now after restarting it told me I need to do "sudo dpkg --configure -a" which I did. The problem is it also froze:

ubuntu:~$ sudo dpkg --configure -a
Setting up ca-certificates-java (20100412) ...
creating /etc/ssl/certs/java/cacerts...
Setting up openjdk-6-jre-headless (6b20-1.9.1-1ubuntu3) ...

And it's been like this for about 15mins now. Did i screw something up? Is there anything I can do to actually install my beloved java on that cloud?

@Edit: ok I found out it's a knows bug with the micro instance, and here's how to solve it

share|improve this question

I've hit that problem too, and my bet is that the free micro instance doesn't have enough RAM. The same installation runs just fine on a small instance.

Now, I'm not saying that those 613 MB of RAM are not enough to run Java on that instance. I think the Ubuntu packages try to start the JVM with some large heap size and that doesn't fit on the instance.

The way I run Java on micro instances is to install the JDK using the Sun (er... Oracle) package myself. Get it here and run the installation yourself. Note that you'd probably need to manually add the java binary to your PATH.

My heap size guess above comes from the fact that the instance will hang in absolutely the same way if I manually install Java and start a VM with a huge heap size (say 1 GB).

Good luck!

share|improve this answer
I usually uninstall OpenJDK and prefer to use the Oracle Java install and then update my etc-alternatives links to reference the new JDK location. – djangofan Nov 15 '11 at 23:50
@djangofan I do that too, but the trick is to use the Oracle installer (not the Ubuntu partner repo package). See above. – Hristo Deshev Nov 16 '11 at 6:35

There is a known bug with the micro instance, check

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.