Tenzer
Member since: 2011-05-25 15:56
|
Added: 2011-05-25 16:02
|
Hi
I am testing out Eagle DNS 1.1.1, and trying to put some test data into a MySQL database with the records, but I can't seem to get any MX records to work. Could somebody provide and example of the data I should use for an MX record?
Whenever I have added an MX record to the database and to a reload of the records, I get an exception such as this one:
[ERROR] [2011-05-25] [15:55:02] DBZoneProvider.getPrimaryZones Unable to parse zone testzone.com.
org.xbill.DNS.Tokenizer$TokenizerException: <none>:1: expected an integer
at org.xbill.DNS.Tokenizer.exception(Tokenizer.java:691)
at org.xbill.DNS.Tokenizer.getLong(Tokenizer.java:409)
at org.xbill.DNS.Tokenizer.getUInt16(Tokenizer.java:443)
at org.xbill.DNS.U16NameBase.rdataFromString(U16NameBase.java:46)
at org.xbill.DNS.Record.fromString(Record.java:477)
at org.xbill.DNS.Record.fromString(Record.java:500)
at se.unlogic.eagledns.zoneproviders.db.beans.DBRecord.getRecord(DBRecord.java:177)
at se.unlogic.eagledns.zoneproviders.db.beans.DBZone.getRecordArray(DBZone.java:417)
at se.unlogic.eagledns.zoneproviders.db.beans.DBZone.toZones(DBZone.java:358)
at se.unlogic.eagledns.zoneproviders.db.DBZoneProvider.getPrimaryZones(DBZoneProvider.java:103)
at se.unlogic.eagledns.EagleDNS.reloadZones(EagleDNS.java:805)
at se.unlogic.eagledns.plugins.SystemInterfaceWrapper.reloadZones(SystemInterfaceWrapper.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
This is when using data such as:
recordID: 89
zoneID: 1
name: @
type: MX
content: mail.testzone.com.
ttl: 10800
dclass: IN
Am I doing something wrong, or is there a bug regarding MX records? I can't see how I can set a priority for each MX record with the database scheme provided - not that I need it, since I only want one MX record, but still a curiosity. |
Unlogic
Member since: 2008-01-27 20:43
|
Added: 2011-05-31 09:06
|
Hi Tenzer, MX records are very well tested and work fine. Here is an example of the MX records with priority that I use for unlogic.se:
SELECT * FROMrecords WHERE zoneID = 3 and type = "MX";
33, 3, '@', 'MX', '10 ASPMX.L.GOOGLE.COM.', , 'IN'
34, 3, '@', 'MX', '20 ALT1.ASPMX.L.GOOGLE.COM.', , 'IN'
35, 3, '@', 'MX', '20 ALT2.ASPMX.L.GOOGLE.COM.', , 'IN'
36, 3, '@', 'MX', '30 ASPMX2.GOOGLEMAIL.COM.', , 'IN'
37, 3, '@', 'MX', '30 ASPMX3.GOOGLEMAIL.COM.', , 'IN'
38, 3, '@', 'MX', '30 ASPMX4.GOOGLEMAIL.COM.', , 'IN'
39, 3, '@', 'MX', '30 ASPMX5.GOOGLEMAIL.COM.', , 'IN'
However I have seen the error your getting before I just can't remeber where and when. If I'm not mistaken it was a simple typo somewhere that caused it. If you send me a database dump of your zone and record tables I'll debug it for you. |
Tenzer
Member since: 2011-05-25 15:56
|
Added: 2011-05-31 10:30
|
Ah, it was just a matter of finding out the content field should be "<priority> <hostname>" I was missing. Thank you.
Regarding the error I was getting: I only got that after I had tried to create an MX record with only the hostname of the mail server in the content field. This of course fails with "expected an integer" because it tries to find the priority from the beginning of the string "mail.testzone.com.".
I have added an MX record to my test zone now, and it works with no errors during reload. |
Unlogic
Member since: 2008-01-27 20:43
|
Added: 2011-05-31 11:08
|
Great that it's working for you now!
I'll see if I can add a better error message for this problem in Eagle DNS 1.1.2. |
Tenzer
Member since: 2011-05-25 15:56
|
Added: 2011-05-31 11:54
|
I would rather suggest adding examples of how records should be defined in the database to the documentation. I have assembled a small list of the most common record types for my own use:
NS records:
INSERT INTO records SET zoneID = 1, name = "@", type = "NS", content = "ns1.somedomain.com.", ttl = 10800, dclass = "IN";
A records:
INSERT INTO records SET zoneID = 1, name = "@", type = "A", content = "1.2.3.4", ttl = 10800, dclass = "IN";
INSERT INTO records SET zoneID = 1, name = "mail", type = "A", content = "2.3.4.5", ttl = 10800, dclass = "IN";
CNAME records:
INSERT INTO records SET zoneID = 1, name = "www", type = "CNAME", content = "somedomain.com.", ttl = 10800, dclass = "IN";
MX records:
INSERT INTO records SET zoneID = 1, name = "@", type = "MX", content = "10 mail.somedomain.com.", ttl = 10800, dclass = "IN";
PRT records:
INSERT INTO records SET zoneID = 2, name = 4, type = "PTR", content = "somedomain.com.", ttl = 10800, dclass = "IN";
And then examples of adding matching zones:
INSERT INTO zones SET zoneID = 1, name = "somedomain.com.", dclass = "IN", primaryDNS = "ns1.somedomain.com.", adminEmail = "hostmaster.somedomain.com.", serial = 2011053101, refresh = 10800, retry = 3600, expire = 1209600, minimum = 3600, secondary = 0, ttl = 10800, downloaded = NULL, autoGenerateSerial = 1, enabled = 1;
INSERT INTO zones SET zoneID = 2, name = "3.2.1.in-addr.arpa.", dclass = "IN", primaryDNS = "ns1.somedomain.com.", adminEmail = "hostmaster.somedomain.com.", serial = 2011053101, refresh = 10800, retry = 3600, expire = 1209600, minimum = 3600, secondary = 0, ttl = 10800, downloaded = NULL, autoGenerateSerial = 1, enabled = 1;
Feel free to use these examples as you please. |
Unlogic
Member since: 2008-01-27 20:43
|
Added: 2011-05-31 12:13
|
Thanks a lot Tenzer!
I've added your examples to the documentation and credited you.
http://www.unlogic.se/projects/eagledns/page/documentation-1.1#Examples |
Tenzer
Member since: 2011-05-25 15:56
|
Added: 2011-05-31 12:22
|
You're welcome. I hope it will be of aid for the next guy setting this up :) |