Re: [zones-discuss] svcadm not executing methods

2010-03-23 Thread Allan
Ed,

Thank you! I did not realize that sysidtool was required and failed to run 
zlogin -C when it was first created. Also thank you for the detailed 
explanation of svcadm. 

Thanks,
Allan
-- 
This message posted from opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] svcadm not executing methods

2010-03-23 Thread Edward Pilatowicz
On Tue, Mar 23, 2010 at 11:42:10AM -0700, Allan wrote:
> Hello,
> 
> This time I decided to create a zone from scratch and see if the problem 
> still persists.
> 
> # zonecfg -z myzone info
> zonename: myzone
> zonepath: /zones/myzone
> brand: ipkg
> autoboot: false
> bootargs: 
> pool: 
> limitpriv: 
> scheduling-class: 
> ip-type: exclusive
> hostid: 
> net:
> address not specified
> physical: zon0
> defrouter not specified
> 
> >From in the zone:
> # uname -a
> SunOS myzone 5.11 snv_134 i86pc i386 i86xpv
> # svcs ssh
> STATE  STIMEFMRI
> offline15:15:51 svc:/network/ssh:default
> # svcadm enable ssh
> # svcs ssh
> STATE  STIMEFMRI
> offline15:15:51 svc:/network/ssh:default
> 
> # tail /var/svc/log/network-ssh\:default.log 
> [ Mar 23 15:15:34 Disabled. ]
> [ Mar 23 15:15:34 Rereading configuration. ]
> [ Mar 23 15:15:51 Enabled. ]
> [ Mar 23 15:15:51 Rereading configuration. ]
> 
> I can replicate the exact same thing using nginx. The only way to get these 
> services to start from within a zone is to execute the script listed in the 
> SMF for that service. Any help tracing down the root of this problem is 
> greatly appreciated.
> 

svcadm commands are executed asynchronously, so it's not surprising to
that a service is not enabled right after you run svcadm enable.  if you
want svcadm to wait till a service is enabled before it returns, use the
-s option.  ie, do:
svcadm enable -s ssh

also, smf won't enable services until all their dependants are online.
so the likely reason you're not seeing the service enabled is because
some service it depends on is offilne.  whenever you have a problem with
any smf service, you should run svcs -x to see what the status of the
system is.  so run:
svcs -x ssh
svcs -x

so after installing your zone, did you run zlogin -C and configure the
zone?  if not, then smf is running sysidtool and it's waiting for your
input on the console, and smf won't start ssh (and a bunch of other
services) until the configuration service is finished.

also, you really should never run smf methods by hand.  if you do, smf
doesn't know anything about them.  so you wouldn't expect to see any
changes in smf state.  (ie, if you run the start method by hand, that
won't change the service state within smf.  and if you run the stop
method by hand, then smf will just restart the service since as far as
it's concerned the service should still be online.

ed
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] svcadm not executing methods

2010-03-23 Thread Allan
Hello,

This time I decided to create a zone from scratch and see if the problem still 
persists.

# zonecfg -z myzone info
zonename: myzone
zonepath: /zones/myzone
brand: ipkg
autoboot: false
bootargs: 
pool: 
limitpriv: 
scheduling-class: 
ip-type: exclusive
hostid: 
net:
address not specified
physical: zon0
defrouter not specified

>From in the zone:
# uname -a
SunOS myzone 5.11 snv_134 i86pc i386 i86xpv
# svcs ssh
STATE  STIMEFMRI
offline15:15:51 svc:/network/ssh:default
# svcadm enable ssh
# svcs ssh
STATE  STIMEFMRI
offline15:15:51 svc:/network/ssh:default

# tail /var/svc/log/network-ssh\:default.log 
[ Mar 23 15:15:34 Disabled. ]
[ Mar 23 15:15:34 Rereading configuration. ]
[ Mar 23 15:15:51 Enabled. ]
[ Mar 23 15:15:51 Rereading configuration. ]

