Tomcat7 missing fonts

I recently migrated my tomcat7 server to a new esxi server and had the following issue:

Caused by: java.lang.Error: Probable fatal error:No fonts found.

There are a few explanations found on the web:

  1. Tomcat is running headless. Add this -Djava.awt.headless to /etc/init.d/tomcat7. Checked, was there already so this is not the cause.
  2. Add missing fonts: apt-get install msttcorefonts This also didn’t fix the problem
  3. Used Sun Java. Hmmm, indeed I just installed tomcat and let the dependencies automatically install. Should have used the sun java.
  4. One more fix: apt-get install ttf-dejavu

Ok, installing the ttf-dejavu fixed the issue!

Next time I will make sure not to use the open-jdk but the sun-jdk to prevent this issue.

Setting up ssl Subversion Mirror on Ubuntu 12.04

These are some quick notes on how to setup a subversion mirror on ubuntu 12.04

First install apache2, subversion and the binding

apt-get install apache2
apt-get install subversion
apt-get install libapache2-svn

create dir /etc/apache2/ssl and copy you ssl files to this folder.

Update /etc/apache2/sites-available/default-ssl or create a new site.

Make these changes to the site config.

SSLCertificateFile /etc/apache2/ssl/
SSLCertificateKeyFile /etc/apache2/ssl/
SSLCertificateChainFile /etc/apache2/ssl/gd_bundle.crt

Enable ssl module, the ssl site and then restart apache2:

a2enmod ssl
a2ensite default-ssl
service apache2 restart

Now you should ssl working and it is time to add the subversion proxy.

Add the proxy module to apache2:

a2enmod proxy
a2enmod proxy_http
a2enmod rewrite

Update default-sll, after ServerName add

       SSLProxyEngine on

Before BrowserMatch add:

       SSLProtocol -ALL +SSLv3

    <Location /svn>
        DAV svn
        SVNParentPath /www1/svn
        SVNMasterURI https://masterip/svn
        AuthType Basic
        AuthName "Subversion repository"
        AuthUserFile /www1/etc/local-authentication
        Require valid-user

Proxy for a Trac instance:

    ProxyPass /trac https://masterip/trac
    ProxyPassReverse /trac https://masterip/trac

Make sure you proxy https to https. Mixing http and https will cause problem later on when performing copies in subversion commits and they will fail.