Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 cr4y · Nov 28, 2012 at 12:50 PM · serverlinuxhostubuntubatchmode

Unity server on Amazon EC2 Ubuntu?

Problem description:

We have developed client-server application in Unity. Up to now, server was running on EC2 Amazon on Windows (for some reason Unity is working in -batchmode only there). Unfortunately on Ubuntu Linux on EC2 same command with same hardware configuration results in "Aborted (core dumped)" error message.

What is in Unity project:

I've made test with simplest project possible: empty scene without camera, with one gameObject + one script that is creating empty file on HDD (just to prove that anything works, we're running in headless mode). I've set quality to minimum possible, made sure that player doesn't need focus, and created developer release to have debug messages.

How are we testing:

As Ashkan Sa'eedi suggested, we are trying to run it on xvfb, using command:

 xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' ./Unity -batchmode -nographics -logfile log.txt

[Earlier we've tried VNC, but we've failed too]

Results:

It runs on local machine (Ubuntu 12.04, x86_64). After copying it to EC2 (Ubuntu 12.10, x86_64) using scp, we have first problem:

 The assembly mscorlib.dll was not found or could not be loaded.
 It should have been installed in the `/home/ubuntu/CreateFile_Data/Managed/mono/2.0/mscorlib.dll' directory.

Strange, but after some googling I've found solution: http://stackoverflow.com/questions/10490155/unable-to-run-net-app-with-mono-mscorlib-dll-not-found-version-mismatch. So I've installed mono and created symbolic link pointing to it inside of my project.

Result: application runs and writes:

 Set current directory to /home/ubuntu/:/debug
 Found path: /home/ubuntu/:/debug/CreateFile
 Aborted (core dumped)

And in a log.txt file:

 Stacktrace:
 
 
 Native stacktrace:
 
     /home/ubuntu/:/debug/CreateFile_Data/Mono/x86_64/libmono.so(+0x8fc73) [0x7f703dc4ec73]
     /home/ubuntu/:/debug/CreateFile_Data/Mono/x86_64/libmono.so(+0xcfc9d) [0x7f703dc8ec9d]
     /lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x7f7040546cb0]
     ./CreateFile() [0xa616c7]
     ./CreateFile() [0xa4ba9a]
     ./CreateFile() [0xa66ae3]
     /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f703f77b76d]
     ./CreateFile() [0x41f519]
 
 Debug info from gdb:
 
 Could not attach to process.  If your uid matches the uid of the target
 process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
 again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
 ptrace: Operation not permitted.
 No threads.
 
 =================================================================
 Got a SIGSEGV while executing native code. This usually indicates
 a fatal error in the mono runtime or one of the native libraries 
 used by your application.
 =================================================================

If someone could help me with that, it would be really great.

Thanks in advance!

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Ashkan_gc · Dec 17, 2012 at 09:59 AM

It should work using xvfb

Comment
Add comment · Show 1 · 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
avatar image cr4y · Jan 19, 2013 at 11:12 AM 0
Share

Thanks, your idea was brilliant, but unfortunately it doesn't work (application stops immediately without too much info).

avatar image
0

Answer by webcoyote · May 21, 2013 at 02:46 AM

After encountering the same issue, I discovered that "-nographics" is the culprit. If you remove that option from your command it should work properly.

/opt/gamesrv/current/gamesrv-run.sh ->

 #!/bin/bash
 export HOME=/opt/gamesrv/current
 cd $HOME
 exec 2>&1
 exec xvfb-run --auto-servernum --server-args="-screen 0 640x480x24:32"  \
   ./gamesrv.bin -batchmode                                              #


Note the use of "exec" in the script file to ensure that the caller of the script doesn't get detached from the game server.

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

14 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

Related Questions

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

Linux game server 1 Answer

Headless linux server 2 Answers

Batchmode on linux 1 Answer

Unity networking tutorial? 6 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