I can replicate the exact same thing using nginx. The only way to get these 
services to start from within a zone is to execute the script listed in the SMF 
for that service. Any help tracing down the root of this problem is greatly 
appreciated.

Thanks,
Allan
-- 
This message posted from opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] svcadm not executing methods

2010-03-22 Thread Allan
Still getting nothing even after that. The problem doesn't only happen with 
ssh, it happens with ANY service that wasn't enabled by default in the zone. 
The only way ssh will start is if I run this:

# /lib/svc/method/sshd start

Even then it is still listed as offline:

# svcs |grep ssh
offline18:08:55 svc:/network/ssh:default

But you can see that it is in fact listening:

  *.22 *.*0  0 128000  0 LISTEN

Something is preventing svcadm from ever executing the methods. Is there some 
tool (maybe dtrace?) that I could use to see what the command is stepping 
through? I took a look at the truss output but this did not appear to be of any 
value.
-- 
This message posted from opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] svcadm not executing methods

2010-03-22 Thread Nicolas Dorfsman

Le 22 mars 2010 à 20:24, Allan a écrit :

> Hello,
> 
> /var/log/syslog is empty and there are no files in /var/adm/log either. Any 
> other logs you would like me to check?

Try :

# vi /etc/ssh/sshd_config

...
# Syslog facility and level
SyslogFacility auth
LogLevel VERBOSE
...

# vi /etc/syslog.conf

...
auth.debug  /var/log/syslog
...

# svcadm restart svc:/system/system-log:default

# svcadm disable ssh
# svcadm enable ssh

# cat /var/log/syslog


Nico
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] svcadm not executing methods

2010-03-22 Thread Allan
Hello,

/var/log/syslog is empty and there are no files in /var/adm/log either. Any 
other logs you would like me to check?
-- 
This message posted from opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] svcadm not executing methods

2010-03-22 Thread Nicolas Dorfsman
Hi Allan,

Did you check your syslog ?

Le 22 mars 2010 à 18:55, Allan a écrit :

> Hello,
> 
> First off here's some system information:
> SunOS virt 5.11 snv_134 i86pc i386 i86xpv Solaris
> 
> I'm running a two zones and neither will execute the /lib/svc/method/* 
> scripts when enabling a service. 
> 
> # svcs ssh
> STATE  STIMEFMRI
> offline22:56:16 svc:/network/ssh:default
> # svcadm disable ssh
> # svcs ssh
> STATE  STIMEFMRI
> disabled   14:49:55 svc:/network/ssh:default
> # svcadm enable ssh
> # svcs ssh
> STATE  STIMEFMRI
> offline14:50:22 svc:/network/ssh:default
> 
> I take a look at the logs in /var/svc/log/network-ssh\:default.log and see 
> the following:
> 
> [ Mar 21 22:56:07 Disabled. ]
> [ Mar 21 22:56:16 Enabled. ]
> [ Mar 22 14:49:55 Disabled. ]
> [ Mar 22 14:50:22 Enabled. ]
> 
> In the global zone I can see that the start methods actually get executed in 
> the log file:
> 
> [ Mar 21 21:13:07 Executing start method ("/lib/svc/method/sshd start"). ]
> [ Mar 21 21:13:09 Method "start" exited with status 0. ]
> 
> So as a work around I've been manually starting the services by executing 
> /lib/svc/method/ scripts. However this has been happening ever since 
> around build 132 (exact build # I'm unsure of but this is when I first 
> started noticing it). I've compared the SMF for ssh in the global zone with 
> the ones in my zones and they are the same, so I'm unsure why this isn't 
> working. This does not only apply to ssh but any service I've tried to 
> enable. 
> 
> Is anyone else seeing similar problems or know of a permanent solution? If 
> not, could you help me come up with additional information needed to file a 
> proper bug report.
> 
> Thanks,
> Allan
> -- 
> This message posted from opensolaris.org
> ___
> zones-discuss mailing list
> zones-discuss@opensolaris.org
> 

___
zones-discuss mailing list
zones-discuss@opensolaris.org