I'm following the instructions at https://www.freeorion.org/index.php/Multiplayer for "Hosting a game on external server". I've done this before but not in a while.
I'm on a Mac and Lubuntu. I've tried a bunch of things. I tried selecting Multiplayer and "Host a new game" and tried connecting with the other computer and that works. It doesn't matter which is the host, it works.
But when I start freeoriond from the terminal I get a black screen on the other computer when I click "Join" and "Ok". I ran ps to see exactly what args the GUI is using and I tried those args in the command line (--resource.path "/Applications/FreeOrion.app/Contents/Resources/default"). But no matter what, if I start freeoriond independent of the GUI I can't seem to get it to work but it works fine if I run it from the GUI.
Can't get external server to work
Moderator: Oberlus
Re: Can't get external server to work
If you don't use GUI to start external server add --hostless command line argument.
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Can't get external server to work
If you want to keep it running use something like this:
Code: Select all
freeoriond --hostless --network.server.unconn-human-empire-players.max 0 --network.server.conn-human-empire-players.min 0
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!
Re: Can't get external server to work
It worked on macOS! Thank you!
However, it didn't work in my container and had trouble on Lubuntu. So many different issues and I'm trying to keep them in their own threads...
Anyway. When I fix the libraries in the snap version with ldconfig (I just posted about that here: viewtopic.php?f=25&t=11564) and then run it with --hostless it complains:
Maybe this has something to do with how I fixed the libraries.
The snap freeorion works fine.
Second, I just found out about the version from https://launchpad.net/~o01eg/+archive/u ... ion-stable.
This version runs freeorion fine but it also has an issue running freeoriond but I'll post about that in this thread: viewtopic.php?f=2&t=10942&start=135
(sorry if all the thread jumping is annoying, I'm just trying to keep the threads about the subject.)
However, it didn't work in my container and had trouble on Lubuntu. So many different issues and I'm trying to keep them in their own threads...
Anyway. When I fix the libraries in the snap version with ldconfig (I just posted about that here: viewtopic.php?f=25&t=11564) and then run it with --hostless it complains:
Code: Select all
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unabel to get teh locale encoding
ModuleNotFoundError: No module named 'encodings'
The snap freeorion works fine.
Second, I just found out about the version from https://launchpad.net/~o01eg/+archive/u ... ion-stable.
This version runs freeorion fine but it also has an issue running freeoriond but I'll post about that in this thread: viewtopic.php?f=2&t=10942&start=135
(sorry if all the thread jumping is annoying, I'm just trying to keep the threads about the subject.)
Re: Can't get external server to work
Could you try setup PYTHONHOME environment variable? https://techglimpse.com/error-executing ... -solution/
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Can't get external server to work
o01eg wrote: ↑Thu Feb 18, 2021 5:44 amCould you try setup PYTHONHOME environment variable? https://techglimpse.com/error-executing ... -solution/
Code: Select all
> ls -l /usr/bin/python3
.. /usr/bin/pthon3 -> python3.8
> export PYTHONHOME=/usr/lib/python3.8
> cd /snap/freeorion/current
> ./bin/freeoriond --hostless
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
...
> python3
...
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
...
> unset PYTHONHOME
> python3
Python 3.8.5 (...)
...
>>> print("Hello World")
Hello World
>>>