Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by wooolly · Aug 15, 2018 at 08:13 PM · multiplayerserverlinuxbatchmodeheadless

Linux game server

Hello unity people!

I am working on a multiplayer game, and it's time to start testing on a (linux) server. I have managed to somewhat get it to run on my server, with variable results. Over all though, it has not been successful, since the player tries to login and fails to do so. The problem is, I am finding it hard even to debug the server since I'm not sure if the messages are outputting correctly when I run it.

These are some logs of me running the server when I built the game as "headless" and ran it with -batchmode and -nographics...

 >     > ./Server.x86_64 -batchmode -nographics
 >     > Set current directory to
 >     > /home/forge/server Found path:
 >     > /home/forge/server/Server.x86_64 Mono
 >     > path[0] =
 >     > '/home/forge/server/Server_Data/Managed'
 >     > Mono path[1] =
 >     > '/home/forge/server/Server_Data/Mono'
 >     > Mono config path =
 >     > '/home/forge/server/Server_Data/Mono/etc'
 >     > PlayerConnection initialized from
 >     > /home/forge/server/Server_Data (debug
 >     > = 0) PlayerConnection initialized network socket : 0.0.0.0
 > 55205
 >     > Multi-casting "[IP] 206.189.27.151
 >     > [Port] 55205 [Flags] 2 [Guid]
 >     > 161226713 [EditorId] 2169020580
 >     > [Version] 1048832 [Id]
 >     > LinuxPlayer(206.189.27.151) [Debug] 0"
 >     > to [225.0.0.222:54997]... Started
 >     > listening to [0.0.0.0:55205] Unable to
 >     > preload the following plugins:
 >     >         ScreenSelector.so PlayerConnection already initialized -
 >     > listening to [0.0.0.0:55205] Player
 >     > data archive not found at
 >     > `/home/forge/server/Server_Data/data.unity3d`,
 >     > using local
 >     > filesystem♥##unity-automation:{"messageType":"MemoryLeaks","allocatedMemory":25585,"memoryLabels":[{"Permanent":12608},{"NewDelete":8},{"Manager":104},{"GfxDevice":336},{"Serialization":9152},{"BaseObject":360},{"Terrain":176},{"String":617},{"DynamicArray":16},{"PoolAlloc":-176},{"ScriptManager":1776},{"Unet":16},{"CloudService":360},{"SceneManager":232}]}


The heart is where I cancelled out of the game, and it prints what appears to be a memory leak report!

I connected to the server during this test (or so it appears to) but I don't see any 'player connected' message in the output or anything like that? And there's no error messages to tell me it failed to connect to the database (which it undoubtly is)... which leads me onto another question, I am using a mysql dll to connect to the database, but I fear this may not work in Linux since it's a DLL and not an SO??

I've also tried running the game without -batchmode and -nographics, and it outputs this... (same build, so with headless option enabled)

 > ./Server.x86_64 Set current directory
 > to /home/forge/server Found path:
 > /home/forge/server/Server.x86_64 Mono
 > path[0] =
 > '/home/forge/server/Server_Data/Managed'
 > Mono path[1] =
 > '/home/forge/server/Server_Data/Mono'
 > Mono config path =
 > '/home/forge/server/Server_Data/Mono/etc'
 > PlayerConnection initialized from
 > /home/forge/server/Server_Data (debug
 > = 0) PlayerConnection initialized network socket : 0.0.0.0 55058
 > Multi-casting "[IP] 206.189.27.151
 > [Port] 55058 [Flags] 2 [Guid]
 > 496774710 [EditorId] 2169020580
 > [Version] 1048832 [Id]
 > LinuxPlayer(206.189.27.151) [Debug] 0"
 > to [225.0.0.222:54997]... Started
 > listening to [0.0.0.0:55058] Unable to
 > preload the following plugins:
 >         ScreenSelector.so PlayerConnection already initialized -
 > listening to [0.0.0.0:55058] Player
 > data archive not found at
 > `/home/forge/server/Server_Data/data.unity3d`,
 > using local filesystemStacktrace:
 > 
 > 
 > Native stacktrace:
 > 
 >         /home/forge/server/Server_Data/Mono/x86_64/libmono.so(+0x91be1) [0x7f1ba099abe1]
 >         /lib/x86_64-linux-gnu/libpthread.so.0(+0x1288f)
 > [0x7f1ba3f6f88f]
 >         /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)
 > [0x7f1ba305ee97]
 >         /lib/x86_64-linux-gnu/libc.so.6(abort+0x140)
 > [0x7f1ba3060800]
 >         ./Server.x86_64() [0xf0a65b]
 >         /home/forge/server/Server_Data/Mono/x86_64/libmono.so(+0xd0c46) [0x7f1ba09d9c46]
 >         /home/forge/server/Server_Data/Mono/x86_64/libmono.so(+0x34a12) [0x7f1ba093da12]
 >         /lib/x86_64-linux-gnu/libpthread.so.0(+0x1288f)
 > [0x7f1ba3f6f88f]
 >         ./Server.x86_64(SDL_GL_GetAttribute_REAL+0x1e3)
 > [0x1a9c7a3]
 >         ./Server.x86_64() [0x1927a47]
 >         ./Server.x86_64() [0x192640f]
 >         ./Server.x86_64() [0x19264cd]
 >         ./Server.x86_64() [0x18eca73]
 >         ./Server.x86_64() [0x4a3de6]
 >         /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe6) [0x7f1ba3041b96]
 >         ./Server.x86_64() [0x4aee18]
 > 
 > Debug info from gdb:
 > 
 > 
 > ================================================================= Got a SIGABRT while executing native
 > code. This usually indicates a fatal
 > error in the mono runtime or one of
 > the native libraries used by your
 > application.
 > =================================================================
 > 
 > Aborted (core dumped)

I'm not sure what to make of these varying error messages? How can I better debug the server, I see no true log files?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by wooolly · Aug 20, 2018 at 09:17 AM

I was able to add the -logFile argument when trying to run the server and I was able to debug and resolve my issues, for anyone who is struggling running on a command line.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

97 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Linux Headless -- Application.Quit() doesn't work? 1 Answer

Headless linux server 2 Answers

Unity networking tutorial? 6 Answers

How to remove unneeded references (texture, audio) when doing headless server builds? 2 Answers

Render to 'RenderTexture' in 'Headless Mode' 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges