Page 1 of 1

Problems running metaserver

Posted: Thu Feb 09, 2012 10:02 pm
by Thalander
So I'm trying to run the metaserver code (rev 67) on a remote server but I'm unable to connect to it on my machine. Here's what I've tried...

Launched an Amazon EC2 micro instance running Ubuntu 12.04 precise. Got a static IP address. Installed gcc and g++ with apt-get. Also installed apache2 and verified that the instance is reachable via HTTP using the static IP address. In the AWS console I modified my security settings to allow inbound traffic on TCP ports 6000-7000 (as well as HTTP port 80 i set to test out apache2). I set my compiler flags as follows (copied from spaghetti/build_settings.txt):

Code: Select all

# What flags/defines the script passes to the compiler:
CFLAGS = \
		-g \
		-Wall \
		-D HARDCODE_USERD_SETTINGS \
#		-D RUNNING_LOCALLY \
		-D BN2_DEMOVERSION \
		-D ALLOW_GUESTS \
		-D DEBUG \
		-D ENABLE_MD5_SUPPORT
and in the same file i also set the BINDIR variable. In spaghetti/utils/environment.h I set USERD_HOST to my static IP address and set METASERVER_ROOT_DIR appropriately. Now, when I run start-mythd.sh I get...

Code: Select all

Starting the user daemon...
Starting 4 room daemon processes...
LAN: 0x7ACF1500 - (23.21.207.122)
Done.
ubuntu@ip-10-244-153-182:~/mythserver_rev67/spaghetti$ error: Unable to initialize user database.
then if I hit enter again I just get returned to my bash prompt. If I run

Code: Select all

ps aux | grep roomd
or

Code: Select all

ps aux | grep userd
nothing is returned in either so it's clear that the metaserver is not running. It doesn't seem to matter that I told the compiler that I wanted to compile it in BN2_DEMOVERSION, it still seems to want access to the user database. The HowTo.txt says to execute

Code: Select all

./bin/users_new -b
but there is no executable users_new in the bin folder. I tried running

Code: Select all

./bin/userd_new -b
and it says:

Code: Select all

LAN: 0x7ACF1500 - (23.21.207.122)
creating both new users and new orders databases
and created db/orders.dat and db/users.dat, so I assume that's just a typo of the binary name in the HowTo. I ran start-mythd.sh again and the metaserver seemed to be running. ps returned four instances of roomd and one instance of userd. I go to Myth, which has all other server plugins removed and my static IP set in the appropriate tag. My network monitor confirms that Myth is attempting to make a TCP connection to my static IP address on port 6321, but then it immediately returns that the metaserver is not responding (check your network connection and try again). At this point I go back to my ssh session and do my ps aux | grep userd and ps aux | grep roomd and there are no instances of either process, like the act of connecting from Myth is killing the processes.

Any ideas on what to try? I know I had this code running successfully before on Mac OS X about a year or so ago even building a plugin and having several people connect remotely. Is it something with Myth 1.7.2 or Ubuntu perhaps. Thanks for any help!

Re: Problems running metaserver

Posted: Wed Feb 15, 2012 1:19 pm
by Melekor
I know nothing about the metaserver, and not much about network programming, but if it were me I would probably try to find out what is killing the daemons by running them under a debugger. If you can find that out, it might give you another clue what the problem is.

Re: Problems running metaserver

Posted: Thu Feb 16, 2012 9:14 pm
by punkUser
Yeah I imagine Myrd would be the most help here... I'm only familiar with the metaserver at a high level and I'm not familiar with how it runs on *nix and the associated setup.