Discussion:
TP Server Application Error?
(too old to reply)
Jaepil, Choi
2008-09-17 04:59:55 UTC
Permalink
I have some more additional information.

I compiled tpsvrtest with -D _DBG and tested it.
/usr/vac/bin/cc -g -D_DBG -q64 -o tpsvrtest -I
/usr/include/sna -bimport:/usr/lib/sna/appc_r64_5.exp -bimport:/usr/lib/sna/
csv_r64_5.exp -bimport:/usr/lib/sna/nof_r64_5.exp tpsvrtest.c
But, the notification callback(_notify_callback) was never called for
suitable incomming attaches.
And SNA had a same error:
Dynamic load of TP failed.
Sense code = 0x084B6031
LU alias = TESTLU2
TP name = TESTTP2

And I verified the notification callback could be invoked if the type of
notification was AP_TP_FILE_CHANGE as follows:

1. run tpsvrtest compiled with -D _DBG
$ ./tpsvrtest

2. reconfigurate TESTTP2 by using snatpinstall
$ cat tp.cfg
["TESTTP2"]
PATH=/data1/jeffry/test/testtp2
USERID=root
LUALIAS="TESTLU2"

$ snatpinstall -a tp.cfg

3. the notification callback was called with reason 2(AP_TP_FILE_CHANGE)
$ ./tpsvrtest
register_tp_server: 1100075f0
register_tp_server: tps_id[16777216] code=[AP_OK:AP_AS_SPECIFIED]
register_tp: 110007568
register_tp: tps_id[16777216] res_id[0] code=[AP_OK:AP_AS_SPECIFIED]
callback: 110007568
register_tp: tps_id[16777216] res_id[50332351] code=[AP_OK:AP_AS_SPECIFIED]

