[AG-TECH] Problems with Access Grid 3.0.2

Christoph Willing willing at vislab.uq.edu.au
Thu Oct 18 07:04:31 CDT 2007


On 18/10/2007, at 5:24 PM, Nico wrote:

> Hi Chris!
>
> When I start VenueServer manually I use the same command as in the  
> script file. The syntax is the same. I have a little script (called  
> venue_server) in /home/ag/venue_server3 with this line:
>
> VenueServer -c VenueServer.cfg -p 9000 &
>
> So, I just execute at this way: ./venue_server  with  "ag" user.
>
> The entry for 'persistenceFilename' in VenueServer.cfg is  
> 'VenueServer.dat'
>
> persistenceFilename = VenueServer.dat

Nico,

 From this information, I'm pretty sure your problems are related to  
the VenueServer being run from the incorrect directory.

When the server is started manually from the venue_server3 directory,  
it runs correctly. That directory contains the correct  
VenueServer.dat file (and also a Data directory). The  
persistenceFilename set in the VenueServer.cfg file says  
'VenueServer.dat' but note that this is a relative (not absolute)  
path name. The problem is that it is relative to the location the  
server is running from, _not_ relative to the location of the  
VenueServer.cfg file. If the server is run, for instance, from /var/ 
tmp then a VenueServer.dat is expected to be in /var/tmp even when  
you specify the correct VenueServer.cfg file somewhere else. If no  
VenueServer.dat file is found, a new one is created containing just a  
default lobby. If the server is run from /home/ag/venueserver3  
directory then the correct VenueServer.dat file is found.

When you run from the init.d script, you're using a 'daemonAG'  
command which I presume is based on the plain 'daemon' command which  
is sourced from /etc/rc.d/init.d/functions. If you look at the  
definition of the 'daemon' function in that file, you'll see that it  
is just a wrapper for the 'runuser' command (which itself is a cut  
down version of the more traditional 'su' command). You'll also see  
that runuser is invoked with the '-' option i.e. it runs in a login  
shell of the specified user ('ag' in this case). That means that when  
the VenueServer command is run, it is run from ag's home directory / 
home/ag, not /home/ag/venue_server3 as you intend.

My guess is that you see your previous venues because you used to run  
your AG2 venue server the same way and so /home/ag already contains a  
useable VenueServer.dat file (even if its not the one you intend,  
which is in the venue_server3 directory).

Was the AG2 server running at the same time you ran the AG3 server  
from the init.d script? I think this would be a big problem with both  
the AG2 and AG3 servers attempting to use the same .dat file  
simultaneously!

The solution is to have your script cd to the correct directory  
before running VenueServer && preventing it from running from a login  
shell. If your daemonAG is largely a copy of the 'daemon' function  
in /etc/rc.d/init.d/functions, then you could edit daemonAG command  
to remove the '-' option from the invocation of 'runuser' i.e. change  
the line:
     $nice runuser -s /bin/bash - $user -c "$corelimit >/dev/null  
2>&1 ; $*"
to:
     $nice runuser -s /bin/bash $user -c "$corelimit >/dev/null  
2>&1 ; $*"

Then change your init.d script line:
     daemonAG --user ag VenueServer -c /home/ag/venue_server3/ 
VenueServer.cfg -p 9000
to:
   cd /home/ag/venue_server3 && daemonAG --user ag VenueServer -c / 
home/ag/venue_server3/VenueServer.cfg -p 9000

If you use this line, you don't really need to specify the  
VenueServer.cfg location since the VenueServer will look for the cfg  
file in the directory in which it is running i.e. the line could be:
   cd /home/ag/venue_server3 && daemonAG --user ag VenueServer -p 9000


Another possible solution (untried) is to specify an absolute path  
name for the persistenceFilename entry in the VenueServer.cfg file  
i.e. instead of
     persistenceFilename = VenueServer.dat
try:
     persistenceFilename = /home/ag/venue_server3/VenueServer.dat

BTW this problem will also occur with the server's data store which  
is under the 'Data' directory. This is also specified in the  
VenueServer.cfg file as the 'dataStorageLocation = Data' entry.


chris



> Christoph Willing escribió:
>>
>> On 18/10/2007, at 12:33 AM, Nico wrote:
>>
>>> Hi Chris!
>>>
>>> Thanks for answering! When I start from the script in init.d and  
>>> I connect a client and I can see all Venues, but I can't enter in  
>>> any of them because I obtain the error messages I mentioned in  
>>> the first mail.
>>>
>>> In the script I have a line different than you to execute  
>>> VenueServer, but I've specified the "ag" user:
>>>
>>> daemonAG --user ag VenueServer -c /home/ag/venue_server3/ 
>>> VenueServer.cfg -p 9000
>>
>> Nico,
>>
>> When you start the server manually and clients can connect to all  
>> venues, which directory are you starting from? With the line above  
>> there may be a problem with which VenueServer.dat file is used.  
>> What is the entry for 'persistenceFilename' in your /home/ag/ 
>> venue_server3/VenueServer.cfg file?
>>
>>
>> chris
>>
>>
>>> Maybe our scripts are different. I used the syntax from this  
>>> forum:  http://www-unix.mcs.anl.gov/web-mail-archive/lists/ag- 
>>> tech/2006/02/msg00023.html
>>>
>>> VenueServer for version 2.4 runs ok with the same syntax.
>>>
>>> Thanks again for your help! See you soon!
>>>
>>>                      Nico.
>>>
>>> Christoph Willing escribió:
>>>>
>>>> On 17/10/2007, at 9:53 PM, Nico wrote:
>>>>
>>>>> Hi!
>>>>>
>>>>> In our company we have an AG Server on a Linux Fedora Core 4  
>>>>> machine with Access Grid 3.0.2 installed. We have several  
>>>>> Venues configured. During these days I've been configuring  
>>>>> start scripts on the /etc/init.d folder to automatically run  
>>>>> Venue Server at the start of the system. So the proccess  
>>>>> VenueServer is ok when I reboot the machine, but when I connect  
>>>>> a client I can connect to https://server:9000/Venues/default  
>>>>> but I can't enter in any configured Venue on the server, I try  
>>>>> it, but I receive the following error message: "Error entering  
>>>>> venue".
>>>>>
>>>>> So the quick solution is start Venue Server again manually,  
>>>>> then I can enter in any Venue.
>>>>>
>>>>> Could somebody tell me what can happen?
>>>>
>>>>
>>>> Nico,
>>>>
>>>> Are the additional venues you've created actually visible to the  
>>>> client when the server is started from the init.d script?
>>>>
>>>> If not, then my guess is that whenever the server is started  
>>>> from the script in init.d directory, it is being run by the root  
>>>> user instead of the ordinary user who created the additional  
>>>> venue structure. In that case the server starts in the wrong  
>>>> directory and doesn't find the VenueServer.dat file that  
>>>> contains your venue structure (which was created when you ran  
>>>> the server as an ordinary user).
>>>>
>>>> Your init.d script should explicitly cd to the directory  
>>>> containing the correct VenueServer.dat file. It should also su  
>>>> to an ordinary user account to actually run the venue server.
>>>>
>>>> Here is the crucial line in our startup script which starts the  
>>>> server. You can see the cd to the directory which contains the  
>>>> VenueServer.dat file and if that succeeds it runs  
>>>> VenueServer3.py as the user 'ag' (not root).
>>>>
>>>>     cd /var/lib/ag/server_HALL && su ag -c /usr/bin/ 
>>>> VenueServer3.py &
>>>>
>>>> Since you run Fedora, I think your executable will be just  
>>>> 'VenueServer' (rather than 'VenueServer3.py')
>>>>
>>>>
>>>>
>>>> chris
>>>>
>>>>
>>>> Christoph Willing                       +61 7 3365 8350
>>>> QCIF Access Grid Manager
>>>> University of Queensland
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>> Christoph Willing                       +61 7 3365 8350
>> QCIF Access Grid Manager
>> University of Queensland
>>
>>
>>
>>
>>

Christoph Willing                       +61 7 3365 8350
QCIF Access Grid Manager
University of Queensland






More information about the ag-tech mailing list