On Thu, 2012-08-09 at 10:53:45 +0000, PICCA Frédéric-Emmanuel wrote: > ok, I did this > > id > start-stop-daemon --start --quiet --chuid tango:tango --background \ > --make-pidfile --pidfile $PIDFILE --exec $DAEMON --test > > /dev/null \ > || return 1 > start-stop-daemon --start --quiet --chuid tango:tango \ > --make-pidfile --pidfile $PIDFILE --exec /usr/bin/id \ > || return 2 > > here the ouput is the same in both cases > > root@mordor:/etc/init.d# invoke-rc.d tango-db start > uid=0(root) gid=0(root) groupes=0(root) > uid=107(tango) gid=115(tango) groupes=115(tango)
Ok, this looks normal. > > Could you add a call to «id» in the init script before the one to > > «start-stop-daemon» and run it in both environments? After that it > > might help to then replace the DAEMON with also just «id». > > If I put just id instead of /usr/bin/id, I got this in both cases Yeah sorry, I should have mentioned you need the full pathname. > so now with the real DAEMON > > from su > > root@mordor:/etc/init.d# invoke-rc.d tango-db start > uid=0(root) gid=0(root) groupes=0(root) > Starting /usr/lib/tango/DataBaseds... > main(): arrived > Received a CORBA::Exception > Tango exception > Severity = ERROR > Error reason = CANNOT_CONNECT_MYSQL > Desc : Failed to connect to TANGO database (error = Access denied for user > 'picca'@'localhost' (using password: NO)) > Origin : DataBase::init_device() > > Exiting > > now from the console I have a new comportment > > root@mordor:/etc/init.d# invoke-rc.d tango-db start > uid=0(root) gid=0(root) groupes=0(root) > Starting /usr/lib/tango/DataBaseds... > main(): arrived > Received a CORBA::Exception > Tango exception > Severity = ERROR > Error reason = CANNOT_CONNECT_MYSQL > Desc : Failed to connect to TANGO database (error = Access denied for user > 'root'@'localhost' (using password: NO)) > Origin : DataBase::init_device() > > Exiting > So from the id command it seems that start-stop-daemon set the right uid > and gid. now I do not understand how the mysql client library get thoses > uid and gid ??? > > maybe this is a mysql client error (it use to work at least with mysql > 5.1) now that we migrates to mysql 5.5 ? > > the code of the DAEMON is located in the DataBaseUtils.cpp file from the > tango source package if you want to discuss with the MySQL maintainer. > > but what is really strange is that during the boot process, I have a > running DAEMON, so it work at least during the boot process... Ok, then this seems like most probably the user is being taken from the environment, and that should be easy to spot. Just try «env|grep picca» from both environments and one of them might have a variable set to that, like USER, LOGNAME, etc, which gets honoured by either tango-db or mysql. Also I'm guessing «sudo service tango-db start» would work fine too, as that strips most of the user environment. > PS: I am in VAC from now to the end of the next week, I could continue > to investigate then. There's really no hurry, so next week seems good. thanks, guillem -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org