DSSetServerParams problem (dsapi w/ c++)

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
jgreve
Premium Member
Premium Member
Posts: 107
Joined: Mon Sep 25, 2006 4:25 pm

DSSetServerParams problem (dsapi w/ c++)

Post by jgreve »

edit: corrected sample code to show actual DSSetServerParams( ) I was using.
I'm running datastage + client on a virtual machine: ds 8.5 fixpack 1, Windows Server 2008 (64 bit).
Summary: Using C++ I can call connect with DSGetProjectList( ) provided I don't use DSSetServerParams( ); I'd very much like to make it work with DSSetServerParams( ) and would welcome any trouble shooting insights you can suggest.
Thanks, John

details
I'm compiling for Win32.
When I run the C++ code below, I'm getting this:

Code: Select all

C:>ds_test.exe
Hello from ds85_test
(... 6 second pause ...)
after get project list: dserr=81011
ERROR: get project list failed.
And this shows up in the debug console: "exception: First-chance exception at 0x75dcb727 in ds_test.exe: Microsoft C++ exception: javax::security::auth::login::LoginException at memory location 0x0015f2f4." I found an 8.5 fixpack 1 reference or two to "LoginException" on ibm's support portal, and two here on dsxchange (one about ulimits, the other about credentials; I'm pretty sure this isn't a credential issue since I can connect to datastage well enough: see "sanity check" after the code sample below).

Oddly enough, when I comment out the DSSetServerParams( ) call, it connects just fine (with no noticeable pauses):

Code: Select all

C:>ds_test.exe
Hello from ds85_test
after get project list: dserr=0
a=ANALYZERPROJECT
a=Develop
a=dstage1
a=Test
Done
And this message turns up in the debug console: "first-chance exception at 0x75dcb727 in ds_test.exe: 0x000006BA: The RPC server is unavailable." - just fyi, doesn't seem to hurt anything since it did bring back the project list.

code sample

Code: Select all

#include "stdafx.h"
#include <stdio.h>
#include <string.h>
#include <dsapi.h>

int _tmain(int argc, _TCHAR* argv[])
{
	char *a;
	int dserr;
	printf("Hello from ds85_test\n");
	char domain[256] = "infoserver1:9080";
	DSSetServerParams( domain, "infoserver1", "isadmin", "isadmin" );
	a = DSGetProjectList( );
	dserr = DSGetLastError( );
	printf("after get project list: dserr=%d\n", dserr  );
	if( dserr != DSJE_NOERROR ) {
		printf("ERROR: get project list failed.\n");
		return 1;
	}
	while( *a ) {
		printf("a=%s\n", a);
		a += 1 + strlen(a);
	}
	printf("Done\n");
	return 0;
}
sanity check
And just to make sure I'm typing my userid + servername properly, dsjob works well enough:

Code: Select all

C:\IBM\InformationServer\Server\DSEngine\bin>dsjob -domain infoserver1:9080 -user isadmin -password isadmin -server infoserver1 -lprojects
ANALYZERPROJECT
Develop
dstage1
Test

Status code = 0

C:\IBM\InformationServer\Server\DSEngine\bin>dsjob -lprojects
ANALYZERPROJECT
Develop
dstage1
Test

Status code = 0
jgreve
Premium Member
Premium Member
Posts: 107
Joined: Mon Sep 25, 2006 4:25 pm

resolved Re: DSSetServerParams problem (dsapi w/ c++)

Post by jgreve »

Turns out I had my server name in the wrong place. :oops:

Further I should have taken the extra step to look through the websphere stdout & stderr logs.

And... I might wish for a more useful dserrno, like like DSJE_LOGONFAIL instead of the 81011 I was getting. *shrug*

At any rate, just in case it helps anyone else here's what I emailed ibm support:
Your observation about missing params was in the ballpark:
When I do it this way,
DSSetServerParams( domain, "isadmin", "isadmin", "infoserver1" )

e.g. actually following what the documentation says:
void DSSetServerParams( char *DomainName, char *UserName, char *Password, char *ServerName )
it works much better.

I regret bothering you for something like this. :-)

Here's the error message from SystemErr.log:
[7/14/11 21:10:03:966 CDT] 0000002a SystemErr R 2011-07-14 21:10:03,966 Error [ISF-SECURITY-AUTH-AUTHENTICATION-JAAS] [0000] Invalid user name (infoserver1) or password.
Post Reply