Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

UTCLI "Error loading preferences" issue.

We use a perl script to access CWLMS 2.6 User Tracking information, which is then queried and processed, entry by entry.

Interesting statements:

...

...

my($sqlutil) = "/opt/CSCOpx/campus/bin/ut -cli";

...

...

open(SQL, "$sqlutil -u $u -p $p -query all |") || die "fault...";

...

[loop for all entries in sql table]

Many entries are succesfully processed, but the process ends with the following entry:

UTCLI "Error loading preferences". null;41;;;;;;;;0;;;;0;;;;

Any ideas regarding the cause of this error are most welcome. Thanks.

4 REPLIES
Cisco Employee

Re: UTCLI "Error loading preferences" issue.

It would be helpful to see the output when ut -cli is run with the -debug flag.

New Member

Re: UTCLI "Error loading preferences" issue.

Ok, I changed the perl script to add the -debug switch:

==============

...

...

...

my($sqlutil) = "/opt/CSCOpx/campus/bin/ut -cli -debug";

#################

## MAIN

#################

if ( $#ARGV != 1 ) {

print "Usage: $0 user password DSN\n";

exit(0);

}

$u = $ARGV[0];

$p = $ARGV[1];

$dsn = $dsn;

open(SQL, "$sqlutil -u $u -p $p -query all > /var/adm/CSCOpx/log/utdebug1 |") || die "Cannot open

ut: $!";

# Skip header and print LMS 2.1 compatible header

;

print STDOUT "UserName;classListDbId;Port;PortName;PortState;Notes;Bridge;Ring;Device;trBRFVLAN;De

viceName;Subnet;Source;VLAN;VTPDomain;VLANType;dbId;MACAddress;LastSeen;HostName;IPAddress\n\n";

==============

Output as follows:

Debug enabled for package com.cisco.nm.ani.clients.ut

Trace enabled for package com.cisco.nm.ani.clients.ut

Debug enabled for package com.cisco.nm.ani.server.schedule

Trace enabled for package com.cisco.nm.ani.server.schedule

UTCmdLine: UTCLI -cli -debug -query all admin xXxXxXxX

UTCLI: connecting to ANI

UTCLI: connected to ANI

UTCmdLine: layoutCols = [Ljava.lang.String;@358f03

UserName,MACAddress,HostName,IPAddress,Subnet,IPv6Address,PrefixLength,Prefix,DeviceName,Device,Po

rt,PortName,PortState,PortDuplex,PortSpeed,VTPDomain,VLAN,VLANId,VLANType,trBRFVLAN,SecondaryVlan,

Ring,Bridge,LastSeen,Notes

,00-12-79-67-68-05,10.5.32.126,10.5.32.126,10.5.32.0/24, ,,,sa088236,10.5.0.37, Fa3/0/1

6 , ,static,full-duplex,100M,0882,USER-DATA-13,13,ethernet, ,, , ,2009/04/02 10:50:09,

,00-04-0d-e7-f0-15,10.4.13.144,10.4.13.144,10.4.13.0/24, ,,,sa08701,10.4.6.32, Fa3/0/10

, ,static,full-duplex,100M,0870,VLAN0206,206,ethernet, ,, , ,2009/04/02 10:48:36,

...

...

...

...

,00-11-85-ef-68-0a, , , , ,,,sa08100,10.2.95.5, Gi2/40 ,Gi2/40,static,full-duplex,100M,0810,def

ault,1,ethernet, ,, , ,2009/04/02 13:33:09,

ERROR UTCLI: Error loading preferences. null

=================

Any explanations as to what the cause of this error message is?

Cisco Employee

Re: UTCLI "Error loading preferences" issue.

Sorry, I missed your reply. This error points to something in the end host report triggering a NullPointerException. Unfortunately, development didn't print the stack trace, so it's difficult to know where in the code this is occurring.

However, I think I have a pretty good idea of where this is occurring. Instead of exporting the data to the terminal, try exporting it to a file (i.e. add the -export FILENAME argument). I think the error will go away then. If so, then you are seeing CSCsd88700 which is fixed in LMS 3.0.

The good news is that this error is bogus, and the ut -cli command is returning full results.

New Member

Re: UTCLI "Error loading preferences" issue.

You've analysed this correctly, Joe, I put a -export command into the script, and the error message does not appear! Thanks.

here's the line:

my($sqlutil) = "/opt/CSCOpx/campus/bin/ut -cli -export /var/adm/CSCOpx/log/utexp

ort_test1";

And it appears indeed that all UT info is processed. There were just fewer records than were expected, and the customer got worried... so when the error message was seen it was assumed that something had failed prematurely.

Cheers.

244
Views
0
Helpful
4
Replies
CreatePlease to create content