You are on page 1of 13

This is my well-worked configuration and scenario deploying AM 9.30 web.

1. Install Asset Manager 9.30 xx, parameters - default. Database of the


Asset Manager named as AMDemo93xx,
SQL.login=itam, SQL.password=itam.
2. Install licence Start -> All Programs -> HP -> Asset Manager 9.30 xx ->
AutoPass License Management Tool.
3. Create 2 ODBC-connector’s to AMDemo93xx
(C:\Windows\SysWOW64\odbcad32.exe and
C:\Windows\System32\odbcad32.exe). Default database –
AMDemo93xx.
4. Activate database: Application Designer -> Actions -> Activate database.
5. Install jdk-6u32-windows-i586.exe to the default location (C:\Program
Files (x86)\Java).
6. Control Panel\System -> Advanced system settings -> Environment
Variables: JAVA_HOME = C:\Program Files (x86)\Java\jdk1.6.0_32,add to
variable PATH to the end of it the phrase
;%JAVA_HOME%\bin;C:\Program Files (x86)\HP\Asset Manager 9.30
xx\bin.
7. Install apache-tomcat-6.0.35.exe to C:\Tomcat6, install parameters --
full. Then run Start -> All Programs -> Apache Tomcat 6.0 Tomcat6 ->
Configure Tomcat:
· Tab General.
o Startup type = Manual
· Tab Java.
o Java Virtual Machine = C:\Program Files
(x86)\Java\jre6\bin\client\jvm.dll;
o Java Classpath = C:\Program Files
(x86)\Java\jdk1.6.0_32\lib\tools.jar;C:\Tomcat6\bin\bootstrap.jar;C:\To
mcat6\bin\tomcat-juli.jar;
o Java Options = -Dcatalina.home=C:\Tomcat6
-Dcatalina.base=C:\Tomcat6
-Djava.endorsed.dirs=C:\Tomcat6\endorsed
-Djava.io.tmpdir=C:\Tomcat6\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\Tomcat6\conf\logging.properties
-Djava.library.path=C:\Program Files (x86)\HP\Asset Manager 9.30
xx\bin
-Dsun.lang.ClassLoader.allowArraySyntax=true
o Initial memory pool = 512
o Maximum memory pool = 1024
o Thread stack size = 1000
8. Copy .jar files from C:\Program Files (x86)\HP\Asset Manager 9.30
xx\websvc\lib to C:\Tomcat6\lib.
9. Set C:\Program Files (x86)\HP\Asset Manager 9.30
xx\websvc\package.properties:
· AssetManager.UserLogin=Admin
· AssetManager.UserPwd= [by the default Admin password is blank]
· DB.engine=MSSQL
· DB.datasource=AMDemo93xx
· DB.login=itam
· DB.password= itam
· encrypt=true
· arch=32
10.Set C:\Program Files (x86)\HP\Asset Manager 9.30
xx\webtier\package.properties:
· AssetManager.UserLogin=Admin
· AssetManager.UserPwd= [by the default Admin password is blank]
·
WebService.EndPoint.SOAP=http://localhost:8080/AssetManagerWebSe
rvice/services
·
WebService.EndPoint.REST=http://localhost:8080/AssetManagerWebSer
vice/rest
· encrypt=true
11.Run as administrator Start -> All Programs -> Accessories -> Command
Prompt and perform a series of commands:
· cd "c:\Program Files (x86)\hp\Asset Manager 9.30 xx\deploy"
· deploy.bat /32 "c:\Program Files (x86)\hp\Asset Manager 9.30
xx\websvc\package.properties"
· deploy.bat /32 "c:\Program Files (x86)\hp\Asset Manager 9.30
xx\webtier\package.properties"
12.Copy file C:\Program Files (x86)\HP\Asset Manager 9.30
xx\websvc\AssetManagerWebService.war to C:\Tomcat6\webapps.
13.Extract C:\Program Files (x86)\HP\Asset Manager 9.30
xx\webtier\AssetManager.war to
C:\tmp\AssetManager. Delete C:\tmp\AssetManager\WEB-INF\lib\el-
api.jar. Go to
C:\tmp\AssetManager, select all, right mouse click -> Send to ->
Compressed (zipped)
Folder. Rename .zip file to AssetManager.war. Copy this file
C:\tmp\AssetManager\AssetManager.war to C:\Tomcat6\webapps.
14.Run Start -> All Programs -> Apache Tomcat 6.0 Tomcat6 -> Monitor
Tomcat, it appears an icon in the tray
Apache Tomcat. Right mouse click -> Start service.
15.Open Windows Task Manager (Ctrl+Shift+Esc). Wait for the level of CPU
Usage reaches the usual point.
Run http://localhost:8080/AssetManagerWebService and

http://localhost:8080/AssetManager in IE to check.

The installation of HP Asset Manager Web server is simple really— there are
only three, basic steps to the installation. But, chances are high that you may
run into some issues if you are new to HP Asset Manager. We want to make
your installation experience as painless as possible, so we have listed the three
steps below in greater detail to help you along the way.

The three steps are:

 Preparation – Java Runtime Environment


 War Files –Build the HP Asset Manager Web Service Tier and Web Client
Tier WAR files using the deploy tool within your HP Asset Manager
installation
 Deployment—of Web Service and Web Tier WAR files

Save some time and follow the steps outlined below!

Step 1 – Preparation the Java Runtime Environment

The bottom line is that you must prepare a java runtime environment prior to
installation of the web application server (like Tomcat) and an ODBC driver to
HP Asset Manager database.

The key step outlined in the installation you need pay attention to:
“If you are running web service in 64 bit JVM, you shall
use C:\Windows\System32\odbcad32.exe to create the 64 bit ODBC
connection; otherwise run C:\Windows\SysWOW64\odbcad32.exe to create 32
bit ODBC connection.”

This step is important because you need to make a special note of


the path difference. Don’t get caught in a pitfall by making a typo in this step!

Step 2 – Building the WAR files

The key focus for this step is the configuration for the parameter in
package.properties (in <AM installation>\websvc and webtier folders) files and
to run the <AM installation>\deploy\deploy.bat to build the WAR files.

There are some fundamental things to watch out for to avoid missteps in this
next set of steps:

a. Check your JVM version. Is it 32-bit or 64-bit? If you are not sure, run java
-version from the command line, and it will tell you. If it is 64-bit, then
set arch=64 in package.properties file, otherwise set arch=32.

b. When you configure package.properties for Web Service and Web Tier,
you need to pay special attention to the following properties:

For WebService:
Property Description

AssetManager.userLogin AM Web Service use this account to logint to AM

DB.engine The value could be “MSSQL” or “Oracle” or “DB2”

DB.datasource This is the ODBC connection name

DB.login The login account for making connection to database

DB.password Password – either in plain text or encrypted.

Encrypt true: deploy tool will encrypt DB.password, false:


deploy tool will not encrypt DB.password

For WebTier:
Property Description

AssetManager.UserLogin Asset Manager user login to be used by the LoginSlot

SOAP Web service url,


WebService.EndPoint.SO
http://localhost:8080/AssetManagerWebService/ser
AP
vices

REST Web service url


WebService.EndPoint.RE
http://localhost:8080/AssetManagerWebService/res
ST
t

RS Web service url


WebService.EndPoint.RS http://localhost:8080/AssetManagerWebService/rs

c. Lastly, build the WAR files by going to: CD <AM installation>\deploy,run


deploy.bat ..\websvc\package.properties to build AM web service WAR,
and run deploy.bat ..\webtier\package.properties for AM web tier WAR.

Step 3 – Deployment of the HP Asset Manager Web Service and Web Tier
WAR files

At this stage you will need to copy the WAR files built in Step 2, and located in
<AM Installation>/websvc and <AM installation>/webtier respectively, to your
application server's deployment directory (for tomcat, it is <tomcat
installation>/webapps>.

Some important considerations for this step are:

a) Specify the following jvm options -Djava.library.path=C:\Program Files


(x86)\HP\Asset Manager 9.40 en\x64 if AM web service is running on 64-bit
JVM, or -Djava.library.path=C:\Program Files (x86)\HP\Asset Manager 9.40
en\bin if it is 32-bit JVM. Please refer to step 2.1 for how to detect JVM
version.

