Srinivas Krishnan writes: > Hi > > My observation why service goes to initialized state is Property Group > restarter and restarter_actions does not get created when the service is > created using Java API's.
You know the Java APIs are prototype only, and will be changing over time, right? (That's why they're a download from the vpanels project, not part of ON yet.) > > But when we reimport the manifest file restarter and restarter_actions > are getting created. How to create restarter and restarter_actions > property group elements using Java API's. What are the property elements > need to be set ? You shouldn't need to set either of these. They're initialized not by the manifest import, but by svc.startd (for restarter) and svcadm (for restarter_actions). I wanted to confirm this, so I did an experiment using svccfg: # svccfg svc:> add foobar svc:> select foobar svc:/foobar> add default svc:/foobar> select default svc:/foobar:default> addpg general framework svc:/foobar:default> setprop general/enabled = boolean: true (At this point, svc.startd notices a new service with the general property group, and starts it if enabled=true. Creation of the general/enabled property is the point at which svc.startd notices there's a new service to be managed.) # svcadm refresh foobar # svcs foobar STATE STIME FMRI online 12:54:30 svc:/foobar:default # svcprop foobar:default general/enabled boolean true restarter/logfile astring /var/svc/log/foobar:default.log restarter/auxiliary_state astring none restarter/next_state astring none restarter/state astring online restarter/state_timestamp time 1171659555.767664000 restarter_actions/refresh integer So, really, you don't need to manually add restarter or restarter_actions. (And please don't do so.) You can end up in uninitialized if you don't have general/enabled created, but you do have other properties set in the general property group. Still, once you add enabled and do a refresh, things should work fine. I logged into your machine, and it looks like the :admin-server instance is enabled and running. So, I'm not sure what other hints to give, because your service seems OK. If you've got test code which exhibits the problem, please share it. liane -- Liane Praza, Solaris Kernel Development liane.praza at sun.com - http://blogs.sun.com/lianep