suriyun-production / mmorpg-kit-docs

This is document for MMORPG KIT project (https://www.assetstore.unity3d.com/#!/content/110188?aid=1100lGeN)
https://suriyun-production.github.io/mmorpg-kit-docs
49 stars 11 forks source link

Map server is not ready #1727

Closed temelGameFacto closed 2 years ago

temelGameFacto commented 2 years ago

I can connecto to database and server.I can register and login but I get this error when I clicked start button.firewall is not active.I am using MySQL and digital ocean phpmyadmin

server config central database Ekran Alıntısı map spawn mysql

where is problem ?

insthync commented 2 years ago

Maybe wrong spawnExePath value

insthync commented 2 years ago

If you are going to use server config files, you won't have to change server config in components (because it will be applied after build and it is pretty wasting time), server config files will always replace config from components.

insthync commented 2 years ago

Where did you upload build files?

temelGameFacto commented 2 years ago

Ekran Alıntısı build files under root

insthync commented 2 years ago

Okay, correct.

I want to see command which you use to run servers

temelGameFacto commented 2 years ago

/root/Build.x86_64 -startCentralServer -startMapSpawnServer -startDatabaseServer

temelGameFacto commented 2 years ago

By the way I get this error today

SocketException: Address already in use at System.Net.Sockets.Socket.Bind (System.Net.EndPoint localEP) [0x00043] in <37b53663559e446385faf3edb0531ca9>:0 at NetCoreServer.TcpServer.Start () [0x0009a] in :0 at LiteNetLibManager.TcpTransport.StartServer (System.Int32 port, System.Int32 maxConnections) [0x00035] in :0 at LiteNetLibManager.LiteNetLibServer.StartServer (System.Int32 port, System.Int32 maxConnections) [0x0003f] in <5d59c7a096ab4077a2ccabe95425001a>:0 at LiteNetLibManager.LiteNetLibManager.StartServer () [0x00044] in <5d59c7a096ab4077a2ccabe95425001a>:0 at MultiplayerARPG.MMO.MMOServerInstance.StartDatabaseManagerServer () [0x00006] in <0efa71c011874da9b44de35408011e77>:0 at MultiplayerARPG.MMO.MMOServerInstance.OnGameDataLoaded () [0x00008] in <0efa71c011874da9b44de35408011e77>:0 at MultiplayerARPG.GameInstance.OnGameDataLoaded () [0x00008] in <0efa71c011874da9b44de35408011e77>:0 at MultiplayerARPG.GameInstance.LoadedGameData () [0x00155] in <0efa71c011874da9b44de35408011e77>:0 at MultiplayerARPG.BaseGameDatabase.LoadData (MultiplayerARPG.GameInstance gameInstance) [0x00072] in <0efa71c011874da9b44de35408011e77>:0 UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object) UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) Cysharp.Threading.Tasks.UniTaskScheduler:PublishUnobservedTaskException(Exception) MultiplayerARPG.d0:MoveNext() Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoid1:Run() Cysharp.Threading.Tasks.AwaiterActions:Continuation(Object) Cysharp.Threading.Tasks.UniTaskCompletionSourceCore1:TrySetResult(AsyncUnit) Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`1:SetResult() MultiplayerARPG.d38:MoveNext() Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`1:Run() Cysharp.Threading.Tasks.Internal.ContinuationQueue:RunCore() Cysharp.Threading.Tasks.Internal.ContinuationQueue:Run()

temelGameFacto commented 2 years ago

I run a few commands to solve problem ,I guess I accidently opened a lot of ports and used ip for that

insthync commented 2 years ago

The problem solved?

temelGameFacto commented 2 years ago

