Total Pageviews

Monday, May 28, 2007

MySQL Server only accessible from localhost

Yesterday I spent some time figuring out why my MySQL Server doesn't accept remote connections anymore. I was not able to connect from any other machines in my local network except from the machine running the server (localhost).
It turns out to be a problem in the MySQL configuration file. The option bind-address was set to 127.0.0.1, which means the server was only listening locally.
The solution is to comment out the "bind-address" line and restart the server. This may be a security risk, because the server is now accessible from any host.
I assume this modification in the MySQL config file was made during a Debian update process.

Saturday, May 12, 2007

Running Confluence and Jira in the same JBoss AppServer


I recently wanted to get rid off several Standalone distributions of web applications hosted on my server at home. Each web application is using its own Tomcat Servlet container and is consuming memory and cpu due to the fact that each container is running in its own JVM.
Jira was already running on my JBoss 4.0.4GA instance and I wanted to deploy Confluence 2.5.1 in the same instance. It turns out to be not that easy, because there are a few problems with the classloading mechanism JBoss is using.
But after a few minutes I found the solution on Confluence great documentation site. The comments from Lindsay Smith and Gerald MacKenzie in this article gave me the hints about what to do to run both software products in a single JBoss instance.
Here we go (For a complete list of tasks for upgrading or installing Confluence take a look at Atlassians Homepage. The following steps describe only the procedure to build a Confluence WAR archive that is deployable in a JBoss container next to an existing JIRA WAR archive!):
  1. Unpack the new confluence WAR version in a directory called $NEW_CONFLUENCE_INSTALL_DIR
  2. Delete file: $NEW_CONFLUENCE_INSTALL_DIR/confluence/WEB-INF/classes/log4j.properties
  3. Delete file: $NEW_CONFLUENCE_INSTALL_DIR/confluence/WEB-INF/lib/commons-logging.jar
  4. Delete file: $NEW_CONFLUENCE_INSTALL_DIR/confluence/WEB-INF/lib/log4j.jar
  5. Create the file $NEW_CONFLUENCE_INSTALL_DIR/confluence/WEB-INF/jboss-web.xml with the following content
     <?xml version='1.0' encoding='UTF-8' ?><!DOCTYPE jboss-web PUBLIC-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">  
     <jboss-web>  
     <class-loading java2ClassLoadingCompliance="false">  
          <loader-repository>  
               com.example:loader=unique-archive-name         
               <loader-repository-config>  
                    java2ParentDelegation=false  
               </loader-repository-config>       
          </loader-repository>  
     </class-loading>  
     <context-root>/confluence</context-root>  
     </jboss-web>  
    
  6. Build the Confluence WAR archive using the build script.