Results 1 to 10 of 10

Thread: Make jetty bind to a specific ip

  1. #1
    carnold is offline Advanced Member
    Join Date
    Jul 2007
    Posts
    227
    Rep Power
    7

    Default Make jetty bind to a specific ip

    We use zimbra 5 os rc1. We need to have zimbra bind to a specific ip and are following this.
    I have worked down to the tomcat section in that thread and zimbra 5 rc1 does not use tomcat, it uses jetty. So, can anyone tell me how to make jetty bind to a specific ip? I have googled and found some things but as you all know, zimbra config for jetty is quite different from others config. In the above link, i do not have a components.xconf. I do have a jetty.xml file but do not know where or if this is the file to make jetty bind to a specific ip. Any help is appreciated. We are aware that updates will wipe this "bind to a specific ip" out.

  2. #2
    carnold is offline Advanced Member
    Join Date
    Jul 2007
    Posts
    227
    Rep Power
    7

    Default

    You can make jetty bind to a specific ip, right? According to jetty doc, you can set the host listener to a specific ip but in the zimbra version of jetty, in the jetty.xml file, there is not listener. I see the jetty.properties where you can set bind addresses for pop3, lmtp, pop3ssl. Where do you make jetty bind to a specific ip?

  3. #3
    Priyantha Bleeker is offline Active Member
    Join Date
    Oct 2007
    Posts
    31
    Rep Power
    7

    Default

    Nobody here who can tell us how we can bind jetty on one IP address ?

  4. #4
    fireman949 is offline Intermediate Member
    Join Date
    Feb 2006
    Posts
    20
    Rep Power
    9

    Default Your mileage may very on this one

    I just downloaded the latest RC2 for RHEL4 : zcs-5.0.0_RC2_1745.RHEL4

    Since everything else seems to work well with my CentOS4 box, here is the mod I made to the jetty.xml config to work.

    ** Your mileage may vary and this may or may not work in the final release **

    /opt/zimbra/mailboxd/etc/jetty.xml.in

    Find the XML container that starts with <Call name="addConnector"> between the HTTPBEGIN and HTTPEND comments

    Just below the tag : <Set name="confidentialPort">%%zimbraMailSSLPort%%</Set> , insert a line with :

    <Set name="Host">your.public.ip.addy</Set>

    Then yank the entire section between HTTPBEGIN and HTTPEND and paste it below (in vi : "33G", "14yy", "46G", "p")

    Now modify the "Host" tag to have 127.0.0.1
    <Set name="Host">127.0.0.1</Set>

    You now have two connectors, one that listens on the interface IP and one that listens on the loopback (required).

    Hope that helps

  5. #5
    Priyantha Bleeker is offline Active Member
    Join Date
    Oct 2007
    Posts
    31
    Rep Power
    7

    Default

    Somebody who can tell me how I can do this with the final 5.x versions of Zimbra ?
    It isn't working here.
    I am getting these error:

    "A network service error has occurred (zclient/io)." when I try to log in to a mailbox.

  6. #6
    m-cubed is offline Junior Member
    Join Date
    Nov 2007
    Posts
    6
    Rep Power
    7

    Default

    Priyantha, it worked fine for me. The error you are getting is probably from the lack of the www server bound to the localhost. If you type netstat -lptn | grep "80" what do you get? You should see port 80 bound to the IP you configured in the step above and to 127.0.0.1. The PID for both should show java as the program controlling it.

  7. #7
    fireman949 is offline Intermediate Member
    Join Date
    Feb 2006
    Posts
    20
    Rep Power
    9

    Default

    Just a quick update on this for 5.0.4 GA:

    I had to modify one line (2 if running SSL) from the standard jetty.xml.in.

    in /opt/zimbra/mailboxd/etc/jetty.xml.in :

    Find this section :

    <!-- user services connector, no SSL -->
    <!-- HTTPBEGIN -->

    Look for this line :

    <Set name="confidentialPort">%%zimbraMailSSLPort%%</Set>

    Insert this line below it:

    <Set name="Host">10.10.52.125</Set> (where 10.10.52.125 is the primary IP of your server)

    Repeat for the SSL section with these tags (only necessary if using SSL)

    <!-- user services connector, SSL -->
    <!-- HTTPSBEGIN -->

  8. #8
    carnold is offline Advanced Member
    Join Date
    Jul 2007
    Posts
    227
    Rep Power
    7

    Default

    Quote Originally Posted by m-cubed View Post
    Priyantha, it worked fine for me. The error you are getting is probably from the lack of the www server bound to the localhost. If you type netstat -lptn | grep "80" what do you get? You should see port 80 bound to the IP you configured in the step above and to 127.0.0.1. The PID for both should show java as the program controlling it.
    OK, now after making these chnges and following:
    [SOLVED] Howto: Bind to one specific IP / Listen to one IP
    I get this error:
    A network service error has occurred (zclient/io)

    I run netstat -lptn and see my port bound to my IP but i do not see that same port bound to 127.0.0.1. What do i do to correct this?

    So, i have found that this error is a jetty thing. I can edit everything as these threads indicate but when i edit /opt/zimbra/mailboxd/etc/jetty.xml.in, this is when the above error occurs. When i make /opt/zimbra/mailboxd/etc/jetty.xml.in without <Set name="Host">10.10.52.125</Set> the web client starts working.
    Sorry, i used the post above m_cube's post to do this. I did not copy the section and insert 127.0.0.1. Now it works
    Last edited by carnold; 04-13-2008 at 06:31 PM.

  9. #9
    fireman949 is offline Intermediate Member
    Join Date
    Feb 2006
    Posts
    20
    Rep Power
    9

    Default

    Quote Originally Posted by carnold View Post
    Sorry, i used the post above m_cube's post to do this. I did not copy the section and insert 127.0.0.1. Now it works

    I do apologize, my previous post left out that important step. You do need to copy the 14 or 15 lines for HTTPBEGIN/HTTPEND and put 127.0.0.1 in the <Set name="Host"></Set> tags so you have two containers.. one for the public IP and one for 127.0.0.1

  10. #10
    bonadio is offline Loyal Member
    Join Date
    Oct 2007
    Location
    Brazil
    Posts
    88
    Rep Power
    7

    Default

    Take a look here
    Zimbra 5.0 RC1 http jetty binding to IP on Server to multiple IPs

    I have it bind to one IP with no problem

    []s

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 32
    Last Post: 03-18-2011, 11:03 AM
  2. Tomcat listen specific IP address
    By bibo in forum Administrators
    Replies: 2
    Last Post: 07-09-2007, 01:13 PM
  3. Ability to designate an IP Address
    By Isi in forum Administrators
    Replies: 18
    Last Post: 05-22-2007, 03:45 AM
  4. Replies: 2
    Last Post: 05-10-2007, 05:45 PM
  5. Views on Public vs. NAT'd IP and Bind
    By LMStone in forum Administrators
    Replies: 5
    Last Post: 10-12-2006, 02:28 PM

Posting Permissions

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