Results 1 to 4 of 4

Thread: Fun with DNS and Java

  1. #1
    Join Date
    Jun 2006
    Posts
    3
    Rep Power
    9

    Default Fun with DNS and Java

    Sorry, I know this is a horrible venue for a DNS howto, but I'm stumped.
    On SuSE 10.0, most recent installer.
    Code:
    Installing packages
    
        zimbra-core......zimbra-core-3.1.4_GA_518.SuSE10-20060626141957.i386.rpm...done
        zimbra-ldap......zimbra-ldap-3.1.4_GA_518.SuSE10-20060626141957.i386.rpm...done
        zimbra-logger......zimbra-logger-3.1.4_GA_518.SuSE10-20060626141957.i386.rpm...done
        zimbra-mta......zimbra-mta-3.1.4_GA_518.SuSE10-20060626141957.i386.rpm...done
        zimbra-snmp......zimbra-snmp-3.1.4_GA_518.SuSE10-20060626141957.i386.rpm...done
        zimbra-store......zimbra-store-3.1.4_GA_518.SuSE10-20060626141957.i386.rpm...done
        zimbra-apache......zimbra-apache-3.1.4_GA_518.SuSE10-20060626141957.i386.rpm...done
        zimbra-spell......zimbra-spell-3.1.4_GA_518.SuSE10-20060626141957.i386.rpm...done
    java.net.UnknownHostException: zimbra: zimbra
            at java.net.InetAddress.getLocalHost(InetAddress.java:1308)
            at com.zimbra.cs.localconfig.LC.(LC.java:194)
            at com.zimbra.cs.localconfig.KnownKey.(KnownKey.java:39)
            at com.zimbra.cs.localconfig.LocalConfig.verify(LocalConfig.java:337)
            at com.zimbra.cs.localconfig.LocalConfig.(LocalConfig.java:185)
            at com.zimbra.cs.localconfig.LocalConfig.readConfig(LocalConfig.java:360)
            at com.zimbra.cs.localconfig.LocalConfig.(LocalConfig.java:365)
            at com.zimbra.cs.localconfig.Main.main(Main.java:116)
    java.net.UnknownHostException: zimbra: zimbra
            at java.net.InetAddress.getLocalHost(InetAddress.java:1308)
            at com.zimbra.cs.localconfig.LC.(LC.java:194)
            at com.zimbra.cs.localconfig.KnownKey.(KnownKey.java:39)
            at com.zimbra.cs.localconfig.LocalConfig.verify(LocalConfig.java:337)
            at com.zimbra.cs.localconfig.LocalConfig.(LocalConfig.java:185)
            at com.zimbra.cs.localconfig.LocalConfig.readConfig(LocalConfig.java:360)
            at com.zimbra.cs.localconfig.LocalConfig.(LocalConfig.java:365)
            at com.zimbra.cs.localconfig.Main.main(Main.java:116)
    java.net.UnknownHostException: zimbra: zimbra
            at java.net.InetAddress.getLocalHost(InetAddress.java:1308)
            at com.zimbra.cs.localconfig.LC.(LC.java:194)
            at com.zimbra.cs.localconfig.KnownKey.(KnownKey.java:39)
            at com.zimbra.cs.localconfig.LocalConfig.verify(LocalConfig.java:337)
            at com.zimbra.cs.localconfig.LocalConfig.(LocalConfig.java:185)
            at com.zimbra.cs.localconfig.LocalConfig.readConfig(LocalConfig.java:360)
            at com.zimbra.cs.localconfig.LocalConfig.(LocalConfig.java:365)
            at com.zimbra.cs.localconfig.Main.main(Main.java:116)
    java.net.UnknownHostException: zimbra: zimbra
            at java.net.InetAddress.getLocalHost(InetAddress.java:1308)
            at com.zimbra.cs.localconfig.LC.(LC.java:194)
            at com.zimbra.cs.localconfig.KnownKey.(KnownKey.java:39)
            at com.zimbra.cs.localconfig.LocalConfig.verify(LocalConfig.java:337)
            at com.zimbra.cs.localconfig.LocalConfig.(LocalConfig.java:185)
            at com.zimbra.cs.localconfig.LocalConfig.readConfig(LocalConfig.java:360)
            at com.zimbra.cs.localconfig.LocalConfig.(LocalConfig.java:365)
            at com.zimbra.cs.localconfig.Main.main(Main.java:116)
    Operations logged to /tmp/zmsetup.log.2373
    Setting defaults...java.net.UnknownHostException: zimbra: zimbra
            at java.net.InetAddress.getLocalHost(InetAddress.java:1308)
            at com.zimbra.cs.localconfig.LC.(LC.java:194)
            at com.zimbra.cs.localconfig.KnownKey.(KnownKey.java:39)
            at com.zimbra.cs.localconfig.LocalConfig.verify(LocalConfig.java:337)
            at com.zimbra.cs.localconfig.LocalConfig.(LocalConfig.java:185)
            at com.zimbra.cs.localconfig.LocalConfig.readConfig(LocalConfig.java:360)
            at com.zimbra.cs.localconfig.LocalConfig.(LocalConfig.java:365)
            at com.zimbra.cs.localconfig.Main.main(Main.java:116)
    java.net.UnknownHostException: zimbra: zimbra
            at java.net.InetAddress.getLocalHost(InetAddress.java:1308)
            at com.zimbra.cs.localconfig.LC.(LC.java:194)
            at com.zimbra.cs.localconfig.KnownKey.(KnownKey.java:39)
            at com.zimbra.cs.localconfig.LocalConfig.verify(LocalConfig.java:337)
            at com.zimbra.cs.localconfig.LocalConfig.(LocalConfig.java:185)
            at com.zimbra.cs.localconfig.LocalConfig.readConfig(LocalConfig.java:360)
            at com.zimbra.cs.localconfig.LocalConfig.(LocalConfig.java:365)
            at com.zimbra.cs.localconfig.Main.main(Main.java:116)
    java.net.UnknownHostException: zimbra: zimbra
            at java.net.InetAddress.getLocalHost(InetAddress.java:1308)
            at com.zimbra.cs.localconfig.LC.(LC.java:194)
            at com.zimbra.cs.localconfig.KnownKey.(KnownKey.java:39)
            at com.zimbra.cs.localconfig.LocalConfig.verify(LocalConfig.java:337)
            at com.zimbra.cs.localconfig.LocalConfig.(LocalConfig.java:185)
            at com.zimbra.cs.localconfig.LocalConfig.readConfig(LocalConfig.java:360)
            at com.zimbra.cs.localconfig.LocalConfig.(LocalConfig.java:365)
            at com.zimbra.cs.localconfig.Main.main(Main.java:116)
    No results returned for A lookup of zimbra.thehunter.homelinux.net
    Checked nameservers:
            192.168.0.1
    
    
    DNS ERROR resolving zimbra.thehunter.homelinux.net
    It is suggested that the hostname be resolveable via DNS
    Change hostname [Yes]
    Running the following in a JRE I installed for testing (then removed)
    Code:
    import java.net.*;
    
    public class host
    {
      public static void main(String[] argv) {
       try
       {
            java.net.InetAddress localMachine = java.net.InetAddress.getLocalHost("zimbra");
            System.out.println ("IP of local machine: " + localMachine.getHostAddress());
        } catch(java.net.UnknownHostException uhe)
        {
            //handle exception
        }
       }
    }
    returns
    Code:
    IP of local machine: 192.168.0.11
    Here's the DNS stuff:
    Code:
    zimbra:~/src # cat /etc/hosts
    127.0.0.1       localhost.localdomain localhost
    192.168.0.11       zimbra.thehunter.homelinux.net zimbra
    zimbra:~/src # dig zimbra
    
    ; <<>> DiG 9.3.1 <<>> zimbra
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53312
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;zimbra.                                IN      A
    
    ;; ANSWER SECTION:
    zimbra.                 0       IN      A       192.168.0.11
    
    ;; Query time: 8 msec
    ;; SERVER: 192.168.0.1#53(192.168.0.1)
    ;; WHEN: Fri Jun 30 16:20:06 2006
    ;; MSG SIZE  rcvd: 40
    
    zimbra:~/src # dig MX zimbra
    
    ; <<>> DiG 9.3.1 <<>> MX zimbra
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2633
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;zimbra.                                IN      MX
    
    ;; ANSWER SECTION:
    zimbra.                 0       IN      MX      1 zimbra.thehunter.homelinux.net.
    
    ;; Query time: 2 msec
    ;; SERVER: 192.168.0.1#53(192.168.0.1)
    ;; WHEN: Fri Jun 30 16:20:10 2006
    ;; MSG SIZE  rcvd: 70
    
    zimbra:~/src # dig zimbra.thehunter.homelinux.net
    
    ; <<>> DiG 9.3.1 <<>> zimbra.thehunter.homelinux.net
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38580
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;zimbra.thehunter.homelinux.net.        IN      A
    
    ;; ANSWER SECTION:
    zimbra.thehunter.homelinux.net. 0 IN    A       192.168.0.11
    
    ;; Query time: 2 msec
    ;; SERVER: 192.168.0.1#53(192.168.0.1)
    ;; WHEN: Fri Jun 30 16:20:27 2006
    ;; MSG SIZE  rcvd: 64
    
    zimbra:~/src # dig MX zimbra.thehunter.homelinux.net
    
    ; <<>> DiG 9.3.1 <<>> MX zimbra.thehunter.homelinux.net
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8154
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;zimbra.thehunter.homelinux.net.        IN      MX
    
    ;; ANSWER SECTION:
    zimbra.thehunter.homelinux.net. 0 IN    MX      1 zimbra.thehunter.homelinux.net.
    
    ;; Query time: 2 msec
    ;; SERVER: 192.168.0.1#53(192.168.0.1)
    ;; WHEN: Fri Jun 30 16:20:33 2006
    ;; MSG SIZE  rcvd: 94
    
    zimbra:~/src # dig MX thehunter.homelinux.net
    
    ; <<>> DiG 9.3.1 <<>> MX thehunter.homelinux.net
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48574
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
    
    ;; QUESTION SECTION:
    ;thehunter.homelinux.net.       IN      MX
    
    ;; ANSWER SECTION:
    thehunter.homelinux.net. 0      IN      MX      50 zimbra.thehunter.homelinux.net.
    
    ;; ADDITIONAL SECTION:
    zimbra.thehunter.homelinux.net. 0 IN    A       192.168.0.11
    
    ;; Query time: 2 msec
    ;; SERVER: 192.168.0.1#53(192.168.0.1)
    ;; WHEN: Fri Jun 30 16:21:08 2006
    ;; MSG SIZE  rcvd: 103
    $10,000 dollars to anyone that can tell me why the zimbra JRE can't find my hostname :-)

    (not really, but I will be very grateful.)

    EDIT:
    P.S. ip address of the zimbra machine is 192.168.0.11

    2nd EDIT:
    found this http://www.zimbra.com/forums/showthread.php?t=480
    simply doing an ./install.sh -u and then restarting the script to install again doesn't work.
    Last edited by orion2012; 06-30-2006 at 11:54 AM.

  2. #2
    Join Date
    Jun 2006
    Posts
    3
    Rep Power
    9

    Default

    Utterly weird, I reinstalled the domU (yup, Xen) to FC4 with the exact same DNS/host configuration and it worked. Same results from dig as before, simply minus the apparently strange Java behavior of SuSE.

  3. #3
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    21

    Default

    Hi and welcome to the forums,
    Sorry to see you're having problems.
    I have a couple of questions for you:
    1) is 192.168.0.1 an actual DNS server, or does it forward requests to another DNS server?
    2) could you run a
    >dig zimbra.thehunter.homelinux.net
    I'd like to see how it responds to the FQDN

    I'm not quite sure this is related to your code. I think it's a DNS issue.

    Should this server be publicly reachable? If so, then I fear you do have a problem with DNS. Here is what returned when I tried to lookup your FQDN:
    How I am searching:
    Code:
    Searching for zimbra.thehunter.homelinux.net A record at d.root-servers.net [128.8.10.90]: Got referral to G.GTLD-SERVERS.net. [took 7 ms]
    Searching for zimbra.thehunter.homelinux.net A record at G.GTLD-SERVERS.net. [192.42.93.30]: Got referral to ns.dyndns.org. [took 88 ms]
    Searching for zimbra.thehunter.homelinux.net A record at ns.dyndns.org. [63.208.196.90]: Reports that no A records exist. [took 27 ms]
     
    Answer:
    No A records exist for zimbra.thehunter.homelinux.net. [Neg TTL=1800 seconds]
     
    Details:
    ns.dyndns.org. (an authoritative nameserver for homelinux.net.) says that there are no A records for zimbra.thehunter.homelinux.net.
    The E-mail address in charge of the homelinux.net. zone is: hostmaster@dyndns.org.
    So, if I get the error, it's likely the installer will too.
    Thanks
    john

  4. #4
    Join Date
    Jun 2006
    Posts
    3
    Rep Power
    9

    Default

    No, it's intranet only server. Mail is forwarded via an external MTA and delivered via fetchmail, although addressing directly to user@thehunter.homelinux.net also works. I'm using zimbra as a plush MUA/hub for a real domain hosted elsewhere. Works fine with FC4. If you'll re-read my first post, I posted the dig results.

Similar Threads

  1. Replies: 32
    Last Post: 06-18-2010, 12:47 AM
  2. Fedora 5: Could not create the Java virtual machine
    By mi2enno in forum Installation
    Replies: 6
    Last Post: 06-01-2007, 04:16 AM
  3. Mac OSX install: Java errors & LDAP CA error
    By jefbear in forum Installation
    Replies: 9
    Last Post: 12-16-2006, 03:39 PM
  4. Replies: 0
    Last Post: 12-04-2005, 02:34 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
  •