You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2009/11/20 00:04:04 UTC

DO NOT REPLY [Bug 48244] New: Socket Server configuration does not handle not reverse DNS resolvable hosts

https://issues.apache.org/bugzilla/show_bug.cgi?id=48244

           Summary: Socket Server configuration does not handle not
                    reverse DNS resolvable hosts
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Other
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: mfarver@mindbent.org


2009-11-19 16:22:06,955 () SocketServer [INFO]  - Listening on port 514
2009-11-19 16:22:06,960 () SocketServer [INFO]  - Waiting to accept a new
client.
2009-11-19 16:22:37,632 () SocketServer [INFO]  - Connected to client at
/10.16.1.16
2009-11-19 16:22:37,632 () SocketServer [INFO]  - Locating configuration file
for /10.16.1.16
2009-11-19 16:22:37,633 () SocketServer [WARN]  - Could not find config file
[/opt/log4j-server/etc/servers/.lcf].


It seems like this code needs to realize when it gets a blank response back for
the hostname and maybe use the IP in the config filename instead.

--snip--
LoggerRepository configureHierarchy(InetAddress inetAddress) {
  cat.info("Locating configuration file for "+inetAddress);
  // We assume that the toSting method of InetAddress returns is in
  // the format hostname/d1.d2.d3.d4 e.g. torino/192.168.1.1
    String s = inetAddress.toString();
    int i = s.indexOf("/");
    if(i == -1) {
      cat.warn("Could not parse the inetAddress ["+inetAddress+
           "]. Using default hierarchy.");
      return genericHierarchy();
    } else {
      String key = s.substring(0, i);
-----
Also, is it more correct to use InetAddress.getHostname and getHostAddress
instead of parsing the .toString output?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 48244] Socket Server configuration does not handle not reverse DNS resolvable hosts

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48244

--- Comment #1 from Mark Farver <mf...@mindbent.org> 2009-11-20 12:15:54 UTC ---
Created an attachment (id=24574)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24574)
Proposed patch, fails back to IP in config file name if hostname not available.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 48244] Socket Server configuration does not handle not reverse DNS resolvable hosts

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48244

Mark Farver <mf...@mindbent.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #24574|0                           |1
        is obsolete|                            |

--- Comment #2 from Mark Farver <mf...@mindbent.org> 2009-11-20 12:18:08 UTC ---
Created an attachment (id=24575)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24575)
Previous patch had some garbage diff info in it

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org