Skip to content
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.

Listen to two ports #79

Closed
Octolus opened this issue Jul 7, 2015 · 17 comments
Closed

Listen to two ports #79

Octolus opened this issue Jul 7, 2015 · 17 comments

Comments

@Octolus
Copy link

Octolus commented Jul 7, 2015

I changed port on linux one to 443 and another one to 1337, for some reason I can't listen to another port while running another ogar..

[root@centos-agar src]# node index.js
[Game] Ogar - An open source Agar.io server implementation
Error: listen EADDRINUSE
at errnoException (net.js:905:11)
at Server._listen2 (net.js:1043:14)
at listen (net.js:1065:10)
at Server.listen (net.js:1139:5)
at GameServer.startStatsServer (/home/admin/HackForums/Ogar/src/GameServer.js:919:21)
at GameServer.start (/home/admin/HackForums/Ogar/src/GameServer.js:206:10)
at Object. (/home/admin/HackForums/Ogar/src/index.js:25:12)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
[Error] Server could not bind to port! Please close out of Skype or change 'serverPort' in gameserver.ini to a different number.

@TheEpTic
Copy link

TheEpTic commented Jul 7, 2015

Probably have apache or nginx running. :x

@Octolus
Copy link
Author

Octolus commented Jul 7, 2015

No. Running 443 works fine, 1337 one on other hand isn't .. worked fine on windows

@TheEpTic
Copy link

TheEpTic commented Jul 7, 2015

What's the output for:

netstat -tulpn | grep 1337

@Octolus
Copy link
Author

Octolus commented Jul 7, 2015

Nothing.

@Octolus
Copy link
Author

Octolus commented Jul 7, 2015

[root@centos-agar src]# netstat -tulpn | grep 443
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 1581/node

@TheEpTic
Copy link

TheEpTic commented Jul 7, 2015

So 443 is already in use.

pkill node

then try running it again.

@Octolus
Copy link
Author

Octolus commented Jul 7, 2015

dude i said 1337 dont work, but 443 works lol

@TheEpTic
Copy link

TheEpTic commented Jul 7, 2015

How is it listening when it errors with Error: listen EADDRINUSE

When that occurs it kills it self. You're not telling me everything.

@Octolus
Copy link
Author

Octolus commented Jul 7, 2015

I already explained the issue, listening to another port at once doesn't work. I assume it's because the stats server are listening on port 88.

@TheEpTic
Copy link

TheEpTic commented Jul 7, 2015

...

Do me a favour and set your game port to 1501 and stats port to 1601. You might not have so much issues -_-

@Octolus
Copy link
Author

Octolus commented Jul 7, 2015

to be honest i didnt even know there was any stats port lol i guess if thats in the config.. then my issue is solved

@TheEpTic
Copy link

TheEpTic commented Jul 7, 2015

Yes, there's a stats port.

@Octolus
Copy link
Author

Octolus commented Jul 7, 2015

does it not contain like top players etc?

@TheEpTic
Copy link

TheEpTic commented Jul 7, 2015

One of my servers: http://i.imgur.com/Ik4ib99.png

@TheEpTic
Copy link

TheEpTic commented Jul 7, 2015

Is your issue fixed?

@Octolus
Copy link
Author

Octolus commented Jul 7, 2015

yes

@TheEpTic
Copy link

TheEpTic commented Jul 7, 2015

Press the close button ;)

@Octolus Octolus closed this as completed Jul 7, 2015
vram4 added a commit that referenced this issue Jul 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants