Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Mobile Mobile 3D MORPG Mogo released

Status
Not open for further replies.
Newbie Spellweaver
Joined
Feb 20, 2012
Messages
15
Reaction score
0
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

Help,start server.
 
Joined
Mar 25, 2007
Messages
661
Reaction score
309
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

@sasha1750,
/root/server/common/pluto.h line 72

edit SERVER_MULTI_MIN_ID = 11, to SERVER_MULTI_MIN_ID = 6,

then type below...
make clean
make

@DNC, @xuanphung001,
sorry friends, I just found 'fd' means allocated sock number
but I failed correct Host error
can you teach me how to fix it?
 
Joined
Oct 28, 2011
Messages
2,466
Reaction score
1,259
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

@sasha1750,
/root/server/common/pluto.h line 72

edit SERVER_MULTI_MIN_ID = 11, to SERVER_MULTI_MIN_ID = 6,

then type below...
make clean
make

@DNC, @xuanphung001,
sorry friends, I just found 'fd' means allocated sock number
but I failed correct Host error
can you teach me how to fix it?

/root/server/common/pluto.h line 72

edit SERVER_MULTI_MIN_ID = 11, to SERVER_MULTI_MIN_ID = 6,

???????????

You have both edited to 5 and commented out as 5 (not 11 and not 6)
Are you sure this is right? Changing to 6 (six)?
 
Joined
Mar 25, 2007
Messages
661
Reaction score
309
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

I tested both 5 and 6... and they all works good
so I resently use SERVER_MULTI_MIN_ID = 6

anyway, DNC could you show me where I have to fix in epoll_server.cpp ?
I tried hundres times with various ways but all of them are failed...
plz let me know the ansewer ^^;;
 
Newbie Spellweaver
Joined
Aug 20, 2012
Messages
10
Reaction score
0
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

i found fd=6 , 1 : redis-cli 2: CLIENT LIST ~~ But i'm not sure about this ~
 
Joined
Oct 28, 2011
Messages
2,466
Reaction score
1,259
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

but since the original and your modifications both show
SERVER_MULTI_MIN_ID = 5
/root/server/common/pluto.h line 72

I instead modified your modification.

string strAccount = "111111@test"; //loveomg forse login
string strPasswd = "111111@test";
int32_t nFd = 6;

to
string strAccount = "111111@test"; //loveomg forse login
string strPasswd = "111111@test";
int32_t nFd = 5;


Currently my error:
Code:
2015-03-09 02:20:31,750 [INFO]: Driver.Awake(): --------------------------------------Game Start!-----------------------------------------
2015-03-09 02:20:32,863 [INFO]: VersionManager.LoadLocalVersion(): cannot find local version,export from streaming assets
2015-03-09 02:20:32,866 [INFO]: <DownloadNotice>c__Iterator17.MoveNext(): -----------------------------------001333---Game Start!-----------------------------------------
2015-03-09 02:20:32,884 [INFO]: <DownloadNotice>c__Iterator17.MoveNext(): -----------------------------------0013---Game Start!-----------------------------------------
2015-03-09 02:20:32,892 [INFO]: <DownloadNotice>c__Iterator17.MoveNext(): -----------------------------------003---Game Start!-----------------------------------------
2015-03-09 02:20:55,312 [ERROR]: tcp close
DoReceive at offset 0 in file:line:column <filename unknown>:0:0

2015-03-09 02:20:56,312 [EXCEPT]: Exception. the tcpClient do connecting error.System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it.

  at System.Net.Sockets.Socket.Connect (System.Net.IPAddress[] addresses, Int32 port) [0x00000] in <filename unknown>:0 
  at System.Net.Sockets.Socket.Connect (System.String host, Int32 port) [0x00000] in <filename unknown>:0 
  at Mogo.Util.TCPClientWorker.Connect (System.String IP, Int32 Port) [0x00000] in <filename unknown>:0   at Mogo.Util.TCPClientWorker.Connect (System.String IP, Int32 Port) [0x00000] in <filename unknown>:0 
  at Mogo.Game.RemoteProxy.Connect (System.String ip, Int32 port) [0x00000] in <filename unknown>:0

Of course, I only made one modification since downloading your VM (after fixing redis).
I'll review why it immediately refuses the connection.
 
Joined
Mar 25, 2007
Messages
661
Reaction score
309
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

@DNC,
delete server folder from VM then copy original server folder (not modified) there
there are only 3 point to edit

1. #-D__PLAT_PLUG_IN_NEW in Makefile

2. SERVER_MULTI_MIN_ID = 5 in pluto.h

3. fd number in epoll_server.cpp (I am working on this)
addFdAndMb() uses fd=18..... but socket number 18 is already used for internal client connection (you can find it on log files)

so our only Isseue is fd number in my opnion
correcton addFdAndMb() function is not easy to me...
maybe xuanphung001 will help us
 
Joined
Oct 28, 2011
Messages
2,466
Reaction score
1,259
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

@DNC,
delete server folder from VM then copy original server folder (not modified) there
there are only 3 point to edit

1. #-D__PLAT_PLUG_IN_NEW in Makefile

2. SERVER_MULTI_MIN_ID = 5 in pluto.h

3. fd number in epoll_server.cpp (I am working on this)
addFdAndMb() uses fd=18..... but socket number 18 is already used for internal client connection (you can find it on log files)

so our only Isseue is fd number in my opnion
correcton addFdAndMb() function is not easy to me...
maybe xuanphung001 will help us

I'll do it again.
-.- I just manually edited every existence of 192.168.200.102 to 192.168.0.102 because I refuse to be like that :0)
No big, give me a bit. Coffee / smoke / clean code -- reconfigured.



Image showing Unity debug console:

ZYUtwZt - Mobile 3D MORPG Mogo released - RaGEZONE Forums



Error from Unity debug console:
Code:
2015-03-09 03:32:11,475 [DEBUG]: RemoteProxy.Connect(): connect error: System.Exception: Exception. the tcpClient do connecting error.System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it.

  at System.Net.Sockets.Socket.Connect (System.Net.IPAddress[] addresses, Int32 port) [0x00000] in <filename unknown>:0 
  at System.Net.Sockets.Socket.Connect (System.String host, Int32 port) [0x00000] in <filename unknown>:0 
  at Mogo.Util.TCPClientWorker.Connect (System.String IP, Int32 Port) [0x00000] in <filename unknown>:0 
  at Mogo.Util.TCPClientWorker.Connect (System.String IP, Int32 Port) [0x00000] in <filename unknown>:0 
  at Mogo.Game.RemoteProxy.Connect (System.String ip, Int32 port) [0x0002f] in client\Assets\Scripts\GameLogic\ServerProxy.cs:204  Index = 56


Code snippet (client\Assets\Scripts\GameLogic\ServerProxy.cs:204)
Code:
        /// <summary>
        /// 连接远程服务。
        /// </summary>
        /// <param name="ip">服务器IP</param>
        /// <param name="port">服务端口</param>
        public override Boolean Connect(string ip, int port)
        {
            try
            {
                LoggerHelper.Debug("connect : " + ip + " p: " + port);
                m_tcpWorker.Connect(ip, port);
                reConnectCnt = 0;
                return true;
            }
            catch (Exception ex)
            {
                LoggerHelper.Debug("connect error: " + ex.ToString());
                LoggerHelper.Except(ex);
                if (MogoWorld.thePlayer != null)
                {
                    CloseHandler();
                }
                return false;
            }
        }


Also note:
netstat -tanp | grep 8001 <------- no results
netstat -tanp | grep 8002 <------- has results so do ports 8003 - 8007 but not 8008 or 8009

NugWJa0 - Mobile 3D MORPG Mogo released - RaGEZONE Forums


loveomg I think I'm done editing this for now.
 

Attachments

You must be registered for see attachments list
Last edited:
Joined
Mar 25, 2007
Messages
661
Reaction score
309
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

Yes, it's same with mine
After login passed, client disconnected because socket problem in AddFdAndMb()
we have to fix it in AddFdAndMb() function
 
Joined
Oct 28, 2011
Messages
2,466
Reaction score
1,259
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

tcp connection closes before anything is really done from the authentication process.

lC9Veg2 - Mobile 3D MORPG Mogo released - RaGEZONE Forums



Still debugging -.- -.-
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
Aug 9, 2014
Messages
33
Reaction score
16
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

loveomg: i don't think fd is socket number but i already change it in server code to make it works successfully.
And i did it like DNC as below but with other value.

but since the original and your modifications both show
SERVER_MULTI_MIN_ID = 5
/root/server/common/pluto.h line 72

I instead modified your modification.

string strAccount = "111111@test"; //loveomg forse login
string strPasswd = "111111@test";
int32_t nFd = 6;

to
string strAccount = "111111@test"; //loveomg forse login
string strPasswd = "111111@test";
int32_t nFd = 5;


Currently my error:
Code:
2015-03-09 02:20:31,750 [INFO]: Driver.Awake(): --------------------------------------Game Start!-----------------------------------------
2015-03-09 02:20:32,863 [INFO]: VersionManager.LoadLocalVersion(): cannot find local version,export from streaming assets
2015-03-09 02:20:32,866 [INFO]: <DownloadNotice>c__Iterator17.MoveNext(): -----------------------------------001333---Game Start!-----------------------------------------
2015-03-09 02:20:32,884 [INFO]: <DownloadNotice>c__Iterator17.MoveNext(): -----------------------------------0013---Game Start!-----------------------------------------
2015-03-09 02:20:32,892 [INFO]: <DownloadNotice>c__Iterator17.MoveNext(): -----------------------------------003---Game Start!-----------------------------------------
2015-03-09 02:20:55,312 [ERROR]: tcp close
DoReceive at offset 0 in file:line:column <filename unknown>:0:0

