cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Symptoms

When running the pkgadd command to install the agent on Solaris, the following error is returned -

root@sch1p457:/export/.../agent> pkgadd -n -a admin -r /dev/null -d managesoft-12.0.0.sparc.pkg ManageSoft
pkgadd: ERROR: unable to open admin file <admin>

Resolution

Create a file called noask-pkgadd in the /var/sadm/install/admin directory with the following lines -

conflict=nocheck
setuid=nocheck
action=nocheck
partial=nocheck

After that re-run the pkgadd command and include this additional parameter: -a noask-pkgadd
Was this article helpful? Yes No
No ratings
Comments
Woo_Lam
By
Level 5

Recently we experienced issue in Solaris 11 when running pkgadd to install FNMS 2021 R2 agent. We have no issue in running following, but with issue in running it inside a shell script. Any idea of why pkgadd failed when running inside a script?

-bash-5.1# /usr/sbin/pkgadd -n -a admin -r /dev/null -d managesoft-*.sparc.pkg ManageSoft
(C) 2021 Flexera Software LLC. All rights reserved. Protected by US patents
6,006,034 and 6,360,366; patents pending. Previous versions of ManageSoft
were known as NETDEPLOY GLOBAL. ManageSoft Corp was previously known as
Open Software Associates. NETDEPLOY, NETDEPLOY GLOBAL, ManageSoft, and the
ManageSoft logo are trademarks or registered trademarks of ManageSoft Corp.
Other product names are trademarks of their respective owners and are used
to their credit.

Configuring ManageSoft for Managed Devices ...
Installation directory: "/opt/managesoft"
Data directory: "/var/opt/managesoft"
Created /etc/managesoft.ini
Updating configuration with defaults: Done
Applying bootstrap answer file "/var/tmp/mgsft_rollout_response" ...
Starting ManageSoft services...
Starting ndtask: successful
Starting mgsusageag: successful
Setting heartbeat schedule: Done
ManageSoft was configured using an answer file.
Removing legacy files: Done

Installation of <ManageSoft> was successful.
-bash-5.1#

 

When running inside a script called unix-setup-m.sh, we got following error.

+ [ sparc '=' sparc ]
+ /usr/sbin/pkgadd -n -a admin -r /dev/null -d managesoft-17.0.1.sparc.pkg ManageSoft
pkgadd: ERROR: unable to make temporary directory to unpack datastream: No such file or directory
+ ret=1

 

 

ChrisG
By Community Manager Community Manager
Community Manager

@Woo_Lam - it seems unlikely that it would simply be the fact that the command is executed from a script that would cause the difference here. Maybe there is something about the environment that the script sets up before running the pkgadd command that results in the different behavior you are seeing.

Woo_Lam
By
Level 5

Hi Chris

Our SA ran the install script on /var/tmp and got install error, but no error when running pkgadd outside of the install script.

-bash-5.1# sh -x unix-setup-m.sh qidc-flexera
+ dirname unix-setup-m.sh
+ BASEDIR=.
+ [ 1 '=' 0 ]
+ beaconsvr=qidc-flexera
+ echo 'qidc-flexera will be used as default Beacon'
qidc-flexera will be used as default Beacon
+ TMPDIR=/var/tmp/tempdir.26045.22400.10523
+ umask 077
+ mkdir /var/tmp/tempdir.26045.22400.10523
+ cat
+ 0<< \EOF

# The initial download location(s) for the installation.
# For example, http://myhost.mydomain.com/ManageSoftDL/
# Refer to the documentation for further details.
#MGSFT_BOOTSTRAP_DOWNLOAD=http://beacon.mydomain.com:8080/ManageSoftDL/
MGSFT_BOOTSTRAP_DOWNLOAD=https://qidc-flexera/ManageSoftDL/

# The initial reporting location(s) for the installation.
# For example, http://myhost.mydomain.com/ManageSoftRL/
# Refer to the documentation for further details.
#MGSFT_BOOTSTRAP_UPLOAD=http://beacon.mydomain.com:8080/ManageSoftRL/
MGSFT_BOOTSTRAP_UPLOAD=https://qidc-flexera/ManageSoftRL/

# The initial proxy configuration. Uncomment these to enable proxy configuration.
# Note that setting values of NONE disables this feature.
#MGSFT_HTTP_PROXY=http://webproxy.local:3128
#MGSFT_HTTPS_PROXY=https://webproxy.local:3129
#MGSFT_PROXY=socks:socks.socksproxy.local:19121,direct
#MGSFT_NO_PROXY=internal1.local,internal2.local