b) It is also recommended to deploy the AM web service tier and web


service tier into two different application servers to boost performance. If you
deploy both the webservice and webtier war file to the same web application
server instance, you need to specify: -xx:MaxPerm=128m.

At this stage in the installation you are ready to start up your web application
server. Make sure to start AM web service server first and then AM web tier
server because the latter one relies on first one. If everything is working as
intended at this point you should open a browser to the following
page: http://<AM_WEB_IP>:8080/AssetManager

And, if for some reason it does not open, go ahead and open this page:
http://<AM_WEB_IP>:8080/AssetManagerWebService to check and see if the
web service is properly deployed. This second page will show you some helpful
information for your trouble shooting, so you may want to save to your
favorites for later on.

We know that there is always more technical detail and context to add to tips
and tricks. That being said, our end goal here is to provide you with some
essential tips and tricks to the installation of the HP Asset Manager Web
Server.

Asset Manager 9.41 Desktop Client Setup

New Step by Step Guide:

1. Request Administrator Privileges on your laptop.


2. Download the Oracle Client:
https://collaborate.bt.com/artefacts/content/repositories/smit-
releases/asset-manager/oracle-client/11g/oracle-client-11g.zip
3. Unzip the Oracle Client to a temporary folder
4. Run setup.exe
5. Choose 'Runtime' installation
6. Set Oracle Base to C:\Program Files\Oracle
7. Tick the checkboxes in the 'failed' pre-requisite checks, then next
8. If any errors appear, ignore them and continue with the install
9. Add C:\Program Files\Oracle\11.1.0\bin\ to the PATH environment
variable:
You can do this by righ-clicking 'This PC' in file explorer:

Then click Advanced System Settings

Then click Environment Variables in the Advanced tab

In the bottom table (System variables) edit the Path variable and ensure
has been added C:\Program Files\Oracle\11.1.0\client_1\BIN (values are
separated by semi-colons)