no :( still same problem.I got this error after run commond in console.I destroyed droplet and created new one, still same problem.Please help to solve the problem

insthync commented 2 years ago

Try:

cd /root/
./Build.x86_64 -startCentralServer -startMapSpawnServer -startDatabaseServer
temelGameFacto commented 2 years ago

I am getting this error after run command in console

SocketException: Address already in use at System.Net.Sockets.Socket.Bind (System.Net.EndPoint localEP) [0x00043] in <37b53663559e446385faf3edb0531ca9>:0 at NetCoreServer.TcpServer.Start () [0x0009a] in :0 at LiteNetLibManager.TcpTransport.StartServer (System.Int32 port, System.Int32 maxConnections) [0x00035] in :0 at LiteNetLibManager.LiteNetLibServer.StartServer (System.Int32 port, System.Int32 maxConnections) [0x0003f] in <5d59c7a096ab4077a2ccabe95425001a>:0 at LiteNetLibManager.LiteNetLibManager.StartServer () [0x00044] in <5d59c7a096ab4077a2ccabe95425001a>:0 at MultiplayerARPG.MMO.MMOServerInstance.StartDatabaseManagerServer () [0x00006] in <0efa71c011874da9b44de35408011e77>:0 at MultiplayerARPG.MMO.MMOServerInstance.OnGameDataLoaded () [0x00008] in <0efa71c011874da9b44de35408011e77>:0 at MultiplayerARPG.GameInstance.OnGameDataLoaded () [0x00008] in <0efa71c011874da9b44de35408011e77>:0 at MultiplayerARPG.GameInstance.LoadedGameData () [0x00155] in <0efa71c011874da9b44de35408011e77>:0 at MultiplayerARPG.BaseGameDatabase.LoadData (MultiplayerARPG.GameInstance gameInstance) [0x00072] in <0efa71c011874da9b44de35408011e77>:0 UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object) UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) Cysharp.Threading.Tasks.UniTaskScheduler:PublishUnobservedTaskException(Exception) MultiplayerARPG.d0:MoveNext() Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoid1:Run() Cysharp.Threading.Tasks.AwaiterActions:Continuation(Object) Cysharp.Threading.Tasks.UniTaskCompletionSourceCore1:TrySetResult(AsyncUnit) Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask1:SetResult() MultiplayerARPG.d38:MoveNext() Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask1:Run() Cysharp.Threading.Tasks.Internal.ContinuationQueue:RunCore() Cysharp.Threading.Tasks.Internal.ContinuationQueue:Run()

insthync commented 2 years ago

Try change central address to 127.0.0.1

temelGameFacto commented 2 years ago

.Changed central adress in config file.I still getting same error after changed it. -> SocketException: Address already in use

I destroyed old droplet and created a new one but still happining same. Ekran Alıntısı

insthync commented 2 years ago

Don't have to destroy droplet, Now I see what is the problem, you have to change databaseManagerPort to other

insthync commented 2 years ago

Database Manager is not My SQL server, it is a server that will connect to My SQL server later.

https://suriyun-production.github.io/mmorpg-kit-docs/#/pages/026-server-architecture

temelGameFacto commented 2 years ago

which port should I use instead of 3306 ? And what central adress should be 127.0.0.1 or my server adress (46.101.31.220) ?

temelGameFacto commented 2 years ago

I have changed databaseManagerPort to 3006 but I got this error.

FileNotFoundException: Could not find file "/root/localhost.pfx" at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <0bfb382d99114c52bcae2561abca6423>:0 at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize) [0x00000] in <0bfb382d99114c52bcae2561abca6423>:0 at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int) at System.IO.File.ReadAllBytes (System.String path) [0x00000] in <0bfb382d99114c52bcae2561abca6423>:0 at System.Security.Cryptography.X509Certificates.X509Certificate..ctor (System.String fileName, System.String password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) [0x00030] in <0bfb382d99114c52bcae2561abca6423>:0 at System.Security.Cryptography.X509Certificates.X509Certificate..ctor (System.String fileName, System.String password) [0x00000] in <0bfb382d99114c52bcae2561abca6423>:0 at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor (System.String fileName, System.String password) [0x00000] in <37b53663559e446385faf3edb0531ca9>:0 at LiteNetLibManager.WebSocketTransport.StartServer (System.Int32 port, System.Int32 maxConnections) [0x00049] in <5d59c7a096ab4077a2ccabe95425001a>:0 at LiteNetLibManager.LiteNetLibServer.StartServer (System.Int32 port, System.Int32 maxConnections) [0x0003f] in <5d59c7a096ab4077a2ccabe95425001a>:0 at LiteNetLibManager.LiteNetLibManager.StartServer () [0x00044] in <5d59c7a096ab4077a2ccabe95425001a>:0 at MultiplayerARPG.MMO.MMOServerInstance.StartCentralServer () [0x0004a] in <0efa71c011874da9b44de35408011e77>:0 at MultiplayerARPG.MMO.MMOServerInstance.OnGameDataLoaded () [0x00016] in <0efa71c011874da9b44de35408011e77>:0 at MultiplayerARPG.GameInstance.OnGameDataLoaded () [0x00008] in <0efa71c011874da9b44de35408011e77>:0 at MultiplayerARPG.GameInstance.LoadedGameData () [0x00155] in <0efa71c011874da9b44de35408011e77>:0 at MultiplayerARPG.BaseGameDatabase.LoadData (MultiplayerARPG.GameInstance gameInstance) [0x00072] in <0efa71c011874da9b44de35408011e77>:0 UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object) UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) Cysharp.Threading.Tasks.UniTaskScheduler:PublishUnobservedTaskException(Exception) MultiplayerARPG.d0:MoveNext() Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoid1:Run() Cysharp.Threading.Tasks.AwaiterActions:Continuation(Object) Cysharp.Threading.Tasks.UniTaskCompletionSourceCore1:TrySetResult(AsyncUnit) Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`1:SetResult() MultiplayerARPG.d38:MoveNext() Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`1:Run() Cysharp.Threading.Tasks.Internal.ContinuationQueue:RunCore() Cysharp.Threading.Tasks.Internal.ContinuationQueue:Run()

