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.

ConnectionManager loses db server port when CDJ disconnects, but won't gain it again

See original GitHub issue

ConnectionManager -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)

version: 0.5.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
ben-xocommented, Oct 15, 2019

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!

1reaction
ben-xocommented, Oct 6, 2019

What a small world, I also happen to know Marcus Krooked!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remote Desktop client disconnects and can't reconnect to the ...
In this article. After Remote Desktop client loses its connection to the remote desktop, the client can't immediately reconnect.
Read more >
Dropped Sessions and Disconnects - IBM
This document discusses how to troubleshoot and discusses possible causes for an application session drop or disconnect.
Read more >
Point of Sale (POS) Client computers periodically lose ...
We have an ongoing issues with Quickbooks Point of Sale (POS) where periodically POS client workstations lose connectivity with the server.
Read more >
Analyzing Disconnects | Photon Engine
Here we list the major disconnect causes and whether they are caused on the client or the server side. Back To Top. Disconnects...
Read more >
AP disconnects and comes back randomly (doesn't reboot)
The AP is plugged into a Unifi Switch 8 POE port, but if the switch or switchport went down the AP would lose...
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