This content has been marked as final.
Show 11 replies
-
1. Re: tpinit failed: TPEOS - operating system error
Todd Little-Oracle Jun 16, 2010 4:16 PM (in response to tuxit)Hi Gery,
Although I'm not certain of this, my guess is that you may need to perform a tpterm() before trying tpinit() again. So when you get the TPEOS error from your tpcall(), my suggestion is you then tpterm() and tpinit() in a loop.
Regards,
Todd Little
Oracle Tuxedo Chief Architect -
2. Re: tpinit failed: TPEOS - operating system error
tuxit Jun 16, 2010 4:34 PM (in response to Todd Little-Oracle)Hi Todd,
that's actually what I am doing now. However the tpterm it selves fails as well with the same error. Maybe there is some freeeverything() function somewhere in the API ? I could not find any hints yet.
the ULOG brings this out put:
183317.my_server_name!?proc.7381: LIBTUX_CAT:1199: ERROR: Cannot re-attach: operating system error: errno = 22.
Kind Regards,
Gery
Edited by: tuxit on 16.06.2010 09:34 -
3. Re: tpinit failed: TPEOS - operating system error
Ed Heeren-Oracle Jun 22, 2010 3:57 AM (in response to tuxit)Gery,1 person found this helpful
The LIBTUX_CAT:1199 message is printed in a function that is normally called only by processes running in protected mode. (In protected mode Tuxedo detaches from the bulletin board shared memory at the end of every call.) My guess is that your TUXCONFIG file specifies "SYSTEM_ACCESS PROTECTED".
As a workaround, you may want to add the line
tpinfo->flags = TPSA_FASTPATH;
in your monitoring daemon to see whether or not that fixes the problem.
Regards,
Ed -
4. Re: tpinit failed: TPEOS - operating system error
tuxit Jun 23, 2010 9:25 AM (in response to Ed Heeren-Oracle)Hello Ed,
Thank you for the input. Infact all my systems have set SYSTEM_ACCESS PROTECTED, NO_OVERRIDE.
I added the line of code you mentioned before tpinit.
Even though I could swear that this worked once (re-attached after tux-reboot), I can't reproduce it any more it still failes with the same LIBTUX_CAT:1199 error.
when starting my daemon with the TPSA_FASTPATH flag set I also get this warning:
112127.my_server_name!?proc.2833: LIBTUX_CAT:1203: WARN: Cannot override system default access method PROTECTED
probably because of the NO_OVERRIDE ?
Regards,
Gery -
5. Re: tpinit failed: TPEOS - operating system error
tuxit Jun 23, 2010 9:43 AM (in response to tuxit)...
infact removing NO_OVERRIDE in the tuxconfig would do the trick. I tried that on my dev-system. But I doubt that I can do that for all my systems.
... -
6. Re: tpinit failed: TPEOS - operating system error
tuxit Jun 24, 2010 9:12 AM (in response to tuxit)in order to set TA_SYSTEM_ACCESS to PROTECTED only without NO_ORVERRIDE I try this :
But I get the following error even though I'm tuxadm user and tuxadm group.FBFR32 *ibuf = (FBFR32 *)tpalloc((char *)FMLTYPE32, NULL, 0); Fchg32(ibuf, TA_OPERATION, 0,(char*) "SET", 0); Fchg32(ibuf, TA_CLASS, 0, (char *)"T_DOMAIN", 0); Fchg32(ibuf, TA_SYSTEM_ACCESS, 0, (char *)"PROTECTED", 0); int retc = tpadmcall(ibuf, &ibuf, 0); if ( retc < 0) { printf("tpadmcall() failed:%s\n",tpstrerror(tperrno)); } tpfree((char *)ibuf);
tpadmcall() failed:TPEMIB - Management Information Base access error
Any ideas what could be the suolution ?
Cheers,
Gery -
7. Re: tpinit failed: TPEOS - operating system error
Todd Little-Oracle Jun 28, 2010 5:47 AM (in response to tuxit)Hi Gery,
How are you performing the tpinit()? I believe you have to set the client to tpsysadm to perform MIB operations.
Regards,
Todd Little
Oracle Tuxedo Chief Architect -
8. Re: tpinit failed: TPEOS - operating system error
tuxit Jun 28, 2010 9:19 AM (in response to Todd Little-Oracle)Hello Todd,
I think tmadmcall should call tpinit with default NULL. But I also tried with the above code to tpinit with
andTPINIT * tpinfo = (TPINIT*)tpalloc((char *)"TPINIT",NULL,TPINITNEED(20)); strcpy(tpinfo->cltname, "tpsysadm");
as stated I am tuxadm user and group which is the same as UID and GID in the tuxconfig. But anyway I try I alway get the same error.strcpy(tpinfo->grpname,"tuxadm"); strcpy(tpinfo->usrname, "tuxadm");
Reading from T_DOMAIN is working with the same code, only writing failes.
Kind Regards,
Gery -
9. Re: tpinit failed: TPEOS - operating system error
tuxit Jun 29, 2010 9:18 AM (in response to tuxit)I found out that I in fact didn't call tpinit.... So I fixed that. tpinit is called successfully now. But the tmadmcall still gives me an error but a different one : tpadmcall() failed:TPEPROTO - protocol error
Regards,
Gery -
10. Re: tpinit failed: TPEOS - operating system error
tuxit Jun 30, 2010 10:23 AM (in response to tuxit)So far the only possible soultion I've found is to tmunloadcf the tuxedo configuration, redirect the output to a file change line SYSTEM_ACCESS PROTECTED, NO_OVERRIDE to SYSTEM_ACCESS PROTECTED and then load the file again with tmloadcf tuxcfg.txt <&- in a unix shell.
Any way I try with tmadmcall will fail with either TPEPROTO - protocol error or TPEMIB - Management Information Base access error.
That also failes when NO_OVERRIDE is not set. It also does not seam to matther whether the tuxedo instance is runing or not. Always the same errors occurs.
The code currenlty looks like :
Cheers,TPINIT * tpinfo = (TPINIT*)tpalloc((char *)"TPINIT",NULL,TPINITNEED(20)); //strcpy(tpinfo->grpname,"tuxadm"); strcpy(tpinfo->usrname, "tuxadm"); strcpy(tpinfo->cltname, "tpsysadm"); strcpy(tpinfo->passwd,"isitux"); tpinfo->flags = TPSA_FASTPATH; long len = 0; if (tpinit(tpinfo) == -1) { printf("errno: %ld\n", tperrno); fprintf(stderr, "tpinit failed: %s\n", tpstrerror(tperrno)); int tret = tpterm(); if (tret < 0) { cout << "tprem : " << tret << endl; fprintf(stderr, "tpinit failed: %s\n", tpstrerror(tperrno)); } tpfree((char *)tpinfo); //return -1; } FBFR32 *ibuf = (FBFR32 *)tpalloc((char *)FMLTYPE32, NULL, 0); Fchg32(ibuf, TA_OPERATION, 0,(char*) "SET", 0); Fchg32(ibuf, TA_CLASS, 0, (char *)"T_DOMAIN", 0); Fchg32(ibuf, TA_SYSTEM_ACCESS, 0, (char *)"PROTECTED", 0); //int retc = tpcall((char *)".TMIB", (char *)ibuf, 0, (char **)&ibuf, &len, (long)0); int retc = tpadmcall(ibuf, &ibuf, 0); if ( retc < 0) { printf("tpadmcall() failed:%s\n",tpstrerror(tperrno)); } tpfree((char *)ibuf); tpterm();
Gery -
11. Re: tpinit failed: TPEOS - operating system error
357486 Jul 11, 2010 6:24 PM (in response to tuxit)Hi,
You can have more information about the error when using: tpstrerrordetail(tperrordetail(0),0);
I am using for monitor tpcall(".TMIB",...) and it works OK.
Flow:
Starting application: tpinit(..);
Calling TMIB classes in a loop:
tpcall (".TMIB",...);
if (TPESYSTEM or TPEOS) tpterm;
If tuxedo down: tpinit(...) again before calling the service.
Hope this help.
BR,
Revital Bloom
revital@midlink.co.il