Oracle XE and Hudson Co-Existence
By Duncan Mills-Oracle on Feb 02, 2012
A small roadblock that hit me this morning that is worth documenting if only for my own reference. I run my main Hudson install on my Linux server somewhere in the wilds(?) of Texas, however, I wanted to check something out with Hudson as a Windows service, something which I've not done for a few months.
Starting Hudson with java -jar hudson-2.2.0.war however failed with a port bind error. It seems that port 8080 was in use. I was a bit confused because I didn't have an Apache, Tomcat or OC4J running at that address, something else, something new, had grabbed the port. Fortunately, as ever, I had TCPview installed and that quickly showed me that the owning process was the TNS Listener process from my newly installed Oracle XE 11g edition.
Now I could have simply booted Hudson on a different port using the --httpPort argument, however, the chances are that I will be wanted to start other stuff on 8080 as well so XE had to be kicked off of that port for it's HTTP listener. This is done quickly, and without any re-starting, from SQLPlus:
c:>sqlplus Enter user-name: system Enter password: Connected to: Oracle Database 11g Express Edition Release 18.104.22.168.0 - Production SQL> begin 2 dbms_xdb.sethttpport('8282'); 3 end; 4 / PL/SQL procedure successfully completed. SQL> exit Disconnected from Oracle Database 11g Express Edition Release 22.214.171.124.0 - Production
Short and sweet, Oracle now sits on 8282 and 8080 is free for Hudson.