rmoff

January 22, 2010

How to resolve “[nQSError: 12002] Socket communication error at call=: (Number=-1) Unknown”

Filed under: config, obiee, security, unix, windows — rmoff @ 12:37

This error caught me out today. I was building a Linux VM to do some work on, and for the life of me couldn’t get the OBIEE Admin Tool to connect to the BI Server on the VM.

The error I got when trying to define a DSN on the Windows box was:

[nQSError: 12008] Unable to connect to port 9703 on machine 10.3.105.132
[nQSError: 12010] Communication error connecting to remote end point: address = 10.3.105.132; port = 9703.
[nQSError: 12002] Socket communication error at call=: (Number=-1) Unknown

This error means that the ODBC Driver for BI Server can’t communicate with the BI Server on port 9703.
99% of the time this question comes up on the forums it’s because the BI Server isn’t running, or the host is incorrect.

I validated the BI Server was running and listening on port 9703:

[oracle@RNMVM03 setup]$ netstat -a|grep 9703
tcp        0      0 *:9703                      *:*                         LISTEN

And I fired up Presentation Services and OC4J and successfully logged into Answers. So why couldn’t my Windows box connect?

I tried telnetting from my Windows box to the VM on port 9704 – the OC4J port. This worked, as did pinging it. So the network connectivity between the two was there. If I telnetted to port 9703 (BI Server) there was an eventual timeout.

The answer to the problem was that my Linux VM (OEL5.4) was running a firewall which I’d cleverly allowed 9704 on but not 9703. Disabling the firewall fixed the problem.

November 17, 2009

Resolved: sawserver : Error loading security privilege /system/privs/catalog/ChangePermissionsPrivilege

Filed under: config, sawserver — rmoff @ 17:19

Whilst installing OBIA 7.9.6.1 I hit this problem when firing up Presentation Services (sawserver):

Error loading security privilege /system/privs/catalog/ChangePermissionsPrivilege.

A quick search on the forums threw up two posts suggesting a corrupted WebCat.

Since I’d got this webcat fresh out of the box I was puzzled how it could be corrupted.

I did a bit more tinkering (including nosying around in the sawserver log), before realising it was indeed corrupt, and that I was indeed a muppet.

Here’s what happened after copying EnterpriseBusinessAnalytics.zip to my (unix) Presentation Services box:


$unzip EnterpriseBusinessAnalytics.zip 
Archive:  EnterpriseBusinessAnalytics.zip
   creating: root/
   creating: root/
   creating: root/shared/
   creating: root/shared/automotive/
   creating: root/shared/automotive/prompts/
  inflating: root/shared/automotive/prompts/gf_model+model+year+trim  
  inflating: root/shared/automotive/prompts/gf_model+model+year+trim.atr  
  inflating: root/shared/automotive/prompts.atr  
[...]
[ lots of files here ]
[...]
  inflating: root.atr                

$ls -l
total 110494
-rw-------   1 user   group    37655058 Oct  7 03:44 EnterpriseBusinessAnalytics.zip
drwx------   5 user   group       1024 Sep 18 01:06 root
-rw-------   1 user   group         60 Dec  6  2006 root.atr

Huh? What gives? Where’s my EnterpriseBusinessAnalytics web cat folder?
Well, quite obviously it’s unpacked it without a parent directory name.
That’s easily solved:

$mkdir EnterpriseBusinessAnalytics
$mv root EnterpriseBusinessAnalytics

Then I started up Presentation Services and got the error “Error loading security privilege /system/privs/catalog/ChangePermissionsPrivilege.”

If you can spot my snafu at this point the my only defence is that there was quite a lot of other gumf in the catalog folder, not just the files illustrated above :-D

The solution

Whilst I’d moved the root folder into my webcat folder, I’d neglected to move root.atr – in effect corrupting the web catalog.

So simple, but so frustating!

The solution in this case was to move root.atr into the webcat folder, alongside root.
It’s worth noting that this may not be the solution in all occurrences of this error, it depends on where the corruption has occurred.

Footnote

The silver lining being a good chance to poke around inside sawserver a bit more and discover gems like this in the logging:

The Oracle BI Presentation Server is proudly running under user: TODO_implement_this

It’s nice that it takes pride in its work, although shame we never get to find out the user’s name ;-)

August 20, 2009

Logging specific types of sawserver activity

Filed under: config, log, sawserver — rmoff @ 13:13

As well as tinkering with the sawserver (Presentation Services) logging level and format, we can specific which bits of the log we’re interested in. This is useful for two reasons:

  1. We can enable detailed logging for a specific area, without impacting performance as much as detailed logging throughout would cause
  2. By only logging in detail the area of interest we can more easily read the log output and not have to wade through pages of irrelevant information

Chapter 9 (“Using the Oracle BI Presentation Services Logging Facility”) of the Presentation Services Administration Guide details the log configuration.

