Skip to content

Conversation

@rdica
Copy link
Contributor

@rdica rdica commented Nov 6, 2025

Short description of changes

Provides SRV DNS support for -e|--directoryaddress option.

CHANGELOG: SKIP

Context

Currently one needs to provide both an IP/host and port number to the -e|--directoryaddress option if the directory server is not using the default port 22124. This patch will enable the ability to use preconfigured SRV DNS records by a server to connect to a directory without having to provide a port number.

The patch expands on SRV support in client code already in main.

I have created SRV DNS records to test with that point to each of the seven public directory servers provided by the Jamulus team:

  • anygenre1.jamulusjams.com
  • anygenre2.jamulusjams.com
  • anygenre3.jamulusjams.com
  • rock.jamulusjams.com
  • jazz.jamulusjams.com
  • classical.jamulusjams.com
  • choral.jamulusjams.com

You can confirm the SRV records using the following:
Mac/Linux

dig _jamulus._udp.anygenre1.jamulusjams.com srv

;; ANSWER SECTION:
_jamulus._udp.anygenre1.jamulusjams.com. 3600 IN SRV 0 0 22124 anygenre1.jamulus.io.

Windows

nslookup -type=srv _jamulus._udp.anygenre1.jamulusjams.com`

Server:  UnKnown
Address:  10.2.0.1

_jamulus._udp.anygenre1.jamulusjams.com SRV service location:
          priority       = 0
          weight         = 0
          port           = 22124
          svr hostname   = anygenre1.jamulus.io

In order to utilize this functionality for the Jamulus public space, the Jamulus team could create the seven SRV records and publish those in the same table that displays the server host/port pairs in https://jamulus.io/wiki/Running-a-Server#registered-mode

Does this change need documentation? What needs to be documented and how?

Unsure. According to --help output, the option -c|--connect doesn't mention anything about SRV support. In that same vein I submit nothing should be added for -e|--directoryaddress either.

Status of this Pull Request

What is missing until this pull request can be merged?

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

@ann0see ann0see added this to Tracking Nov 9, 2025
@github-project-automation github-project-automation bot moved this to Triage in Tracking Nov 9, 2025
@ann0see
Copy link
Member

ann0see commented Nov 9, 2025

CC @gilgongo and @softins for DNS

@softins
Copy link
Member

softins commented Nov 10, 2025

CC @gilgongo and @softins for DNS

I have just created SRV records in our zone on Cloudflare for the various directories, as follows:

;; SRV Records
_jamulus._udp.anygenre1.jamulus.io.     60      IN      SRV     0 0 22124 anygenre1.jamulus.io.
_jamulus._udp.anygenre2.jamulus.io.     60      IN      SRV     0 0 22224 anygenre2.jamulus.io.
_jamulus._udp.anygenre3.jamulus.io.     60      IN      SRV     0 0 22624 anygenre3.jamulus.io.
_jamulus._udp.choral.jamulus.io.        60      IN      SRV     0 0 22724 choral.jamulus.io.
_jamulus._udp.classical.jamulus.io.     60      IN      SRV     0 0 22524 classical.jamulus.io.
_jamulus._udp.jazz.jamulus.io.          60      IN      SRV     0 0 22324 jazz.jamulus.io.
_jamulus._udp.private.jamulus.io.       60      IN      SRV     0 0 22124 private.jamulus.io.
_jamulus._udp.rock.jamulus.io.          60      IN      SRV     0 0 22424 rock.jamulus.io.

Once we are happy they are working correctly, we can wind the TTLs up from 1 minute to something longer.

@rdica
Copy link
Contributor Author

rdica commented Nov 10, 2025

@softins thanks, I have reconfigured one of my servers to use SRV for anygenre2.jamulus.io, monitoring.

Nov 10 18:21:03 daw6 jamulus[279573]: resolved anygenre2.jamulus.io to a single SRV record: anygenre2.jamulus.io:22224
Nov 10 18:21:03 daw6 jamulus[279573]: Server Registration Status update: Registration requested
Nov 10 18:21:03 daw6 jamulus[279573]: Server Registration Status update: Registered

Copy link
Member

@softins softins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me. Tested on all standard directories, using both -e and the Custom setting in the server GUI.

@rdica
Copy link
Contributor Author

rdica commented Nov 14, 2025

While the SRV lookups work and servers can connect to a directory server, I'm seeing all my test servers lose their ability to maintain their registrations eventually, some indeterminate time within 24 hrs, and attempts to re-register stop being logged. Any clients that were connected to the server itself also get disconnected. Attempting to investigate further...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

3 participants