[SOLVED] Howto: Bind to one specific IP / Listen to one IP

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Costa-101
Advanced member
Advanced member
Posts: 169
Joined: Fri Sep 12, 2014 10:16 pm

[SOLVED] Howto: Bind to one specific IP / Listen to one IP

Post by Costa-101 »

Hello all,
I am trying to make full use of the zmapache thus reducing the need to run two web servers on a single machine.
I have successfully managed to bind the webmail to IP-A.

I can also get zmapache to run on IP-B:7780 at the same time.
I am trying to use two IP address and run webmail on IP-A:80 with zmapache on IP-B:80.
However, I face the following error:
[QUOTE]

(13)Permission denied: make_sock: could not bind to address 192.168.11.100:80

no listening sockets available, shutting down

Unable to open logs

[/QUOTE]
when trying to start zmapachectl after adding:
[QUOTE]Listen IP-B:80[/QUOTE]
to the conf/httpd.conf file.
Can anyone help please?
look forward to hearing from you
Costa:D
Costa-101
Advanced member
Advanced member
Posts: 169
Joined: Fri Sep 12, 2014 10:16 pm

[SOLVED] Howto: Bind to one specific IP / Listen to one IP

Post by Costa-101 »

In reply to my last,
the reason is because you are not running the zmapache as root.
simply run
[QUOTE]sudo /opt/zimbra/httpd/bin/httpd[/QUOTE]
if you then get
[QUOTE](98)Address already in use: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

Unable to open logs[/QUOTE]
you need to edit /opt/zimbra/httpd/conf/httpd.conf
et viola
thank you
Costa:D
phoenix
Ambassador
Ambassador
Posts: 27278
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

[SOLVED] Howto: Bind to one specific IP / Listen to one IP

Post by phoenix »

You should not use the zimbra services for anything else, they won't survive an upgrade.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
Costa-101
Advanced member
Advanced member
Posts: 169
Joined: Fri Sep 12, 2014 10:16 pm

[SOLVED] Howto: Bind to one specific IP / Listen to one IP

Post by Costa-101 »

Surely just create an alias to your uniquely and highly configured httpd.conf file.
This reduces the need to use proxying which slows web access down in my experience.
Otherwise what is it there for?
JasonGarrett
Posts: 1
Joined: Fri Sep 12, 2014 10:31 pm

[SOLVED] Howto: Bind to one specific IP / Listen to one IP

Post by JasonGarrett »

[quote user="kibo"]Hello
One stupid question but somehow related! How can I force LDAP to listen on ALL the IPs instead of the one IP?
Regards

Kia[/QUOTE]


I am wondering this same thing. I need the ldap server to listen on localhost or at least the lan IP... wondering if this is possible at all.
phoenix
Ambassador
Ambassador
Posts: 27278
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

[SOLVED] Howto: Bind to one specific IP / Listen to one IP

Post by phoenix »

[quote user="JasonGarrett"]I am wondering this same thing. I need the ldap server to listen on localhost or at least the lan IP... wondering if this is possible at all.[/QUOTE]Look in bugzilla at this RFE.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
Leesbian
Posts: 26
Joined: Fri Sep 12, 2014 10:34 pm

[SOLVED] Howto: Bind to one specific IP / Listen to one IP

Post by Leesbian »

I get a strange error now that I've bound Apache and Tomcat to specific IP addresses...
My firewall blocks incoming port 7071, so I use an SSH tunnel to redirect my servers port 7071 to my localhost port 7071.
I can't access the admin interface any longer now... my browser says that it can't connect to port 7071.
I see the following error at the console on the server every time I try to connect via the browser
channel 3: open failed: connect failed: Connection refused
When I use wget or lynx from the server itself, it seems to be OK.
Any ideas? I've done some googling, and have found a few entries that mention this error with MySQL, but can't imagine its that causing it... or could it be that the admin application is now connecting to MySQL via the IP address I've hardcoded into Tomcat? and I need to change the MySQL permissions to be able to connect from this host?
vjt
Posts: 5
Joined: Fri Sep 12, 2014 10:34 pm

[SOLVED] Howto: Bind to one specific IP / Listen to one IP

Post by vjt »

thanks for your work, MrDigi, it was really useful :).
[quote user="MrDigi"]

Problems:



02-04-2007: Don't know if its really because of the settings above, but the simple Client refuses to work: (A network service error has occurred (zclient/io).



[/QUOTE]
I managed to get the simple client to work.. it fails because it connects to 127.0.0.1:80, and tomcat is (obivously) no longer listening on that address.
I tried to identify which parameter governs the destination address to which the SC connects, but I failed (any insight from a zimbra employee would be great!).
so.. i simply installed a simple connection proxy ( e.g. http://antifork.org/trac/browser/trunk/ ... format=raw ) that binds to localhost and forwards the connection to the tcp port 80 the IP I set in zimbra.web.xml.in, port 80.
obivously, it is a dirty hack, but it's effective :).
cheers,

marcello
7223robh
Posts: 32
Joined: Fri Sep 12, 2014 10:30 pm

[SOLVED] Howto: Bind to one specific IP / Listen to one IP

Post by 7223robh »

Just a quick note -
zmprov needs to be able to connect to 7071/tcp on localhost, you'll need to bear this in mind you want to do any automated account maintenance using zmprov.
Rob
User avatar
jholder
Ambassador
Ambassador
Posts: 4824
Joined: Fri Sep 12, 2014 10:00 pm

[SOLVED] Howto: Bind to one specific IP / Listen to one IP

Post by jholder »

[quote user="7223robh"]Just a quick note -
zmprov needs to be able to connect to 7071/tcp on localhost, you'll need to bear this in mind you want to do any automated account maintenance using zmprov.
Rob[/QUOTE]
Unless you specify the -l option which forces it to connect to ldap.
john
Post Reply