To capture, for example, only inbound and outbound HTTP logs, you would amend your logconfig.xml to include this in the <Filters> section, where path is the restriction you want to apply.

<FilterRecord writerClassGroup="File" path="saw.httpserver.request" information="51" warning="100" error="100" security="41" />
<FilterRecord writerClassGroup="File" path="saw.httpserver.response" information="51" warning="100" error="100" security="41" />

If you want to write the information to a separate file, define a new Writer:

<Writers>
[...]
<Writer implementation="FileLogWriter" name="Global File Logger" writerClassId="7" dir="/tmp" filePrefix="sawodbc"/>
[...]
</Writers>

(use an unused writerClassId)
and WriterClassGroup:

 <WriterClassGroups>
[...]
<WriterClassGroup name="FileODBC">7</WriterClassGroup>
[...]
 </WriterClassGroups>

and use the newly defined WriterClassGroup in the Filter:

 <FilterRecord writerClassGroup="FileODBC" path = "saw.odbc" information="51" warning="100" error="100" security="41"/>

All of the odbc logging will now be written to a file in /tmp called sawodbc0.log.

To get a list of all possible path values, run sawserver with the -logsources commandline option

$ . ./common.sh
$ . ./sa-init.sh
$ sawserver -logsources
saw
saw.SOAP
saw.SOAP.JobManagementService
saw.answers
saw.answers.search
saw.authconfigmanager
saw.authconfigmanager.initialize
saw.cacheseeding
saw.catalog
saw.catalog.archive
saw.catalog.archive.merge
saw.catalog.archive.read
saw.catalog.archive.write
saw.catalog.archive.write.singleobject
saw.catalog.file
saw.catalog.filelock
saw.catalog.impl
saw.catalog.impl.cleanup
saw.catalog.impl.explainPermissions
[...etc etc...]

August 19, 2009

sawserver log – short format

Filed under: config, hack, log, sawserver — rmoff @ 14:02

I posted a while ago about the sawserver (Presentation Services) log configuration file.
Today I’m doing some work digging around why sawserver’s throwing an error and so increased the log detail. This parameter is really helpful to use:

fmtName=”short”

Consider in these two screenshots, the first is with the default log format and shows about six entries. The second is short log format and is about ten times as much data.

sawlog01

default log format

sawlog02

short log format

Horses for courses, but on a “fishing expedition” through a log I’d say the short format is definitely easier to work with.

To implement it update $OracleBIData/web/config/logconfig.xml and change the Writer definition:

[...]
	<Writers>
		<Writer implementation="CoutWriter" name="Global Output  Logger" writerClassId="2"/>
[...]
[...]
	<Writers>
		<Writer fmtName="short" implementation="CoutWriter" name="Global Output  Logger" writerClassId="2"/>
[...]

and restart Presentation Services. On a tangent, a lazy way to do this on unix whilst leaving time for ports to free up before restarting is:

run-saw.sh stop;sleep 60;run-saw.sh start64

July 23, 2009

sawserver logging configuration – logconfig.xml

Filed under: config, hack, log, sawserver — rmoff @ 17:40

The configuration of how Presentation Services (sawserver) does its logging is in the file web/config/logconfig.xml (same directory as instanceconfig.xml).

It’s all nice and XML’d:


Logging Detail
Change the numerical values in the FilterRecord entries to alter the detail level of the logging. Lower means less detail, higher means more.

Be aware that your log files can grow very rapidly if you set the logging too high, and unless you’re troubleshooting then leave them at the defaults.

Logging Configuration
You can change various things like how many log files are written, to what size, and also the format of the log entries:
This configuration is in the Writer definition, in the case of format set fmtName=”short”
Being able to write a single-line entry is very useful in the case of monitoring software (eg. OpenView) which can’t parse multiple line log entries.

sawserver.out.log and saw[x].log
sawserver.out.log is the stdout logging from presentation services. In Unix this is captured to sawserver.out.log, whereas in Windows I don’t think it’s captured.
saw[x].log is the file logging from presentation services

The level of information for both files is defined in logconfig.xml:

<filterrecord writerclassgroup=”Cout” path = “saw” information=”31″ warning=”41″ error=”41″ security=”41″>
<filterrecord writerclassgroup=”File” path = “saw” information=”31″ warning=”100″ error=”100″ security=”41″>

So by default you’ll more detail in your saw[x].log (writerClassGroup=”File”) than sawserver.out.log (the redirected stdout, writerClassGroup=”Cout”). In sawserver.out.log you’ll get the same Information and Security type messages as saw[x].log, but fewer (only those of greater severity) Warning and Error type messages.

More detail
See Presentation Services Administration Guide “Using the Oracle BI Presentation Services Logging Facility” for more very detailed information.

The Silver is the New Black Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.