[Spread-users] problem with non-root spread -l y

Jonathan Stanton jonathan at cnds.jhu.edu
Tue May 1 23:54:33 EDT 2007


The logging done by -l is really very internal debug logs and is not
normally used by anyone except for a very few odd membership debugging
cases, so it wouldn't surprise me if it doesn't honor the root
runtimedir option. 

So the short fix is not to use the -l y switch :-)

The main spread logging is done by Alarm() calls and will 
be output to whereever is specified in the spread.conf file using the 
EventLogFile option. You can definitely specify where that log should go 
to keep it in the runtime dir. 

Cheers,

Jonathan

On Fri, Apr 27, 2007 at 01:24:42PM +0200, Thomas Seeling wrote:
> Hallo,
> 
> 
> I am starting with spread 4.0.0, and I want to configure to run the daemon 
> non-root.
> The daemon starts fine, but then aborts with a strange error message.
> I have added some more debug output to log.c and I found out that there's 
> a status file in the daemon's directory.
> This only occurs when the daemon is started with -l y. It runs fine if I 
> leave out that switch.
> 
> in spread.conf I use:
> RuntimeDir = /var/run
> DaemonUser = spread
> DaemonGroup = daemon
> 
> I had expected that logfiles, status files etc. are created in the runtime 
> directory.
> Obviously they are not.
> Note that the entries are starting with UID==0, and then setuid() happens 
> (spread is 13 on my system).
> After the setuid call the spread user can no longer read the status file.
> Is that a setup problem on my system?
> 
> 070427-124020# Conf_load_conf_file: My name: server, id: 192.168.100.100, 
> port: 4803
> 070427-124020# Log_init: using file: 
> /home/ths/src/spread-src-4.0.0/daemon/server as 0
> 070427-124020# Log_alive: using file: 
> /home/ths/src/spread-src-4.0.0/daemon/server as 0
> Membership id is ( -1062706076, 1177670428)
> 070427-124027# --------------------
> 070427-124027# Configuration at server is:
> 070427-124027# Num Segments 1
> 070427-124027#  1       192.168.100.255   4803
> 070427-124027#          server                  192.168.100.100
> 070427-124027# ====================
> 070427-124027# Log_alive: using file: //server as 13
> 070427-124027# Log_alive: error (No such file or directory) could not open 
> file server
> Exit caused by Alarm(EXIT)
> 
> here is an excerpt from log.c. I have added a getcwd and getuid call in 
> Log_init as well as Log_alive.
> 
> static  char    curdir[512];
> 
> void  Log_init()
> {
>   long  start_file_pos;
>         proc    my;
> 
>   Is_inited = 1;
> 
>   my = Conf_my();
>         strncpy( My_name, my.name, MAX_PROC_NAME);
> 
> getcwd(curdir,sizeof(curdir));
> Alarm( PRINT, "Log_init: using file: %s/%s as %d\n", 
> curdir,My_name,getuid());
> 
> ...
> 
> static  void  Log_alive(int dummy, void *dummy_p)
> {
>   long  file_pos;
> 
>   if( !Is_inited ) return;
> getcwd(curdir,sizeof(curdir));
> Alarm( PRINT, "Log_alive: using file: %s/%s as %d\n", 
> curdir,My_name,getuid());
> 
> Tschau...Thomas
> -- 
> "Do you wanna be a legend or a passing footprint on the sands of time?"
> 
> IBM Deutschland GmbH, GTS ITD SSO ESM2
> IBM certified advanced deployment professional Tivoli Enterprise Mgmnt
> Wilhelm-Fay-Str. 30-34, 65936-51 A2F, *134-1221, GSM +49-176-45008348
> 
> Vorsitzender des Aufsichtsrats: Hans Ulrich Maerki 
> Geschäftsführung: Martin Jetter (Vorsitzender), Rudolf Bauer, Christian 
> Diedrich, Christoph Grandpierre, Matthias Hartmann, Andreas Kerstan 
> Sitz der Gesellschaft: Stuttgart
> Registergericht: Amtsgericht Stuttgart, HRB 14562
> WEEE-Reg.-Nr. DE 99369940



> _______________________________________________
> Spread-users mailing list
> Spread-users at lists.spread.org
> http://lists.spread.org/mailman/listinfo/spread-users


-- 
-------------------------------------------------------
Jonathan R. Stanton         jonathan at cs.jhu.edu
Dept. of Computer Science   
Johns Hopkins University    
-------------------------------------------------------




More information about the Spread-users mailing list