ConnectionManager loses db server port when CDJ disconnects, but won't gain it againSee original GitHub issue
-1s the db server port when the relevant CDJ disconnects in the
deviceLost() method. However, the paired
deviceFound() method is only triggered the first time a device is seen (as
DeviceFinder::deliverFoundAnnouncement() has a guard which only delivers if the device is new, on line 220). The upshot is that if the CDJ disconnects and then rejoins the network, its db server port is stuck at -1.
This manifests as a sudden spewing of messages from MetadataFinder (once per CdjStatus packet) all saying the same thing:
ERROR [MetadataFinder metadata request] (MetadataFinder.java:114) - Problem requesting metadata, returning null java.lang.IllegalStateException: Player 2 does not have a db server requesting metadata at org.deepsymmetry.beatlink.dbserver.ConnectionManager.allocateClient(ConnectionManager.java:113) at org.deepsymmetry.beatlink.dbserver.ConnectionManager.invokeWithClientSession(ConnectionManager.java:192) at org.deepsymmetry.beatlink.data.MetadataFinder.requestMetadataInternal(MetadataFinder.java:112) at org.deepsymmetry.beatlink.data.MetadataFinder.access$1100(MetadataFinder.java:41) at org.deepsymmetry.beatlink.data.MetadataFinder$8.run(MetadataFinder.java:1978) at java.lang.Thread.run(Thread.java:748)
- Created 4 years ago
- Comments:13 (13 by maintainers)
Top GitHub Comments
Hey sorry for the late replies on this! Great discovery and glad that seems to be an appropriate fix. Sorry that I waffled through several states of mind earlier on in the thread. I’ll test the fix and get back to you.
Regarding my exact set-up and what is happening to trigger bugs: I actually tested three scenarios:
- turning CDJ off and on again
- unplugging and reconnecting a CDJ network cable
- unplugging and reconnecting the laptop network cable When the laptop loses network, you get a different set of errors from the other two. But the other two are different from each other because of the time it takes for the db server to start.
You are right about the tweak to
MAXIMUM_AGE being a separate issue. It may not be relevant and i’ll file a new ticket if it is.
You are correct that I was not using
CrateDigger - I didn’t know about it. Thank you for the tip!
What a small world, I also happen to know Marcus Krooked!