Bug 198810 - unable to change listen address of admin server
Summary: unable to change listen address of admin server
Alias: None
Product: 389
Classification: Retired
Component: Admin   
(Show other bugs)
Version: 1.0
Hardware: i686 Linux
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
Depends On:
Blocks: 152373 240316 FDS1.1.0
TreeView+ depends on / blocked
Reported: 2006-07-13 18:57 UTC by Johannes Russek
Modified: 2015-12-07 16:35 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-12-07 16:35:09 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to bind to the IP address (1.54 KB, patch)
2006-07-13 21:03 UTC, Rob Crittenden
no flags Details | Diff

Description Johannes Russek 2006-07-13 18:57:40 UTC
Description of problem:
the directory seems to be unable to store a different listen address for the
admin server, than the ip address of the first interface avaible.
neither can it be configured over the configuration of the admin server in the
console, nor in the directory itself.

Version-Release number of selected component (if applicable):
I'm using fedora-ds 1.0.2-1 on Fedora Core 5 (regularly updated)

How reproducible:
seems to be reproducible everytime, as i already described this problem on
#fedora-ds, where that problem could be reproduced by some users.

Steps to Reproduce:
1. open the admin console
2. open the admin server part from the server group
3. try to set any other ip than the address of your first interface
Actual results:
it doesnt work, neither if you do it the console way, nor the directory way. i
just can't set any other ip! if i try to set the listen address in the apache
config file (console.conf), it works and listens to the correct address, but the
console doesnt work anymore: it initializes and authenticates successfully, but
if i select the admin server from the server group, it says the admin server is

Expected results:
the admin server should be able to listen to any other address ip address than
just the one of the first interface avaible, and that means to ip aliases too!

Additional info:
the error messages are:
in the admin console: 

Attribute[configuration.nsserveraddress] has invalid value

and if i try to set it in the directory, i get:
Unknown Error

best regards, Johannes Russek

Comment 1 Rob Crittenden 2006-07-13 19:55:14 UTC
Ok, did a little triage on it.

The bug is in adminserver/admserv/cgi-src40/config.c in the function validate_addr()

It looks like it is trying to restrict the IP address to the hostname of the
machine (as determined by PR_GetSystemInfo()).

So the question is, do we do away with this and let the user hang themselves if
they enter the wrong address?

Comment 2 Rich Megginson 2006-07-13 20:14:42 UTC
Sounds like we should fix it to allow the user to specify any valid IP address
or hostname.  Not sure what other possible console or other code this may break

Comment 3 Johannes Russek 2006-07-13 20:45:56 UTC
i have no clue about the functions you should or shouldnt use, but what about
getifaddrs(), i think it's avaible on linux and freebsd, but i don't know how
portable and threadsafe and whatyouneed it is :)
regards, johannes russek

Comment 4 Johannes Russek 2006-07-13 20:47:27 UTC
(In reply to comment #1)

> The bug is in adminserver/admserv/cgi-src40/config.c in the function

but does this explain the error if i try to change it in the directory itself?

regards, johannes russek 

Comment 5 Rob Crittenden 2006-07-13 21:03:27 UTC
Created attachment 132402 [details]
Patch to bind to the IP address

Here is one way to do it. PR_Bind to the IP address on a random port. If the
address is valid then we should bind ok. If not it will fail. I'm not sure
whether we care *why* the bind failed but this function doesn't really have the
capability to return an error message so we're a bit limited.

Comment 7 Michael Gregg 2007-11-20 00:53:20 UTC
Set to localhost correctly.
Verified aginst:
1195517861 redhat-ds-base-8.0.0-11.el5dsrv Mon Nov 19 2007 
1195517864 redhat-ds-admin-8.0.0-1.15.el5dsrv Mon Nov 19 2007 
1195517865 redhat-ds-console-8.0.0-8.el5dsrv Mon Nov 19 2007 
1195517866 redhat-admin-console-8.0.0-9.el5dsrv Mon Nov 19 2007 

Note You need to log in before you can comment on or make changes to this bug.