insthync commented 2 years ago

You will set the central server address to another which is not 127.0.0.1 when you run map-spawn-server, map-server (and other) on different servers from the central server to make them (map-spawn-server, map-server) connect to the correct central server.

insthync commented 2 years ago

The last error is because you set invalid path to web socket cert path. Are you intended to setup secured web-socket connection?

insthync commented 2 years ago

Or if you are not going to use web socket, set useWebSocket to false, or if you are going to use web socket but not secured, set useWebSocket to true and set webSocketSecure to false

Seems like there are a few customers who do not read document, and just copy-paste the example codes, how could I improve it?

temelGameFacto commented 2 years ago

I disabled websocket, looks no error in server side but client cannot connect to server error.

root@temel:~# ./Build.x86_64 -startCentralServer -startMapSpawnServer -startDatabaseServer [UnityMemory] Configuration Parameters - Can be set up in boot.config "memorysetup-bucket-allocator-granularity=16" "memorysetup-bucket-allocator-bucket-count=8" "memorysetup-bucket-allocator-block-size=4194304" "memorysetup-bucket-allocator-block-count=1" "memorysetup-main-allocator-block-size=16777216" "memorysetup-thread-allocator-block-size=16777216" "memorysetup-gfx-main-allocator-block-size=16777216" "memorysetup-gfx-thread-allocator-block-size=16777216" "memorysetup-cache-allocator-block-size=4194304" "memorysetup-typetree-allocator-block-size=2097152" "memorysetup-profiler-bucket-allocator-granularity=16" "memorysetup-profiler-bucket-allocator-bucket-count=8" "memorysetup-profiler-bucket-allocator-block-size=4194304" "memorysetup-profiler-bucket-allocator-block-count=1" "memorysetup-profiler-allocator-block-size=16777216" "memorysetup-profiler-editor-allocator-block-size=1048576" "memorysetup-temp-allocator-size-main=4194304" "memorysetup-job-temp-allocator-block-size=2097152" "memorysetup-job-temp-allocator-block-size-background=1048576" "memorysetup-job-temp-allocator-reduction-small-platforms=262144" "memorysetup-temp-allocator-size-background-worker=32768" "memorysetup-temp-allocator-size-job-worker=262144" "memorysetup-temp-allocator-size-preload-manager=262144" "memorysetup-temp-allocator-size-nav-mesh-worker=65536" "memorysetup-temp-allocator-size-audio-worker=65536" "memorysetup-temp-allocator-size-cloud-worker=32768" "memorysetup-temp-allocator-size-gfx=262144" Mono path[0] = '/root/Build_Data/Managed' Mono config path = '/root/Build_Data/MonoBleedingEdge/etc' Initialize engine version: 2021.3.5f1 (40eb3a945986) [Subsystems] Discovering subsystems at path /root/Build_Data/UnitySubsystems Forcing GfxDevice: Null GfxDevice: creating device client; threaded=0; jobified=0 NullGfxDevice: Version: NULL 1.0 [1.0] Renderer: Null Device Vendor: Unity Technologies Begin MonoManager ReloadAssembly

temelGameFacto commented 2 years ago

I allowed some ports and working now.Thank you very much @insthync