Bug 198810 - unable to change listen address of admin server
unable to change listen address of admin server
Status: CLOSED CURRENTRELEASE
Product: 389
Classification: Community
Component: Admin (Show other bugs)
1.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Rich Megginson
Viktor Ashirov
:
Depends On:
Blocks: 152373 240316 FDS1.1.0
  Show dependency treegraph
 
Reported: 2006-07-13 14:57 EDT by Johannes Russek
Modified: 2015-12-07 11:35 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-07 11:35:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 17:03 EDT, Rob Crittenden
no flags Details | Diff

  None (edit)
Description Johannes Russek 2006-07-13 14:57:40 EDT
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
DOWN.

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 15:55:14 EDT
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 16:14:42 EDT
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
though.
Comment 3 Johannes Russek 2006-07-13 16:45:56 EDT
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 16:47:27 EDT
(In reply to comment #1)

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

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 17:03:27 EDT
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-19 19:53:20 EST
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.