SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    813
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Tomcat 6 -- need alternate port no., can't use 8080....

    why is there no J2EE forum?????????

    I just installed Tomcat 6 on Windows XP, can't run on port 8080 because another server on the same machine is using that...

    what other port(s) can I use?

    I mean for this setting....

    Code:
     <Connector port="8080" protocol="HTTP/1.1" 
                   connectionTimeout="20000" 
                   redirectPort="8443" />

    (and there are other port-settings too.. do I need to change those also? like

    Code:
      <!-- Define an AJP 1.3 Connector on port 8009 -->
        <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
    and

    Code:
    <Server port="8005" shutdown="SHUTDOWN">
    I set up necessary env vars (JAVA_HOME, CATALINA_HOME), and java/bin is already in the path.. have done Tomcat setup many times before, but now just need to know on what alternate port no. I can run it..

    for this setting, Connector port="8080", tired port no. 8181... but Tomcat won't start up (console appears very briefly then disappears when I hit that startup.bat....)

    thank you....

  2. #2
    Barefoot on the Moon! silver trophy Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,606
    Mentioned
    56 Post(s)
    Tagged
    1 Thread(s)
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  3. #3
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,624
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Run it from the command line to see the error message, or look in the logs folder, tomcat will tell you what the issue is.

    Run netstat -a to see what is listening on your server there.

    IIRC you just need to change the first one, you probably aren't running ajp.

  4. #4
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    813
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    well, the "issue" was I just needed to know WHAT no. to use for port, since couldn't use 8080.. so read solution other person posted, last night at home.. so just for the hell of it, tried it at home, changed to port 8007, it worked fine.. but here, did the same, thing, changed port to 8007, Tomcat won't start up, so following yr suggestion navigated to tomcat/bin/ in DOS shell and ran startup.bat from there, got the following:

    Code:
    C:\Program Files\apache-tomcat-6.0.36\bin>startup.bat
    Using CATALINA_BASE:   "C:\Program Files\apache-tomcat-6.0.36\"
    Using CATALINA_HOME:   "C:\Program Files\apache-tomcat-6.0.36\"
    Using CATALINA_TMPDIR: "C:\Program Files\apache-tomcat-6.0.36\\temp"
    Using JRE_HOME:        "C:\Program Files\Java\jdk1.6.0_33\"
    Using CLASSPATH:       "C:\Program Files\apache-tomcat-6.0.36\\bin\bootstrap.jar"
    JAVA_HOME is not mentioned here.. only JRE_HOME, but I did not set that var... I set JAVA_HOME to C:\Program Files\Java\jdk1.6.0_33\

    another DOS window opened very briefly then closed... server is still not running.. have it on port 8007 now...

    thank you....

  5. #5
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,624
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Did you look at the logs?

    The doubled slash in the classpath might be a problem too.

    You might also need to run as administrator, the tomcat setup we have is on pre-modern versions of windows.

  6. #6
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    813
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    CLASSPATH is not an env var set in Windows... that's an internal Tomcat thing.. I searched for "bootstrap.jar" in all of Tomcat, found in some XML files, but nowhere with two back-slashes in front of "bootstrap.jar".. so where is that 2nd back-slash being added?

    (in all the years I've been working with Tomcat I've never set classpath env var...)

    not sure what you mean by "run as administrator".... (I do have admin privileges on this machine, but not sure what you mean..)

    thank you...

  7. #7
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,624
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Windows has UAC which prevents even administrative users from writing files in protected places.

    Looking at your paths I think I might see the problem --- try installing tomcat outside of program files and see what happens. It is probably trying to write log files there and dying.

  8. #8
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    813
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    oh man.... thank you for yr response.. now am running it on c: drive... this is what I get when run startup.bat in DOS shell:

    C:\apache-tomcat-6.0.36\bin>startup.bat
    Using CATALINA_BASE: "C:\apache-tomcat-6.0.36\"
    Using CATALINA_HOME: "C:\apache-tomcat-6.0.36\"
    Using CATALINA_TMPDIR: "C:\apache-tomcat-6.0.36\\temp"
    Using JRE_HOME: "C:\Program Files\Java\jdk1.6.0_33\"
    Using CLASSPATH: "C:\apache-tomcat-6.0.36\\bin\bootstrap.jar"
    C:\apache-tomcat-6.0.36\bin>


    there is **some** improvement, as I still see the console appear briefly and disappear, but it stays open a bit longer...;-) in a about a sec. it closes..

    thank you..

  9. #9
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,624
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    You should have a log in the c:\apache-tomcat-6.0.36\log folder, probably could help alot here.

  10. #10
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    813
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    oh man.. the logs dir is EMPTY....

    hmmm...

    thank you...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •