question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple SRV records with different port and target not allowed

See original GitHub issue

I am receiving a record duplicate error when trying to define a SRV record on different ports or to different targets.

Example 1:

_ldap._tcp.dc._msdcs.test123.local=0 50 389 test123.local
_ldap._tcp.dc._msdcs.test123.local=0 50 53 test123.local

Example 2:

_ldap._tcp.dc._msdcs.test123.local=0 50 389 test123.local
_ldap._tcp.dc._msdcs.test123.local=0 50 389 foo.test123.local

Error message is:

Traceback (most recent call last):
  File "dnschef.py", line 516, in <module>
    config.read(options.file)
  File "c:\pythonPath\lib\configparser.py", line 697, in read
    self._read(fp, filename)
  File "c:\pythonPath\lib\configparser.py", line 1093, in _read
    raise DuplicateOptionError(sectname, optname,
configparser.DuplicateOptionError: While reading from '../dnschef.ini' [line 54]: option '_ldap._tcp.dc._msdcs.test123.local' in section 'SRV' already exists

This setting should be allowed and another example can be seen in https://en.wikipedia.org/wiki/SRV_record

Note: I can use the executable version in windows (0.3) and it does not show me any error.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
irsdlcommented, Aug 25, 2020

I ran it once again (windows version 0.3) to see what I did previously, it seems it did only use the last entry as you said!

0reactions
amard33pcommented, Aug 25, 2020

Sorry I forgot to comment here, I confirm the above bad behaviour and that’s why I am still using the 0.3 version.

I believe you are referring to this commit.
Even with v 0.3, it only returns the last entry of the [SRV] section only

[SRV]
; FORMAT: priority weight port target
_http._tcp.thesprawl.org=0 5 5060 www.fake1.com
_http._tcp.thesprawl.org=1 5 5070 www.fake2.com
[root@ub18-01:~] nslookup -type=SRV _http._tcp.thesprawl.org
Server:         127.0.0.1
Address:        127.0.0.1#53

_http._tcp.thesprawl.org        service = 1 5 5070 www.fake2.com.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: VCS-E SRV Records for Multiple Regions - Cisco Community
Since I set up the test region first, I have SRV records in place for the test ... 1 Accepted Solution ... TTL...
Read more >
How to add two SRV records | Dell US
On your DNS host's website, you will create two new SRV records, ... Port. TTL. SRV (Service). @. (Or leave blank, if @...
Read more >
Using SRV records for multiple Autodiscover domains
We explore using SRV records for autodiscover. This is a great way to keep the names on your certificate to a minimum. Great...
Read more >
What is a DNS SRV record? - Cloudflare
Ports allow computers to easily differentiate between different kinds of traffic: VoIP streams go to a different port than email messages, for instance,...
Read more >
The SRV record — NsLookup learning
SRV records allow services to be advertised on specific ports. ... Not all application protocols support SRV, but many do.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found