2015-03-09 02:20:56,312 [EXCEPT]: Exception. the tcpClient do connecting error.System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it.

  at System.Net.Sockets.Socket.Connect (System.Net.IPAddress[] addresses, Int32 port) [0x00000] in <filename unknown>:0 
  at System.Net.Sockets.Socket.Connect (System.String host, Int32 port) [0x00000] in <filename unknown>:0 
  at Mogo.Util.TCPClientWorker.Connect (System.String IP, Int32 Port) [0x00000] in <filename unknown>:0   at Mogo.Util.TCPClientWorker.Connect (System.String IP, Int32 Port) [0x00000] in <filename unknown>:0 
  at Mogo.Game.RemoteProxy.Connect (System.String ip, Int32 port) [0x00000] in <filename unknown>:0

Of course, I only made one modification since downloading your VM (after fixing redis).
I'll review why it immediately refuses the connection.
 
Joined
Oct 28, 2011
Messages
2,466
Reaction score
1,259
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

loveomg: i don't think fd is socket number but i already change it in server code to make it works successfully.
And i did it like DNC as below but with other value.

Which other value. I'm tired of guessing game here. I've been working on 3 games and 4 projects all week.
Just spell it out so these folks can move on and I can quit playing with Unity.
 
Joined
Mar 25, 2007
Messages
661
Reaction score
309
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

@xuanphung001,
dear friend, I am already working for may hours
and as you mentioned it is passed 24hours without nobody made it
now your turn, what we should fix?
 
Newbie Spellweaver
Joined
Aug 9, 2014
Messages
33
Reaction score
16
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

yes friend, this is simple in code:

string strAccount = "111111@test"; //loveomg forse login
string strPasswd = "111111@test";
int32_t nFd = 6;

nFd will has value that equals with fd value from client request(from original code), but here was assigned 6
by loveomg.
Client request fd=18 so here
also should be 18. Yes, change it to 18, you will pass login.
Cheer.
 
Joined
Oct 28, 2011
Messages
2,466
Reaction score
1,259
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

yes friend, this is simple in code:

string strAccount = "111111@test"; //loveomg forse login
string strPasswd = "111111@test";
int32_t nFd = 6;

nFd will has value that equals with fd value from client request(from original code), but here was assigned 6
by loveomg.
Client request fd=18 so here
also should be 18. Yes, change it to 18, you will pass login.
Cheer.

Much <3 and appreciation. Thank goodness I can stop playing Unity HEHE
+10 Rep bro can't believe I didn't even see that...
 
Joined
Mar 25, 2007
Messages
661
Reaction score
309
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

@xuanphung001

Sadly your fix dosen't work..
my client still says

2015-03-09 19:22:36,544 [EXCEPT]: 현재 연결은 사용자의 호스트 시스템의 소프트웨어의 의해 중단되었습니다.
at System.Net.Sockets.Socket.Receive (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0
at Mogo.Util.TCPClientWorker.DoReceive () [0x00000] in <filename unknown>:0

and login server says

18:28:50.568519 [DEBUG ][CEpollServer::addFdAndMb]fd=18;fd_type=3;addr=192.168.200.1;port=1280;authz=15
18:28:50.645537 [INFO ][CWorldLogin::account_login]------ client attempt to login;account=test01;passwd=timestamp;fd=18
18:28:50.697381 [INFO ][CWorldLogin::select_account_callback]account=test01;fd=18;ret=1
18:28:50.697431 [DEBUG ][CWorldLogin::SelectAccountCallback]u.GenLen()=9
18:28:50.750261 [DEBUG ][NotifyClientToAttach]account=test01;fd=18
18:28:50.884695 [WARNING ][handle_message_err]failed, 104,'Connection reset by peer'

which source did you use? my VM version?
and what did you edit?
 
Last edited:
Newbie Spellweaver
Joined
Aug 9, 2014
Messages
33
Reaction score
16
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

@loveomg, this's the first version of your VM and i have only one change nFd from 6 to 18.
Try again and post result.
 
Joined
Mar 25, 2007
Messages
661
Reaction score
309
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

@DNC
you are right. that's best solution.

@xuanphung001
can you upload your server folder on Mega?

I testes with my first VM server but it's same
maybe your client have the key or you changed more

string strAccount = "111111@test"; //loveomg force login
string strPasswd = "111111@test";
int32_t nFd = 18;
 
Last edited:
Newbie Spellweaver
Joined
Jul 29, 2013
Messages
6
Reaction score
0
Re: Mobile 3D MORPG 暗黑战神 full source released - Unity 3D Engine

@DNC
you are right. that's best solution.

@xuanphung001
can you upload your server folder on Mega?

I testes with my first VM server but it's same
maybe your client have the key or you changed more

string strAccount = "111111@test"; //loveomg force login
string strPasswd = "111111@test";
int32_t nFd = 18;

In what/where do i change that? Please xuanphung001 upload it for us =)
 
Status
Not open for further replies.
Back
Top