Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Hudson » change to default port(I need to change the default port of Hudson -8080)
change to default port [message #1451633] Fri, 24 October 2014 04:26 Go to next message
Nimi SukumaranFriend
Messages: 35
Registered: August 2013
Location: Bangalore
Member
Hi All,

I have a requirement to run two instance of Hudson in one linux server.

First one is 2.2.1 version running with default port 8080.

I need to start another version 3.2.1 in same server with port 8081. Please help with the steps to be followed for the same.

I have read in other threads , he can change the default port in hudson.xml. But I couldnt find that file in the hudson installed directory. Please help me with this query. Thank in advance!!!!
Re: change to default port [message #1452021 is a reply to message #1451633] Fri, 24 October 2014 17:23 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
If you are running Hudson 3.2.1 in a stand alone mode (which is recommended because the bundled Jetty server is minimal and high performing for Hudson usage), you \ start Hudson with "java -jar hudson.war --httpPort=8081" to run it in port 8081.

Winston Prakash
Eclipse Hudson team
Re: change to default port [message #1452298 is a reply to message #1452021] Sat, 25 October 2014 03:42 Go to previous messageGo to next message
Nimi SukumaranFriend
Messages: 35
Registered: August 2013
Location: Bangalore
Member
Thanks Prakash.

Yeah its a standalone mode. I dont have any container installed.

Do i need to stop the the existing hudson 2.2.1 which is running with port 8080 before starting the other instance (version 3.2.1) with 8081 port ? Please confirm.
Re: change to default port [message #1452315 is a reply to message #1452298] Sat, 25 October 2014 04:23 Go to previous message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
If you are going to start 3.2.1 with "java -jar hudson.war --httpPort=8081", then you don't have to stop 2.2.1. You can access 2.2.1 with http://localhost:8080 and 3.2.1 with http://localhost:8081.

One important note, make sure they both point to two different Hudson home (by default the HUDSON_HOME is .hudson in the home folder). You want to copy hudson home to another folder and point 3.2.1 to that folder to use as Hudson home.

I usually start Hudson using a shell script something like this

#!/bin/sh -x

TIMESTAMP=`date '+%y%m%d-%H%M%S'`

mv hudson.log hudson.log_$TIMESTAMP

HUDSON_HOME="/opt/hudson/hudson_home"
HTTP_PORT=7676
PREFIX="sandbox"
HUDSON_WAR=wars/hudson.war

HTTPS_PROXY=<your HTTPS proxy>
HTTP_PROXY=<your HTTP proxy>

HEAPSPEC="-Xmx4096m -XX:MaxPermSize=256m"

java -DHUDSON_HOME=${HUDSON_HOME} -Dhttps.proxyHost=$HTTPS_PROXY -Dhttps.proxyPort=$HTTPS_PORT -Dhttp.proxyHost=$HTTP_PROXY -Dhttp.proxyPort=$HTTP_PORT $HEAPSPEC -XX:-PrintGC -XX:-PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError -jar $HUDSON_WAR --httpPort=$HTTP_PORT --prefix=$PREFIX >& hudson.log &




Winston Prakash
Eclipse Hudson team
Previous Topic:NoClassDefFoundError after successful build
Next Topic:How to test REST Client using Hudson
Goto Forum:
  


Current Time: Mon Nov 19 11:33:07 GMT 2018

Powered by FUDForum. Page generated in 0.01808 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top