Barbosik / MultiOgar

An open source Ogar server implementation, written with Node.js.
Other
61 stars 44 forks source link

Server stops working randomly #384

Open XxXN0SplittrXxX opened 8 years ago

XxXN0SplittrXxX commented 8 years ago

Everytime I port forward and host a server, it works fine and others can join just fine.

Randomly, however, my server just stops working. I cannot connect to it anymore, and I know that my ports are still open. (This is after a few days, if not a week)

However, if I change the port, the server magically works again.

For example, start with 443. It works fine, stops working after a few days. Change to 469, works again. Stops working after a few days. Change to 666, works again. Etc.

Changing the ports back to the previous number does not seem to work, nor does redoing my static IP and port forwarding. (Edit: changing my server port to 443 seems to make it work again, but 469 won't work. 666 does work, though.)

I have also made sure that none of my running applications are using the ports which I can no longer use for my server.

Why does this happen?

AlexDicy commented 8 years ago

I use 666 even for variable names but details ahahah anyway can you explain better the way you're connecting (Eg: me - router - Internet, simple net)? And are you getting any error (server and client side)?

chuushi commented 8 years ago

It might be your internet service provider. Check your ISP's EULA to see if there's any statement that prohibits you from hosting a server on your internet.

BaumanDev commented 8 years ago

@HAlexTM Satan lover?

m-byte918 commented 8 years ago

his ISP is satan confirmed O_o

AlexDicy commented 8 years ago

Ahahah I'm not a Satan lover but I got this number everywhere (mum's car license plate...)

XxXN0SplittrXxX commented 8 years ago

Sorry for the late reply.

@SimonOrJ If I'm correct, then my ISP allows hosting gameservers from my home network.

@HAlexTM I'm not exactly sure how to answer that, but I guess my computer - router(internet modem) - wall socket? As for any errors, I'm not receiving any errors from my console while trying to host on the ports that do not work. I simply can't connect to 443, and now 469 too. 666 works just fine, when I change the server port in the notepad file.

AlexDicy commented 8 years ago

Try then using ports with 4 numbers like 6666

chuushi commented 8 years ago

For example, on §22, my ISP says: https://www.optimum.net/pages/Terms/Internet/Residential.html

B. Optimum 50, Optimum 60, Optimum 75,Optimum 100, Optimum 200 and Optimum 300: i. Users may not run any servers except for a webserver (HTTP) and mail (SMTP) on the system. This includes but is not limited to FTP, IRC, POP, SOCKS, SQUID, DNS or any multi-user forums.

But all ISPs operate differently. You cannot just assume if you have an internet connection from an ISP, you have access to hosting all kinds of internet stuff. There has to be a reason why those ports are getting randomly blocked.

Have you tried to connect to your server after connecting your Ogar server machine directly to the modem and using one of the old ports?

XxXN0SplittrXxX commented 8 years ago

@SimonOrJ According to well-known and trusted users on the forums of my ISP, a hobby-server on my home internet is allowed. It is not an assumption in this case.

As for connecting to my server after starting the Start-windows.bat file with one of my old ports being assigned as the designated hosting port, I cannot connect. The agario page will load like it should, but after clicking ''Play'', it results in the greyed out waiting screen saying ''Connecting...''

Edit: This is when I try to connect to the link that others may use to connect to my server. It is not the link to connect to my local machine. (I believe it is something like 127.0.0.1?)

If that is not what you meant by connecting my Ogar server machine directly to my modem, I'm afraid that I don't understand what you meant.

@HAlexTM I will try that next time, but what makes 4 numbers better than 3?

I appreciate your effort to help me. Thanks everyone.

chuushi commented 8 years ago

By connecting your server directly to the modem, I mean connect your server computer (that hosts the Ogar server) directly to the device that provides the internet (modem in most cases; bypass everything and make it connect directly to the internet without any routers or switches in between). I'm asking you to do this to eliminate the possibility of your router failing or blocking access at random.

To add on the reasoning behind @HAlexTM's suggestion: Port numbers from 0 to 1023 are system-designated ports. If you were using a Linux machine to run the server, you would need to be root to run the server on one of those ports (or it will result in error EACCESS). It doesn't make the server better, but it's easier to configure and make it work on it.

AlexDicy commented 8 years ago

Exactly @SimonOrJ. If your ISP only allows Web hosting you can use port 80 for the client, 443 for the gameserver and others that may be allowed (like 8080, 88, 8443, 21, 22, 25...) or if it only allow one port you can setup Nginx on that port then use it like (url:allowedPort/portINeedToUse/), if you need help with nginx just ask, I made a similar system working with sockets too.

XxXN0SplittrXxX commented 8 years ago

I have looked into this a bit myself and I have discovered a few things:

Edit: It appears that some people are unable to connect, while some others are able to.

I'm using a Windows OS, windows 10 to be exact. I will try to run it on four-digit numbers whenever 666 stops working for me.