_notify_callback
notify_callback: reason[2] attach_id[0]
Hello. I'm Jaepil, Choi from Korea.
I have been trying to implement a TP Server Application by using
Communications Server for AIX V5.3(90 Day Trial).
I tried to test two cases.
invoked
successfully
Second: Incomming Attach -> My TP server(tpsvrtest) -> testtp2 : NOT
invoked
(Dynamic load of TP failed, Sense code = 0x084B6031)
I kept same conditions, for example same binary(testtp2), same TP Load
Info
configureation and same permission.
But, Why do they make different results? First case is successful and
second
case is not.
I guess the notification callback wasn't called after receiving a suitable
Attach.
Are there restrictions to make TP Server by using TP Server Verbs, such as
REGISTER_TP_SERVER, REGISTER_TP.
How can I do to receive incomming attaches through a notification
callback?
Is there something wrong in my TP server application code(tpsvrtest.c)?
Please, help me.
I attached my TP Server Application source file(tpsvrtest.c) and the
following is the results of the second case.
<tp info>
$ snaadmin query_tp_load_info
------------------------------------------------------------------------
list_options = FIRST_IN_LIST
tp_name = TESTTP2
lualias = TESTLU2
description = ''
userid = root
group = system
timeout = -1
type = QUEUED
style = EXTENDED
path = /data1/jeffry/test/testtp2
<compile>
/usr/vac/bin/cc -g -q64 -o tpsvrtest -I
/usr/include/sna -bimport:/usr/lib/sna/appc_r64_5.exp -bimport:/usr/lib/sna/
csv_r64_5.exp -bimport:/usr/lib/sna/nof_r64_5.exp tpsvrtest.c
<test outputs>
$./tpsvrtest
register_tp_server: 110007380
register_tp: 1100072f8
callback: 1100072f8
<sna.err>
2008-09-16 16:37:43 KORST 512-257(0-10) P (jeffry)
Dynamic load of TP failed.
Sense code = 0x084B6031
LU alias = TESTLU2
TP name = TESTTP2
l***@attglobal.net
2008-09-20 02:30:26 UTC
Permalink
Post by Jaepil, Choi
I have some more additional information.
I compiled tpsvrtest with -D _DBG and tested it.
/usr/vac/bin/cc -g -D_DBG -q64 -o tpsvrtest -I
/usr/include/sna -bimport:/usr/lib/sna/appc_r64_5.exp
-bimport:/usr/lib/sna/
Post by Jaepil, Choi
csv_r64_5.exp -bimport:/usr/lib/sna/nof_r64_5.exp tpsvrtest.c
Those are the correct compiler flags & libs to use for a
TP Server Application.
Post by Jaepil, Choi
But, the notification callback(_notify_callback) was never called for
suitable incomming attaches.
Dynamic load of TP failed.
Sense code = 0x084B6031
LU alias = TESTLU2
TP name = TESTTP2
And I verified the notification callback could be invoked if the type of
1. run tpsvrtest compiled with -D _DBG
$ ./tpsvrtest
2. reconfigurate TESTTP2 by using snatpinstall
$ cat tp.cfg
["TESTTP2"]
PATH=/data1/jeffry/test/testtp2
USERID=root
LUALIAS="TESTLU2"
$ snatpinstall -a tp.cfg
3. the notification callback was called with reason 2(AP_TP_FILE_CHANGE)
$ ./tpsvrtest
register_tp_server: 1100075f0
register_tp_server: tps_id[16777216] code=[AP_OK:AP_AS_SPECIFIED]
register_tp: 110007568
register_tp: tps_id[16777216] res_id[0] code=[AP_OK:AP_AS_SPECIFIED]
callback: 110007568
register_tp: tps_id[16777216] res_id[50332351]
code=[AP_OK:AP_AS_SPECIFIED]
Post by Jaepil, Choi
_notify_callback
notify_callback: reason[2] attach_id[0]
Hello. I'm Jaepil, Choi from Korea.
I have been trying to implement a TP Server Application by using
Communications Server for AIX V5.3(90 Day Trial).
I tried to test two cases.
invoked
successfully
Second: Incomming Attach -> My TP server(tpsvrtest) -> testtp2 : NOT
invoked
(Dynamic load of TP failed, Sense code = 0x084B6031)
I kept same conditions, for example same binary(testtp2), same TP Load
Info
configureation and same permission.
But, Why do they make different results? First case is successful and
second
case is not.
I guess the notification callback wasn't called after receiving a suitable
Attach.
Are there restrictions to make TP Server by using TP Server Verbs, such as
REGISTER_TP_SERVER, REGISTER_TP.
How can I do to receive incomming attaches through a notification
callback?
Is there something wrong in my TP server application code(tpsvrtest.c)?
Please, help me.
I attached my TP Server Application source file(tpsvrtest.c) and the
following is the results of the second case.
<tp info>
$ snaadmin query_tp_load_info
------------------------------------------------------------------------
list_options = FIRST_IN_LIST
tp_name = TESTTP2
lualias = TESTLU2
description = ''
userid = root
group = system
timeout = -1
type = QUEUED
style = EXTENDED
path = /data1/jeffry/test/testtp2
<compile>
/usr/vac/bin/cc -g -q64 -o tpsvrtest -I
/usr/include/sna -bimport:/usr/lib/sna/appc_r64_5.exp
-bimport:/usr/lib/sna/
Post by Jaepil, Choi
csv_r64_5.exp -bimport:/usr/lib/sna/nof_r64_5.exp tpsvrtest.c
<test outputs>
$./tpsvrtest
register_tp_server: 110007380
register_tp: 1100072f8
callback: 1100072f8
<sna.err>
2008-09-16 16:37:43 KORST 512-257(0-10) P (jeffry)
Dynamic load of TP failed.
Sense code = 0x084B6031
LU alias = TESTLU2
TP name = TESTTP2
You are not checking the return code from the APPC_Async calls.
I think you need something like:
rc = APPC_Async(&reg_tp_svr, _callback, _corr1);
if (rc == AP_IN_PROGRESS)
:
See the details in the APPC Programmer's Guide.

You don't check the return code from the CSV convert verbs;
are you sure the SNATBLG environment variable is set correctly?

Did you do an API trace to see the details of the APPC/CSV calls?

Did you do a SNA internal or LINK trace to make sure the
incoming attach was for TESTTP2 on local alias TESTLU2
from partner JEFFERY.TESTLU1? Remember the alias is case
sensitive. Maybe you could try leaving the alias and
partner lu names blank (i.e. catch all incoming attaches
for TESTTP2).

Did you look at some of the previous posts on this subject:
http://groups.google.com/group/ibm.software.commserver.aix/search?hl=en&group=ibm.software.commserver.aix&q=APPC_Async&qt_g=Search+this+group
At least one of those had some sample code to check.
Post by Jaepil, Choi
register_tp_DLCB.app_corr.corr_p = NULL;
or we never get the callback when the attach arrives.
and your code does not seem to set the app_corr.

Paul Landay

Loading...