Jesse writes: > By following the steps to enable verbose logging (as described in man > svc.startd), I somehow managed to cause several services to go into > maintenance. system/cron, system/sac, network/rpc/bind, system/basicreg and > others have all failed, many due to "Start method exited with > $SMF_EXIT_ERR_CONFIG." So, I figure I must have unknowingly mangled one of > the steps in enabling verbose logging and caused a problem with the > configuration of svc.startd. > > I ran /lib/svc/bin/restore_repository with the -seed- option to try to fix > it, to no avail. Same problems persist. > > Any tips on how I might solve this, and if not, is there a more robust way > to blow away and import a new repository without reinstalling my system? > > Thanks, > > -Jesse > > > This message posted from opensolaris.org > _______________________________________________ > smf-discuss mailing list > smf-discuss at opensolaris.org
Jesse and I pursued this off group. It turns out that the services going into the maintenance state had nothing to do with enabling verbose logging. When we looked into the services' logs we found messages like this: svc.startd could not set context for method: chdir: No such file or directory Jesse ran truss on startd and found that the failing directory was /root. Further investigation showed that /etc/passwd declared /root as the home directory for root. When Jesse changed this back to /, the services came up normally. If no working directory is specified for a service (in the method_context for instance), startd uses the home directory of the user ID for the service. Startd attempts to chdir() to the working directory before starting the service. In this case the user was root, so the /root home directory was picked up from /etc/passwd. Details are in the restarter_get_method_context() and restarter_set_method_context() functions which can be found with the Opensolaris source browser at http://cvs.opensolaris.org/source/. Thanks to Jesse for running a number of experiments so that we could track this problem down. tom