Sphereserver / Source

http://spherecommunity.net
Apache License 2.0
108 stars 58 forks source link

Can't login on Linux build #193

Closed youhide closed 4 years ago

youhide commented 4 years ago

When i try to login with linux build all accounts are getting account already used...

Jhobean commented 4 years ago

I have the same problem on Windows but it's interminent

image

youhide commented 4 years ago

I have the same problem on Windows but it's interminent

last windows build is ok here

coruja747 commented 4 years ago

I compiled an test build with some extra debug info on the "account already in use" msg, try using it and check the console log https://ci.appveyor.com/api/buildjobs/cu1evclhk1qov3l4/artifacts/SphereSvr-Linux32-Test.tar.gz

youhide commented 4 years ago

I compiled an test build with some extra debug info on the "account already in use" msg, try using it and check the console log https://ci.appveyor.com/api/buildjobs/cu1evclhk1qov3l4/artifacts/SphereSvr-Linux32-Test.tar.gz

22:25:e:Client connected [Total:2] ('10.0.0.175' 2/2) 22:25:e:Login 'youri' 22:25:e:Client disconnected [Total:1] ('10.0.0.175', acct='youri') 22:25:f:Client connected [Total:2] ('189.xxx.132.xxx' 1/1) 22:25:f:Account 'youri' already in use [DEBUG: account already in use by different IP] 22:25:WARNING:f:Bad Login 1 (The account entered is already being used) 22:25:f:Client disconnected [Total:1] ('189.xxx.132.xxx', acct='')

Capture

coruja747 commented 4 years ago

Do you have an custom IP set on [SPHERE] or [SERVERS] template on sphere.ini?

It seems that your client is connecting with IP 10.0.0.175 and after this it turns into 189...*

youhide commented 4 years ago

just ServIP on ini. this is because i'm using lan address to connect on client-side and on server the .ini conf ServIP is pointing to external. maybe sphere login steps act like a proxy?

coruja747 commented 4 years ago

not really a proxy, it's just an simple gateway. Sphere have it's own IP and a [SERVERS] list with many IPs of others servers to show on server selection screen. After select an server on list, the client will drop the current connection and connect on selected IP. If the client select the own server it will connect again on same server, and if it click on another server IP it will be redirected to this other server IP

And probably your network settings are making the client make the 1st connection using local IP and 2nd connection using external IP, which will be a different IP so sphere will think that another IP is trying to use the same account

Honestly I have no idea why it occur, I'm trying to test it but both win/linux builds are working fine here. But anyway try set ServIP=127.0.0.1 and enable RestAPIPublicIP to check if it works

Jhobean commented 4 years ago

We had a @login with a return 1 on it. The return 1 was sometime causing this bug.

youhide commented 4 years ago

if put a wrong password and try to login again with correct im getting this on console and cant login...

22:40:FATAL:Segmentation fault 22:40:FATAL:Error Pri=1, Code=11, Desc='Segmentation fault', in NetworkInput::ProcessNewClient() #1 "messages - setup"

coruja747 commented 4 years ago

Maybe this is related to #195 I have no idea why sometimes linux builds was making the client change its IP without any reason, but since the login behavior is working fine on latest builds I think its safe consider this issue fixed