Sun Microsystems, Inc.  Sun System Handbook - ISO 3.4 June 2011 Internal/Partner Edition
   Home | Current Systems | Former STK Products | EOL Systems | Components | General Info | Search | Feedback

Asset ID: 1-72-1010600.1
Update Date:2010-06-18
Keywords:

Solution Type  Problem Resolution Sure

Solution  1010600.1 :   Sun Fire[TM] 12K/15K/E20K/E25K: "Domain failed by hpost: ecode=39"  


Related Items
  • Sun Fire E25K Server
  •  
  • Sun Fire E20K Server
  •  
  • Sun Fire 12K Server
  •  
  • Sun Fire 15K Server
  •  
Related Categories
  • GCS>Sun Microsystems>Servers>High-End Servers
  •  

PreviouslyPublishedAs
214583


Symptoms
Domain fails to reboot using `reboot`, `init 6`, `setkeyswitch off/on`.

There exist 2 scenarios named 'Scenario A' and 'Scenario B' which exhibit these symptoms.

(domain C is used in the examples provided).

Scenario A) When a Sun Fire[TM] 12K/15K/E20K/E25K domain is rebooted from the OS using the 'reboot' or 'init 6' command, the domain fails to reboot and the following message(s) is contained in ' /var/opt/SUNWSMS/adm/C/messages':

Jul  2 13:58:59 2003 mysc dsmd[25014]-C(): [5304 1647271740253715 ERR SysControl.cc 1841] Domain failed by hpost: ecode=39


and
in the corresponding post log, '/var/opt/SUNWSMS/SMS1.3/adm/C/post':
post030702.1358.58.log
# SMI Sun Fire 15K POST log opened Wed Jul  2 13:58:58 2003
# hpost version 1.3 Generic 114608-02 Apr 17 2003 16:31:51
# libxcpost.so v. 1.3 Generic 114608-02 Apr 17 2003 16:26:55
# pid = 13459 level = 16 verbose_level = 20
# SC name: mysc.MCSC-Lab-Heimstetten.Germany.Sun.COM ChHostID: 5014936438953
# Domain Id = C
# Cmdline: /opt/SUNWSMS/SMS1.3/bin/hpost -d C
Unable to open .postrc file /etc/opt/SUNWSMS/config/C/.postrc
Permission denied
Errors in .postrc file. Bailing out!
# SMI Sun Fire 15K POST log closed Wed Jul 2 13:58:58 2003

In this case using setkeyswitch off/on will reboot the domain(s) but not solve the problem at all for rebooting using "init 6" or "reboot".  The corrective action is described below.

Scenario b) running 'setkeyswitch -d C on' generates the following output:

Unable to open .postrc file ./.postrc
Permission denied
Can't create logs directory /var/opt/SUNWSMS/adm/anonymous
Created POST logs directory ./post
Exitcode = 39: Error in .postrc file
[5304] Domain failed by hpost: ecode=39

In this case you must use the solution which is described in the next section.



Resolution
The corresponding '.postrc' file must be world readable and should have the access rights '644' ( the owner must not necessarily be 'sms-svc')
-rw-r--r--   1 sms-svc  staff          9 Mar 19 09:32 .postrc

The corresponding '.postrc' file can be determined by the log data as described in the above scenarios.

for a)
Unable to open .postrc file /etc/opt/SUNWSMS/config/C/.postrc
Permission denied

details which '.postrc' has the wrong access rights.
for b)

Unable to open .postrc file ./.postrc
Permission denied

Describes that in the directory where the 'setkeyswitch' command is run ( the current working directory) the '.postrc' file has the wrong access rights.

In both cases changing the access rights of the corresponding '.postrc' file to '644' is the solution.

- Technical background:

1) When post is run on the SC, it looks for the '.postrc' file in three locations. The first one it finds, is the one it will use. The order is: - ./ (current working directory; for dsmd /var/tmp is its current working directory.) - /etc/opt/SUNWSMS/config/<domain_id> - /etc/opt/SUNWSMS/config/platform

2) There exist different users with different UIDs:

/etc/passwd

sms-dsmd
:x:
12
:20:SMS Domain Status Monitoring Daemon::

sms-svc
:x:
6
:10:SMS Service User:/export/home/sms-svc:/bin/csh

user dsmd-svc id==12 user sms-svc id==6

3)  Given Scenario A, when a 'reboot / init 6' command is used, hpost is run by user 'sms-dsmd'.

If the used [see 1) ] '.postrc' has the following access rights set:

-rw-------   1 sms-svc  staff          9 Mar 19 09:32 .postrc

user 'sms-dsmd' cannot read the file and you run in problem a).

Given Scenario B, when the 'setkeyswitch -d C on' command is run by user 'sms-svc', hpost is run by user 'sms-svc'.

If the used [see 1) ] '.postrc' has the following access rights set:

-rw-------   1 sms-dsmd  staff          9 Mar 19 09:32 .postrc

user 'sms-svc' cannot read the file and you run in problem b).

3c) If the used [see 1) ] '.postrc' has the following access rights set:

-rw-------   1 root  staff          9 Mar 19 09:32 .postrc

You will run into problem a) and b) because neither user 'sms-dsmd' nor user 'sms-svc' can read the file.

- Avoiding such a situation:

1. Verify that all '.postrc' files are world readable. Even if the platform '.postrc' file is world readable and the domain_id is not, post will fail because the domain_id '.postrc' file will be used first.

2) Verify that there exist only wanted/needed '.postrc' files and no random/test instances.

e.g.:  When a 'reboot / init 6' command is used, hpost is run by user 'sms-dsmd'. This user (like all of the other user daemons for SMS) has a home directory of /var/tmp. Since hpost is run by this user, this user's home directory is considered to be "./ (current working directory)". Verify that there is not a copy of .postrc in /var/tmp.

If there is, there will be a /var/tmp/post directory created with the post logs from the reboot.



Product
Sun Fire 15K Server
Sun Fire 12K Server
Sun Fire E25K Server
Sun Fire E20K Server

Internal Comments
For the internal use of Sun Employee's.

Related Bugs:
Bug ID: 4827345 Desire an API to make .postrc files readable

Bug ID: 4858798 Canonical .postrc files should always be readable Bug ID: 4858798

From the Bugs: A fix should be implemented in SMS 1.4
12k, 15k, Starcat, reboot, init6, setkeyswitch, fail, domain, hpost, ecode=39, .postrc
Previously Published As
52234


Attachments
This solution has no attachment
  Copyright © 2011 Sun Microsystems, Inc.  All rights reserved.
 Feedback