-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't register more than one server instance #23
Comments
Definitely not a limitation, might be a bug. For each other server you are attempting to add, are you using a unique port? Say your server is at Can you please provide me with a snippet of the code that you're using to register the servers with? Also, what branch are you working with? Master branch or |
Also, my nodeLS is running on my first VPS (66.29.157.140:8889/list) alongside my first game world. I'm using the example package located here: https://github.com/SoftwareGuy/NodeListServer-Example which uses this method to add servers:
|
Okay, that should be supported; as long as either the IP or Port is unique (like in your case) then it should be fine.
I'm going to spin up a copy of virgin NodeLS Gen2 since my development copy is heavily tainted with experimental code and is also customized for my own shooter title and use Labelling as a bug for now. Will update as I investigate further. |
Ahh - one thing I just found, is if the server exists already by name, then it'll reject that too. That might be part of the issue. Lines 342 - 345 are responsible for that. At the moment my servers have a static string with a random number attached to the end of them, so when they boot and register they will say like "Game Server Instance 69", etc. |
Yep, as far as I know there is no reverse proxying going on and yes NodeLS is publicly exposed. I can curl it just fine and return JSON just fine. Seems the only issue is registering servers after the first. |
Wonderful, that was a quick find! Sure hope it's the only thing causing the 400 error :) |
Shit, I just realized some stuff is outdated in the example NodeLS repository too. I'll finish investigating this issue first and then I'll go about updating the example repository. |
Crap. The rabbit hole goes deeper than I was hoping for. I'm gonna have to some surgery - this has actually revealed a glaring flaw in my logic handling. |
Okay, so I think I fixed the issue. I have to merge the branch into master, but the current fixes are in the |
Hahaha I had quite a bit of laughs over this, thanks for that :') Glad you were able to clean up and revise your code and fix the issue! Looking forward to the new build 👍🏻 |
@SoftwareGuy Hey! Did you manage to push the latest build? |
It's merged in master. Please give it a shot, there's also a new configuration file parameter that you must set if you want servers with the same name to be accepted. I also fixed an issue regarding the UUID it sends back, it sent back a wrong string instead of the UUID. You'll need Node 16 or higher, as it's now using in-line if checks. Node 12 will fail with a syntax error. |
When running "node serverList.js", I see it responded to my servers: [2022-02-20T21:50:01.620] [INFO] NodeLS - Replying to ::ffff:199.192.29.9 with known server list. But when I run curl, my server list shows empty. Did the unity side of this package get updated too? I only updated the nodelistserver |
Okay, so I'm taking a look at this and I'm not getting the same problem as yours: Getting the server list (no servers registered at this point in time):
Which is expected, since no servers are registered. So I went and registered a server:
It returned the GUID of the newly added server. Okay, that's good. Let's query the stuff again:
As we can see, the server is still registered. The NodeLS Example Project has not been updated as I've got that on my to-do list under moderate priority. Will be trying to get around to updating it either later today or sometime this week, depending on real life commitments. |
No worries, then! Must be an error on my part. Thanks for updating the project, I really appreciate it :) you can go ahead and close this issue
~ Abdel Nabut
…________________________________
From: Coburn ***@***.***>
Sent: Sunday, February 20, 2022 9:09:03 PM
To: SoftwareGuy/NodeListServer ***@***.***>
Cc: Abdel Nabut ***@***.***>; Author ***@***.***>
Subject: Re: [SoftwareGuy/NodeListServer] Can't register more than one server instance (Issue #23)
Okay, so I'm taking a look at this and I'm not getting the same problem as yours:
Getting the server list (no servers registered at this point in time):
***@***.*** ~]$ curl -X POST -d "serverKey=NodeListServerDefaultKey" http://development.oiranstudio.internal:50650/list
{"count":0,"servers":[],"updateFrequency":"300"}
***@***.*** ~]$
Which is expected, since no servers are registered. So I went and registered a server:
***@***.*** ~]$ curl -X POST -d "serverKey=NodeListServerDefaultKey&serverName=Generic Test Server&serverPort=7778&serverPlayers=69&serverCapacity=420" http://development.oiranstudio.internal:50650/add
9c73b292-da7b-4282-8b54-ca93cf25f27d
***@***.*** ~]$
It returned the GUID of the newly added server. Okay, that's good. Let's query the stuff again:
***@***.*** ~]$ curl -X POST -d "serverKey=NodeListServerDefaultKey" http://development.oiranstudio.internal:50650/list
{"count":1,"servers":[{"ip":"::ffff:192.168.42.69","name":"Generic Test Server","port":7778,"players":69,"capacity":420,"extras":""}],"updateFrequency":"300"}
***@***.*** ~]$
As we can see, the server is still registered.
The NodeLS Example Project has not been updated as I've got that on my to-do list under moderate priority. Will be trying to get around to updating it either later today or sometime this week, depending on real life commitments.
—
Reply to this email directly, view it on GitHub<#23 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ANYY6ZHXMVVO67O7QEO4JK3U4GND7ANCNFSM5OJOWCKQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
All good - I'll leave this open as a reminder for me to update the example project. Otherwise I'll forget because I'm dumb at times like that... 😅 |
Just leaving a note for future devs - the issue appears to be that there was an errant this line here in validators.js@110 after rebuilding the docker image with: i will still get issues with name collision, which seems superfluous, but |
Hi, I have 3 separate VPS's each acting as it's own separate server. I'm trying to use NodeListServer to display the player count for each of those servers, however I am getting a 400 error whenever I try to register a second server. First registers just fine. Is this by design? A limitation, bug? Or am I doing something incorrectly?
The text was updated successfully, but these errors were encountered: