[AG-TECH] Problems with Access Grid 3.0.2

Nico nmolina at cesga.es
Mon Oct 22 10:37:20 CDT 2007


Hi Chris again!

Well, I don't where to start but I'll try to explain all my problems as 
well as I can because I have some difficulties with English.

I didn't try all the solutions you gave me in the last email, but I 
tried the last solution changing the address in "persistenceFilename" 
entry as this:

persistenceFilename = /home/ag/venue_server3/VenueServer.dat  (The same 
for the Data folder)

Then, I rebooted the machine and it didn't work, in fact I think I 
obtained some errors, but I'm not sure. So I correct VenueServer.cfg 
again. After that I started to have problems with Access Grid 2.4 too (I 
have another script on the startup for VenueServer24). At any way, is 
not the first problem I have with AG2.4. The problem I have is that 
VenueServer.dat (for AG2.4) become corrupt file and VenueServer24 runs 
but with problems, when I execute it I have this messages:

Traceback (most recent call last):
  File "/usr/bin/VenueServer24", line 143, in ?
    main()
  File "/usr/bin/VenueServer24", line 105, in main
    venueServer = VenueServer(server, app.GetOption('configfilename'))
  File 
"/usr/lib/python2.4/site-packages/AccessGrid2/AccessGrid/VenueServer.py", 
line 266, in __init__
    self.LoadPersistentVenues(self.persistenceFilename)
  File 
"/usr/lib/python2.4/site-packages/AccessGrid2/AccessGrid/VenueServer.py", 
line 415, in LoadPersistentVenues
    cleanupTime = cp.getint(sec, 'cleanupTime')
  File "/usr/lib/python2.4/ConfigParser.py", line 321, in getint
    return self._get(section, int, option)
  File "/usr/lib/python2.4/ConfigParser.py", line 318, in _get
    return conv(self.get(section, option))
  File "/usr/lib/python2.4/ConfigParser.py", line 520, in get
    raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'cleanuptime' in section: 
'c190248c0648459db8c5401e80b4f0a0'
Traceback (most recent call last):
  File "/usr/lib/python2.4/logging/handlers.py", line 62, in emit
    if self.shouldRollover(record):
  File "/usr/lib/python2.4/logging/handlers.py", line 132, in shouldRollover
    self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature
ValueError: I/O operation on closed file

Therefore the quick solution is deleting Data folder and 
VenueServer.dat, then I run VenueServer24 and I go to VenueManagement24 
to create a default Venue with multicast addresses for video and audio. 
I press Ok to save the configuration and close the program. Then to 
check the configuration I connect a client to the server and I see all I 
configured is ok, however I make a cat to VenueServer.dat and the 
information about the default Venue doesn't appear, the file didn't 
change so it's quite uncomprenhensible. I was trying to get some 
aditional information from Logs and all I could find was this clue:

10/22/07 11:44:12 -1208658240 VenueServer     VenueServer.py:394 DEBUG 
Reading persisted Venues from: VenueServer.dat

As we can see, VenueServer reads Venues configured in VenueServer.dat, 
but this file have NOT the configuration I've introduced in 
VenueManagement. Is it possible that the configuration of Venues is 
loaded from a hidden file? I make a "locate VenueServer.dat" and I have 
this:

/home/ag/certificados/VenueServer.dat
/home/ag/Data_Nico/VenueServer.dat
/home/ag/venue_server3/VenueServer.dat.old
/home/ag/venue_server3/VenueServer.dat
/home/ag/tmp/VenueServer.dat.malo
/home/ag/tmp/VenueServer.dat.backup
/home/ag/tmp/VenueServer.dat
/home/ag/VenueServer.dat.backup
/home/ag/VenueServer.dat
/home/ag/tmp2/VenueServer.dat
/home/ag/AccessGrid.old/VenueServer/VenueServer.dat.backup.2
/home/ag/AccessGrid.old/VenueServer/VenueServer.dat.backup
/home/ag/AccessGrid.old/VenueServer/VenueServer.dat

For now I removed the VenueServer script from the startup. First, it 
must work fine manually, then I'll try to find a solution for the 
startup of the services.

That's it. Thanks for your help!

                                     
                                            Nico.



Christoph Willing escribió:
>
> 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