10.Download
https://collaborate.bt.com/artefacts/content/repositories/smit-
releases/asset-manager/tnsnames/4/tnsnames.ora
11.Copy this file to your client installation folder in the network/admin/
directory (For example: "C:\Program
Files\Oracle\11.1.0\client_1\network\admin\tnsnames.ora"
12.Download
https://collaborate.bt.com/artefacts/content/repositories/smit-
releases/asset-manager/asset-manager/9.41.11061p1/asset-manager-
9.41.11061p1.zip
13.Unzip Asset Manager to a temporary location
14.Run asset manager's setup.exe
15.Select custom installation
16.Ensure all the items are to be installed.
17.Click next and then install
18.Once the install is complete, click Finish.
19.Download
https://collaborate.bt.com/artefacts/content/repositories/smit-
releases/asset-manager/client-configuration/amdb.ini
20.Save this .ini file to C:\ProgramData\HP\AssetManager\conf\amdb.ini
(you may need to create these folders in order to put it there)
21.If one is not created add a shortcut to "C:\Program Files (x86)\HP\Asset
Manager 9.41 en\bin\am.exe" to the desktop

(Additional step if setting up AM client on the RDP server that needs to run
APM: put groups.bat into AM/bin directory. Also need to do the AutoPass
licences if going to use APM)

You are now complete, and should be able to run Asset Manager. When you
run the am.exe file to start up, you should see the Connect to Database box,
with a list of environments to log into, choose the environment, and use your
IUSER to log in.

KNOWN ISSUES:

The following issues have been found after the installation process above has
been run, please try out the resolutions to see if that corrects the issues for
you.

Problem: I can’t see all the environments in the drop down list on the
Connect to Database box

Resolution: You do not have the correct version of the amdb.ini file loaded,
which lists the details of all the environments; go back to Step 20 again and
check the correct version of amdb.ini has been placed in C:\ProgramData....

Problem: I am getting the following error codes


2016/01/07 14:05:0.346 0 1 [Thrd#:3140](-2006) Unable to
connect to database 'AMP01_ANY' (UserId='AM_ITDM_PROD_USER'). Oracle
code=-1
2016/01/07 14:05:0.346 0 1 [Thrd#:3140](-2006) Unable to
connect to this database engine.
Resolution: go to step 10 above and remove the ORACLE_HOME variable that
you added in, there may be another installation of Oracle on your PC and this
appears to remove the issue.

Upgrading to 9.50

Release notes of 9.50 describe the improvements to AM that are included, but
mainly we are looking to upgrade to 9.50 for the capabibilities it brings to the
webtier and dashboarding with scriptable home page widgets.

Database Version Status

Environment Version

DEVELOPMENT 9.41 p1

TEST 9.50 p3

PILOT 9.50 p2

ESM_CIT 9.41 p1

ESM_CIT 9.41 p1

ESM_E2E 9.41 p1

ESM_PRE_PROD 9.41 p1

ESM_PROD 9.41 p1

Installation Process is currently:

1. Back up the AM database


o Run 'Export Database Structure and Data' on the target database
o Ensure there are no errors, we have seen errors with PILOT and
ESM_PROD
 This error is currently not fixed, HP ticket is progressing with
Case ID: 4652236051
 There is a possibility that the export fails due to the
database being too big
2. Download AM 9.50 p1 from
https://collaborate.bt.com/artefacts/content/repositories/smit-
releases/asset-manager/asset-manager/9.50p1/
3. Install 9.50 p1
o Install using 'Typical Install' and ensure you select the correct drive
(we install AM to F:, or D: on PROD)
4. Open the 9.41 client and using File -> Import -> Execute a script, execute
the file Asset Manager 9.50 en\migration\from941\upgrade.lst
5. Change the system's PATH environment variable to direct to the new
9.50 directory (/bin for 32-bit and /x64 for 64-bit)
6. Right-click the AM 9.50 folder in explorer (F:\Program Files
(x86)\HP\Asset Manager 9.50 en) -> Properties -> Security tab -> Edit ->
Add -> ”Everyone” with full permissions -> OK and close (this is so that
the AM client can modify the .bat and .txt files when doing LDAP sync
7. Ensure the AM bin directory contains ldapsearch.exe
8. Use the autopass licence tool to apply the licence to the database again
o If the JAVA_HOME and PATH has been pointed at the 64-bit
version of Java for the webservice, you might need to switch them
back to the 32-bit version in order to use the autpass tool (be sure
to change them back to 64-bit afterwards)
9. Upgrade the database
o Open the 9.50 application designer, and run Migratation ->
Update Database
o We have had some problems with this:
 We encountered an error relating to an 'amStatistique_...'
error. This was solved in 9.50 patch 1, which we are now
installing directly
 We encountered an error relating to duplicate index at
 CREATE UNIQUE INDEX CatRef_lCatalogIdRefdtEnd
ON amCatRef(lCatalogId, Ref, dtEndValidity,
lTenantId)
 (0) Oracle error: ORA-01452: cannot CREATE UNIQUE
INDEX; duplicate keys found
 (0) SQL statement 'CREATE UNIQUE INDEX
CatRef_lCatalogIdRefdtEnd ON amCatRef(lCatalogId,
Ref, dtEndValidity, lTenantId)' could not be executed
 This problem has not been resolved, and is currently under
investigation with HP case ID: 4652126918
 One possible solution is to destroy all of the indexes prior to
the upgrade, to be rebuilt after the upgrade.
 This has not worked, so has gone back to HP
10.Download AM 9.50 p2 from
https://collaborate.bt.com/artefacts/content/repositories/smit-
releases/asset-manager/asset-manager/9.50p2/
11.Install 9.50 p2
1. Open cmd, run applyPatch.bat and give it the directory of the AM
9.50 installation
12.Place amsrv.cfg and armsrvcf.ini into the amsrv directory (copy them
from the AM 9.41 directory)
13.Modify AM_BIN to point to the new AM 9.50 bin directory
14.Run the APM by logging into the APM executable in service mode with
the Admin user, then starting the service in services.msc
15.Deploy the webservices:
o Change library path from 9.41 to 9.50 in both tomcat settings
o Delete the webapps from the webapps directory of both tomcats
o Adjust package.properties of websvc, specifying DB username, AM
username, DB name and set DB type as Oracle, and also the Arch
value (either 32 or 64)
o Adjust package.properties of webtier, to point to localhost:8011
instead of 8080
o Deploy using deploy\deploy.bat websvc\package.properties
o Copy the wars into the webapps directory
o Turn on the webservices

Related Issues:

 Backing up the DEVELOPMENT database, and importing it into an empty


database fails due to:

amCatRef (amCatRef)
(0) Oracle error: ORA-00001: unique constraint
(HICKEYA.CATREF_LCATALOGIDR) violated
(0) Error while importing database structure and data into: '43996646 1
\"2015-04-08 11:07:11\" \"Bmc Software Bmc Remedy Ar System Fixed 5?Pk
Lsn Per Named User Licence\" 2015-04-08 1 0 0 0 0 0 0 0 GBP 0 0 \"2015-04-
08 11:07:11\" 0 GBP 0 0 \"2015-04-08 11:07:11\" 0 \"Bmc Software Bmc
Remedy Ar System Fixed 5?Pk Lsn Per Named User \" 0 0 3 0d 0 0 0 0
38568291 38569839 0 0 0 0 0 0'

This issue can be fixed (i.e. development can be restored) by starting the
import to the empty database, then as soon as the index has been created:

SELECT * FROM ALL_INDEXES WHERE INDEX_NAME = 'CATREF_LCATALOGIDR';

Then when it appears, delete it:

DROP INDEX CATREF_LCATALOGIDR;

This will allow the restoration to be completed.

Because of this issue, we might want to remove the index on DEVELOPMENT,


or at least remove any offending records (such as the above licence)

 9.50 database produces duplicate amCounter records

SELECT COUNT(1), IDENTIFIER FROM amCounter GROUP BY IDENTIFIER


HAVING COUNT(1) > 1;

This returns results. If it does, then any new record which needs to create an
auto-incremented value (e.g. CatProduct internal ref uses an amCounter
record to get the next value to use) will be unable to work, which is a major
issue.

The only place we have seen this error is in PILOT, which is currently our only
9.50 database. This means that potentially it is an issue with 9.50 which would
need to be resolved with HP. I did raise an service request for this but had to
cancel it because the issue is too vague - I don't know what caused it and I
don't know what the development team are doing on PILOT that could affect
it.

This might help to fix the bug if it appears:

DELETE FROM amCounter WHERE lCounterId IN (SELECT MAX(lCounterId)


FROM amCounter GROUP BY IDENTIFIER HAVING COUNT(1) > 1)

 Running diagnostics and repair on the DEVELOPMENT database gives


lots of errors.
Turns out there are 16009 invent models where this query returns:

SELECT COUNT(*) FROM amInventModel


WHERE lModelFinalId IS NOT NULL
AND NOT EXISTS ( SELECT 1 FROM amModel WHERE
amInventModel.lModelFinalId = amModel.lModelId );

There are no software installations for these amInventModels, and this


problem doesn’t appear on PILOT/PREPROD, so I've just deleted them.

There was no Request 3551 Request Lines.

SELECT COUNT(*) FROM amReqLine WHERE lReqId = 0 AND lReqLineId != 0;


gives 3551,
and
SELECT COUNT(*) FROM amAsset
WHERE amAsset.lReqLineId > 0
AND EXISTS ( SELECT 1
FROM amReqLine
WHERE amReqLine.lReqLineId = amAsset.lReqLineId
AND amReqLine.lReqId = 0 );

Gives 204 assets linked to those request lines. Solution = set lReqLineId of
those assets to 0, then delete the 3551 request lines.

So I did this:

UPDATE amAsset SET lReqLineId = 0


WHERE amAsset.lReqLineId > 0
AND EXISTS ( SELECT 1 FROM amReqLine
WHERE amReqLine.lReqLineId = amAsset.lReqLineId
AND amReqLine.lReqId = 0 );
DELETE amReqLine WHERE lReqId = 0 AND lReqLineId != 0;
Doing all of this appears to get rid of the diagnostic and repair error messages
on DEVELOPMENT

You might also like