HOWTO: Setup and configure vegaserver.

A forum for online playing, administration, bugs and feature requests
Post Reply
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

HOWTO: Setup and configure vegaserver.

Post by pheonixstorm »

I think the one thing that has turned people away from setting up the vegaserver has been first and foremost the lack of any documentation on how to setup vegaserver to run as an mmo. Deathmatch is the default setting in the vegastrike.config file (which I have found is what vegaserver reads as well). So, if all you want is a dogfight with friends you should be (nearly) good to go. I have not done enough initial testing for deathmatch to make sure 100% that it works out of the box the way it should, but i'm confident it will.

There are two main files to edit to get the mmo aspect working: vegastrike.config and settings.py. These two files control everything you need to get up and running (without crashing when a client tries to connect.

First we will look at my working settings.py which can be found in /cgi-accountserver as well as a few other files.

Code: Select all

# Full path to the directing holding data.
data_path='E:\Games\Vegastrike51'  #path to /data, for windows users this is the install directory

mods = {
	# Default
	''       : {
		'path': '', #root directory
		'name': 'Vega Strike main',
		'servers':{
			'': '127.0.0.1:6777', # localhost configuration, default port 
			}
		},
	# Test server -- Mod example
	'test'   : {
		'path': 'test',
		'name': 'Vega Strike Test Server',
		'servers':{
			'Sol': '127.0.0.1:6779',
			'': '127.0.0.1:6778',
			}
		},
	}

file_dbconfig = {
	'type':    'file',
	'storage': 'E:\Games\VegaStrike51_b2\data\db',
}

mysql_dbconfig = {
	'type':       'mysql',
	'host':       '127.0.0.1',
	'port':       '3306',
	'passwd':     'somepassword',
	'user':       'your_db_user',
	'db':         'vegastrike',
	'user_table': 'phpbb_users',
	'account_table': 'accounts',
	'create_user':False,
}

dbconfig = file_dbconfig #Set which to use. File or MySQL. For full mmo play mysql is recommended

password_hash_methode = 'md5' #password can use sha or md5 hash metode

http_port = 8080 # Port number for httpserver.py
Simple enough, yes?

Now, 2 sections to change in vegastrike.config

Code: Select all

<!-- Tell if the *SERVER* uses an account server (set to false for deathmatch) -->
<var name="useaccountserver" value="true"/>
I think this is the heart of the evil. Without changing this you cannot login using accountserver. The client will sit for a bit and then crash. This only has to be set for vegaserver, not vegastrike. The next section is the opposite.

Code: Select all

<var name="account_server_url" value="http://127.0.0.1:8080/cgi-bin/accountserver.py"/>
<var name="server_ip" value="127.0.0.1"/>
<var name="server_port" value="6777"/>
<!-- Tells if the *CLIENT* uses an account server to find the server IP -->
<var name="use_account_server" value="true"/>
The first line is what assigns the address for the accountserver
Second line is the server IP/URL (ie vega-strike.org or 127.0.0.1)
Fifth line must be set to true if your going mmo, same as the config for vegaserver.

That should cover the basics for now. Any questions? As I find more information on setting I will post it here.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: HOWTO: Setup and configure vegaserver.

Post by pheonixstorm »

Reserved for future use.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
Hicks
Bounty Hunter
Bounty Hunter
Posts: 153
Joined: Sat Oct 22, 2011 9:17 am

Re: HOWTO: Setup and configure vegaserver.

Post by Hicks »

is all the information in here still correct and valid, was looking at the files and the format and a few other things appear to have changed
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: HOWTO: Setup and configure vegaserver.

Post by pheonixstorm »

As far as I know everything here is still valid.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
Hicks
Bounty Hunter
Bounty Hunter
Posts: 153
Joined: Sat Oct 22, 2011 9:17 am

Re: HOWTO: Setup and configure vegaserver.

Post by Hicks »

Can't seem to get a deathmatch server running with 5.1 release client, works with the SVN version though. Both client and server crash when i try to connect, using localhost adress, and using a callsign name
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: HOWTO: Setup and configure vegaserver.

Post by pheonixstorm »

Make any changes with the release client?
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
Hicks
Bounty Hunter
Bounty Hunter
Posts: 153
Joined: Sat Oct 22, 2011 9:17 am

Re: HOWTO: Setup and configure vegaserver.

Post by Hicks »

ignore my previous post, i just made a really stupid mistake, bloody Program Files (x86) being a pain in the arse
GuileGriever
Star Pilot
Star Pilot
Posts: 5
Joined: Sun Dec 15, 2013 3:41 am

Re: HOWTO: Setup and configure vegaserver.

Post by GuileGriever »

I did this and my vegaserver and game both close the moment they start up. The server says it cannot find configurations right after it finds the config file. Help please?
Obu
Merchant
Merchant
Posts: 34
Joined: Thu Dec 22, 2005 9:30 am

Re: HOWTO: Setup and configure vegaserver.

Post by Obu »

Hi all,
Hicks wrote:ignore my previous post, i just made a really stupid mistake, bloody Program Files (x86) being a pain in the arse
Does it mean installing Vegastrike in the "Program Files" folder (I run it with XP) leads to to crash of the vegaserver ?? My VS 0.5.1. is installed in this "program files", as the installer proposes it by default if I do remember... I tried to run it both as independent server (using my local network at home with my box first), and for MMO mode, but both the vegaserver and the game (whatever the computer, local or distant) crashed after I clicked the join game button.

Would I install it in c:/ ??

Thanks for your answers !
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: HOWTO: Setup and configure vegaserver.

Post by pheonixstorm »

You could install on C but would be better to do so in C:\Games or some such. Easier to use and can handle more than just VS w/o the extra clutter. Post your stderr and stdout(?) files. Been awhile since I've done any work on VS so my knowledge is slightly rusty.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
Obu
Merchant
Merchant
Posts: 34
Joined: Thu Dec 22, 2005 9:30 am

Re: HOWTO: Setup and configure vegaserver.

Post by Obu »

Hi Pheonixstorm,

I meant c:/something, you're right. I think i'll try to install it again as you suggest.

Here are the stderr.txt and stdout.txt after VS crashed. I also put at the end a copy of what I get in the vegaserver window. There is an error with a file but it seems just like it's not important as the server runs already... It's strange but you will perhaps find something here too ?

Thanks a lot for your answers and help :D

------------------------------------

(stderr.txt)

GOT SUBDIR ARG =
Found data in C:\Program Files\Vega Strike 0.5.1
Using C:\Program Files\Vega Strike 0.5.1 as data directory
USING HOMEDIR : C:\Program Files\Vega Strike 0.5.1/.vegastrike As the home directory
CONFIGFILE - No config found in home : C:\Program Files\Vega Strike 0.5.1/.vegastrike/vegastrike.config
CONFIGFILE - No home config file found, using datadir config file : C:\Program Files\Vega Strike 0.5.1/vegastrike.config
MISSION_NAME is empty using : main_menu.mission
Attempt to call ReadFull on a bad file units.csv -1 C:\Program Files\Vega Strike 0.5.1/units/units.csv
running import sys
print sys.path
sys.path = [r"C:\Program Files\Vega Strike 0.5.1\modules\builtin",r"C:\Program Files\Vega Strike 0.5.1\modules\quests",r"C:\Program Files\Vega Strike 0.5.1\modules\missions",r"C:\Program Files\Vega Strike 0.5.1\modules\ai",r"C:\Program Files\Vega Strike 0.5.1\modules",r"C:\Program Files\Vega Strike 0.5.1\bases"] + sys.path
testing VS randomrunning import sys
print sys.path
Initializing renderer...
Min (0.000000, 0.000000, 0.000000) Max(0.000000, 0.000000, 0.000000) MinLumin 1.000000, MaxLumin 1.000000Read In Star Count 0 used: 2000
Min (0.000000, 0.000000, 0.000000) Max(0.000000, 0.000000, 0.000000) MinLumin 1.000000, MaxLumin 1.000000Read In Star Count 0 used: 38
Loading a starsystem
Loading Star System Special/Empty
FOUND MODIFICATION = player FOR PLAYER #0
CreateVideoTexture could not find preintro.ogv
CreateVideoTexture could not find intro.ogv
ng\lowlevel\vsnet_dloadmgr.cpp:74 Enter VsnetDownload::Client::Manager::Manager
networking\netclient_login.cpp:386 enter NetClient::init with localhost:6777
\networking\lowlevel\netui.cpp:155 enter NetUITCP::createSocket
\networking\lowlevel\netui.cpp:18 Initializing Winsock
\networking\lowlevel\netui.cpp:38 Resolving host name... found : 127.0.0.1
\networking\lowlevel\netui.cpp:75 Connecting to 127.0.0.1 on port 6777
\networking\lowlevel\netui.cpp:169 Connected to 127.0.0.1:6777
g\lowlevel\vsnet_sockettcp.cpp:71 enter VsnetTCPSocket::VsnetTCPSocket
\networking\lowlevel\netui.cpp:174 SOCKETALT FD: 1452
networking\netclient_login.cpp:401 created TCP socket (localhost,6777) -> 076139B8
g\lowlevel\vsnet_sockettcp.cpp:417 Received EWOULDBLOCK in data.true
e\src\networking\netclient.cpp:559 Rcvd TCP: CMD_CONNECT from serial 0
networking\netclient_login.cpp:69 enter NetClient::loginLoop
networking\netclient_login.cpp:84 Sent login for player <>:<*******>
- buffer length : 8
e\src\networking\netclient.cpp:559 Rcvd TCP: CMD_CHOOSESHIP from serial 0
networking\netclient_login.cpp:122 End of login loop
e\src\networking\netclient.cpp:559 Rcvd TCP: LOGIN_ERROR from serial 0
e\src\networking\netclient.cpp:621 >>> LOGIN ERROR =( DENIED )= ------------------------------------------------
g\lowlevel\vsnet_sockettcp.cpp:301 Closing connection to server : Warning: disconnected

----------------

(stdout.txt)

In path C:\Program Files\Vega Strike 0.5.1
Windows version 5 1
Vega Strike
See http://www.gnu.org/copyleft/gpl.html for license details.

Using .vegastrike as the home directory
['C:\\Program Files\\Vega Strike 0.5.1\\python27.zip', '.\\DLLs', '.\\lib', '.\\lib\\plat-win', '.\\lib\\lib-tk', 'C:\\Program Files\\Vega Strike 0.5.1']
['C:\\Program Files\\Vega Strike 0.5.1\\modules\\builtin', 'C:\\Program Files\\Vega Strike 0.5.1\\modules\\quests', 'C:\\Program Files\\Vega Strike 0.5.1\\modules\\missions', 'C:\\Program Files\\Vega Strike 0.5.1\\modules\\ai', 'C:\\Program Files\\Vega Strike 0.5.1\\modules', 'C:\\Program Files\\Vega Strike 0.5.1\\bases', 'C:\\Program Files\\Vega Strike 0.5.1\\python27.zip', '.\\DLLs', '.\\lib', '.\\lib\\plat-win', '.\\lib\\lib-tk', 'C:\\Program Files\\Vega Strike 0.5.1']
0 joysticks were found.

The names of the joysticks are:
Compiling python module modules/dj.py
using NV_CUBE_MAP
Initializing optimizer
Compilation of technique fixed successful
Compilation of technique 5_ps3.0/default successful
Compilation of technique 5_ps3.0/default_simple successful
pox 119990000000.000000 -9000000.000000 -109990000000.000000
INFO: Missing video stream preintro.ogv
INFO: Missing video stream intro.ogv
Force feedback support disabled when compiled
Loading active missions True
IS NOW A

----------------------------

in vegaserver window :

... (many things before, with some warnings)

['C:\\Program Files\\Vega Strike 0.5.1\\modules\\builtin', 'C:\\Program Files\\V
ega Strike 0.5.1\\modules\\quests', 'C:\\Program Files\\Vega Strike 0.5.1\\modul
es\\missions', 'C:\\Program Files\\Vega Strike 0.5.1\\modules\\ai', 'C:\\Program
Files\\Vega Strike 0.5.1\\modules', 'C:\\Program Files\\Vega Strike 0.5.1\\base
s', 'C:\\Program Files\\Vega Strike 0.5.1\\python27.zip', '.\\DLLs', '.\\lib', '
.\\lib\\plat-win', '.\\lib\\lib-tk', 'C:\\Program Files\\Vega Strike 0.5.1']
!!! ERROR : opening dynamic universe file dynaverse.dat !!!


======== SERVER IS NOW RUNNING ========
Server Port: 6777
Server IP Addresses:
192.168.1.21 (Local Area Network)
192.168.1.24 (Local Area Network)
192.168.56.1 (Local Area Network)
You can also connect locally using 'localhost'
Private Server
---------------------------------------
To stop this server, hit Ctrl-C, Ctrl-\, Ctrl-Break, or close this window.

Have fun!

(... after I choose a ship, I click on "join game", and then Vegastrike crashes , and those lines are added )

------------------------------------------
ServerSocketTCP for 132 selected
------------------------------------------


owlevel\vsnet_serversocket.cpp:51 accepted new sock 252
g\lowlevel\vsnet_sockettcp.cpp:71 enter VsnetTCPSocket::VsnetTCPSocket
owlevel\vsnet_serversocket.cpp:81 A connection has been accepted
tworking\netserver_clients.cpp:31 - Actual number of clients : 1
owlevel\vsnet_serversocket.cpp:87 No accepted TCP connection
c\networking\netserver_net.cpp:117 Rcvd TCP: CMD_CONNECT from serial (not ingam
e)
c\networking\netserver_net.cpp:117 Rcvd TCP: CMD_LOGIN from serial (not ingame)

e\src\networking\netserver.cpp:685 >>> LOGIN REQUEST ---------------------------
-----------
e\src\networking\netserver.cpp:748 <<< LOGIN REQUEST ---------------------------
-----------
c\networking\netserver_net.cpp:117 Rcvd TCP: CMD_CHOOSESHIP from serial (not in
game)
networking\netserver_login.cpp:438 >>> SEND LOGIN ERROR ------------------------
-----------------------------------------
networking\netserver_login.cpp:440 <<< SENT LOGIN ERROR ------------------------
-----------------------------------------------
g\lowlevel\vsnet_sockettcp.cpp:362 Connection closed in header
g\lowlevel\vsnet_sockettcp.cpp:286 VsnetTCPSocket::recvbuf connection is closed
, disconnecting(eof)
tworking\netserver_clients.cpp:642 enter NetServer::disconnect
*** from ..\..\vegastrike\src\networking\netserver.cpp:437
*** disconnecting because of TCP peer closed
g\lowlevel\vsnet_sockettcp.cpp:303 NetServer::logout : Warning: disconnect null
socket: No such file or directory
tworking\netserver_clients.cpp:666 Client disconnected
tworking\netserver_clients.cpp:667 There were 1 clients - tworking\netserver_cli
ents.cpp:684 0 clients left
g\lowlevel\vsnet_sockettcp.cpp:77 enter VsnetTCPSocket::~VsnetTCPSocket
Eye~R
Hunter
Hunter
Posts: 70
Joined: Sun Jan 19, 2014 5:02 am

Re: HOWTO: Setup and configure vegaserver.

Post by Eye~R »

Running httpserver.py ? Doesn't look like it's able to auth accounts? somehow causing client to crash in failure... Alternate is to mark the config to to use the accountserver (requiring no login)
Multiplayer Server Offline. Copy ony testing rig semi-funcitonal.
User Signup Offline.
Server Health Shows old data from last snapshot before the server downed.

If you have any issues you can usually find me in #vegastrike on freenode.
Post Reply