OT on Tomcat and Apache

Discussion in 'Perl Misc' started by ccc31807, Mar 18, 2009.

  1. ccc31807

    ccc31807 Guest

    Not totally OT, but close.

    Building a new CGI with Perl and mod_perl, I was given a Windows
    server that runs (and is running) Tomcat. Rather than configuring
    Tomcat to run CGI, I installed Apache 2.2.11, but when I started
    Apache I got the following error message:

    <error>
    (OS 10048)Only one usage of each socket address (protocol/network
    address/port)
    is normally permitted. : make_sock: could not bind to address
    0.0.0.0:80
    no listening sockets available, shutting down
    Unable to open logs
    Note the errors or messages above, and press the <ESC> key to exit.
    </error>

    Can I run both Apache and Tomcat on port 80? This machine runs JSP
    apps so they need Tomcat.

    Does anyone have any experience running Perl scripts with Tomcat?

    Where can I get help?

    Thanks, CC.
    ccc31807, Mar 18, 2009
    #1
    1. Advertising

  2. On 2009-03-18 13:07, Chris Mattern <> wrote:
    > On 2009-03-18, ccc31807 <> wrote:
    >> Building a new CGI with Perl and mod_perl, I was given a Windows
    >> server that runs (and is running) Tomcat. Rather than configuring
    >> Tomcat to run CGI, I installed Apache 2.2.11, but when I started
    >> Apache I got the following error message:
    >>
    >><error>
    >> (OS 10048)Only one usage of each socket address (protocol/network
    >> address/port)
    >> is normally permitted. : make_sock: could not bind to address
    >> 0.0.0.0:80
    >> no listening sockets available, shutting down
    >> Unable to open logs
    >> Note the errors or messages above, and press the <ESC> key to exit.
    >></error>
    >>
    >> Can I run both Apache and Tomcat on port 80? This machine runs JSP

    >
    > No, only one thing at a time can run on port 80.


    That's not quite correct: They can both listen on port 80, *iff* they
    listen on different IP addresses. So you could have Tomcat on
    192.0.2.1:80 and Apache on 192.0.2.2:80.

    > That's what the error message is telling you. If you'll think about
    > it, it makes perfect sense. Assume the machine let you run both
    > Tomcat and Apache on port 80. In comes a connection request for port
    > 80 from another machine. Who answers: Apache or Tomcat? There is
    > absolutely no way to tell.


    Right. Either the IP address or the port number has to differ.

    If you need Apache and Tomcat for the same website, the normal way is
    let Apache listen on port 80 and pass requests to Tomcat via mod_jk.
    Using a reverse proxy should work, too.

    hp
    Peter J. Holzer, Mar 18, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christos Gravvanis
    Replies:
    0
    Views:
    2,031
    Christos Gravvanis
    Jul 7, 2004
  2. Replies:
    0
    Views:
    899
  3. twins
    Replies:
    1
    Views:
    5,831
  4. Marcin Cenkier
    Replies:
    1
    Views:
    5,386
    Marcin Cenkier
    Apr 12, 2006
  5. Andi
    Replies:
    5
    Views:
    1,317
Loading...

Share This Page