Using relays periodically generates "Notice" messages

Recently I’ve enabled relaying on many of my devices, and on almost all of them I’ve started to periodically receive the following warning on top of WebUI: 2016-06-02 22:52:48: Joining relay session (BEP/relay): Incorrect response code 2: already connected

Is there some misconfiguration I should look for? (I never changed “advanced” settings, just some “basic” ones)

And if it is simply the expected behavior: “connect to relay, and periodically try to connect to other/same relay again” maybe the warning message should be kept to the console only, and not main UI?

Are you sure you don’t have duplicate device ids somewhere?

Alternative would be that your connections are getting dropped, but a larger excerpt of logs from both sides would help.

Here is one node’s log:

The mentioned warning can be seen in line 216 (if more logs needed, I can add more…)

I’m very positive that there are no duplicated IDs anywhere in the cluster. Unless, of course, there is a bug in ID generation process that created for me a new ID that is matching someone else’s anywhere on the internet… but that’d be a huge bug, and I doubt it is the case (I hope it isn’t…)

Ok, your connection quality is awful, and you simply happen to reconnect to the relay before it realized you have timed out.

OK, the DEVICE_02 that reconnects is an android device, which is indeed reconnects frequently.

However the main device from whom log has been taken, is a stable wired LAN one. I can see it connected to other remote WAN nodes solidly (the index exchange upon its re-connection is above 1GB, so it is easy to spot).

Or do you imply that the connection “my_node <-> relay_server” is poor?

P.S: In any case, is this notification (Joining relay session (BEP/relay): Incorrect response code 2: already connected) serves any actionable information for user?

Well, it informs you that your connection is crap :slight_smile:

Well, maybe. But so would be presenting a “Notice” on top of the UI every time that one of the discovery servers is unreachable. But that’s not what we do.

Instead the “connected/in_use services” are neatly summarized in the Device Status block (i.e listeners available, discovery servers connected, etc.).

So if the whole message of the discussed notification is “You reconnected too fast” or “relay had some quirks you shouldn’t care about”, it should be kept for console only.

As I see it, the Yellow Warning Box on top of WebUI should be reserved for actual errors/warnings that it is important for the user to be informed about AND/OR that the user should do something about it.

If you agree, I’d suggest opening an issue to move it from UI to the console. (unless it is important for user to know about it in cases that have not been discussed)

Agree, an issue is reasonable, but a pull request is prefered.

It sure is preferred!

But I need to level up my coding skills first :wink:

You can change log level from warn to info from the github web file editor, no need to know how to use git or anything else.

I’ve used git here and there, it’s not it. I’m just not too comfortable with modifying the code that I don’t understand fully.

Ideally, I’d like to have a full and complete read and understanding of the logging system in place, as well as of the rationality behind the chosen log levels for each case. And have a grip on ST’s build system to be able to test it properly before submission.

But this one indeed seem quite straight forward, and since you agree with the proposal, I made a PR :wink:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.