# Check the HTTPS server certificate's existence, name, validity period,
# and issuance by a trusted certificate authority (CA). This is enabled
# by default and can be disabled with false.
#MGSFT_HTTPS_CHECKSERVERCERTIFICATE=true
MGSFT_HTTPS_CHECKSERVERCERTIFICATE=false

# Check that the HTTPS server certificate has not been revoked. This is
# enabled by default and can be disabled with false.
#MGSFT_HTTPS_CHECKCERTIFICATEREVOCATION=true
MGSFT_HTTPS_CHECKCERTIFICATEREVOCATION=false
EOF
1> /var/tmp/tempdir.26045.22400.10523/mgsft_rollout_response
+ uname -s
+ [ SunOS '=' SunOS ]
+ chown install /var/tmp/tempdir.26045.22400.10523/mgsft_rollout_response
+ 2> /dev/null
+ chown nobody /var/tmp/tempdir.26045.22400.10523/mgsft_rollout_response
+ 2> /dev/null
+ ret=0
+ mv -f /var/tmp/tempdir.26045.22400.10523/mgsft_rollout_response /var/tmp/mgsft_rollout_response
+ rm -rf /var/tmp/tempdir.26045.22400.10523
+ [ 0 -ne 0 ]
+ echo 'Installing the FlexNet inventory agent'
Installing the FlexNet inventory agent
+ uname -s
+ [ SunOS '=' SunOS ]
+ TMP1=/var/tmp
+ cat
+ 0<< \EOF
conflict=nocheck
setuid=nocheck
action=nocheck
partial=nocheck
EOF
1> /var/tmp/admin.10523
+ uname -p
+ [ sparc '=' i386 ]
+ uname -p
+ [ sparc '=' i586 ]
+ uname -p
+ [ sparc '=' i686 ]
+ uname -p
+ [ sparc '=' sparc ]
+ /usr/sbin/pkgadd -n -a /var/tmp/admin.10523 -r /dev/null -d managesoft-17.0.1.sparc.pkg ManageSoft
pkgadd: ERROR: unable to make temporary directory to unpack datastream: No such file or directory
+ ret=1
+ rm -f /var/tmp/admin.10523
+ [ 1 -ne 0 ]
+ echo
+ 1>& 2

+ echo 'ERROR: Failed to install the FlexNet inventory agent'
+ 1>& 2
ERROR: Failed to install the FlexNet inventory agent
+ exit 1

ChrisG
By Community Manager Community Manager
Community Manager

I see there are a few things that your script is doing that may be different from when you are attempting the install manually:

  1. Set the TMPDIR environment variable, and later remove the directory that it refers to
  2. Set the umask
  3. chown operations on the mgsft_rollout_response file
  4. Use a full path in the -a argument to pkgadd rather than a relative path
  5. Maybe the contents of the admin file are different?

I don't know which of these things might make a difference (although the directory removal noted in #1 above looks suspicious), but I'd be starting by playing around with them to see if any of these actions done by the script causing a problem.

I'm not sure it will be related to your current issue, but in case you're not aware: the contents that the script puts into the /var/tmp/admin.10523 file do not match what is suggested for putting in that file by the following page: Agent Third-Party Deployment: Installing FlexNet inventory agent on UNIX.

Woo_Lam
By
Level 5

Hi ChrisG

1)-3) TMPDIR is used to create mgsft_rollout_response. After it is created, we don't need TMPDIR anymore.

TMPDIR=/var/tmp/tempdir.$RANDOM.$RANDOM.$$

mv -f $TMPDIR/mgsft_rollout_response /var/tmp/mgsft_rollout_response || ret=1
rm -rf $TMPDIR

4) The script created

if [ "`uname -s`" = "SunOS" ]; then
TMP1=/var/tmp
cat <<EOF >$TMP1/admin.$$
conflict=nocheck
setuid=nocheck
action=nocheck
partial=nocheck
EOF

I also have tried the followings in admin file, but still got the same error.

mail=
instance=overwrite
partial=nocheck
runlevel=nocheck
idepend=nocheck
rdepend=nocheck
space=quit
setuid=nocheck
conflict=nocheck
action=nocheck
basedir=default

Version history
Last update:
‎May 16, 2018 02:09 AM
Updated by: