1 Reply Latest reply: Apr 8, 2013 2:59 PM by user734005 RSS

    TPESVCFAIL - application level service failure

      #include <atmi.h>
      #include <fml32.h>
      #include <fml1632.h>
      #include <tpadm.h>
      #include <stdio.h>
      #include <stdlib.h>
      int main(void)
      long len = 0;
      char lmid[16];
      char serverName[64];
      char srvID[64];
      char srvGrp[16];
      char rqAddr[16];
      char totWorkl[16];
      char state[16];
      char numReq[16];

      if (tpinit((TPINIT*)NULL) == -1) {
      fprintf(stderr, "tpint error\n");
      int flags = MIB_LOCAL;
      FBFR32* rqbuf = (FBFR32*)tpalloc(FMLTYPE32, NULL, 0);
      Finit32(rqbuf, (FLDLEN32)Fsizeof32(rqbuf));
      Fchg32(rqbuf,TA_OPERATION, 0, "GET", 0);
      Fchg32(rqbuf, TA_CLASS, 0, "T_SERVER", 0);
      Fchg32(rqbuf, TA_FLAGS, 0, (char*)&flags, 0); **/+/if i add this line: compile succeed, but run wrong!!! error info: TPESVCFAIL - application level service failure+**
      if (tpcall(".TMIB",(char*)rqbuf, 0, (char**)&rqbuf, &len, 0) != -1)
      int i, j;
      i = Foccur32(rqbuf, TA_SERVERNAME);
      for (j = 0; j < i; ++j) {
      Fget32(rqbuf, TA_SERVERNAME, j, serverName, 0 );
      Fget32(rqbuf, TA_SRVID, j, srvID, 0);
      Fget32(rqbuf, TA_STATE, j, state, 0);
      Fget32(rqbuf, TA_SRVGRP, j, srvGrp, 0);
      Fget32(rqbuf, TA_RQADDR, j, rqAddr, 0);
      Fget32(rqbuf, TA_TOTWORKL, j, totWorkl, 0);
      Fget32(rqbuf, TA_NUMREQ, j, numReq, 0);
      if (strcmp(state, "ACTIVE") == 0)
      printf("%s,%s,%s,%s,%s,%s,%s\n",serverName, srvID, state, srvGrp, rqAddr, totWorkl, numReq);
      printf("%s\n", tpstrerror(tperrno));
      return 0;

      how to get local information ,not global information ?

      Edited by: 998527 on 2013-4-7 上午7:27
        • 1. Re: TPESVCFAIL - application level service failure
          See the TA_FLAGS in the docs;


          Long valued FML32 field identifying generic and component MIB specific flag values. Component MIB specific values that may be set in this attribute are defined within each component MIB reference page. Generic flag values and uses are listed below.


          This flag is used to modify retrievals from certain classes defined in this MIB. For a number of classes in this MIB, there exists both global information (available at any site in an active application) and local information (available on the particular site where the object is active). Requests to retrieve information from these classes will by default retrieve only the global information and not the local for efficiency. If the application user is willing to wait for local information to be collected, possibly from multiple sites, this flag should be set on the retrieval request. Classes with local information have local attributes listed last in the attribute table with a subheading indicating that they are local attributes. Classes which have only local information will automatically default to retrieving local information even if this flag value is not set.


          indicates that a pre-image check must be passed before a SET operation will be performed. A pre-image check insures that occurrence 0 of any MIB specific class attributes match the existing object. If so, the object is updated using occurrence 1 of any MIB specific class attributes. Attributes occurring less than two times are not considered for pre-image checking. Multiply occurring fields are checked if their associated count attribute is specified twice.


          This flag is used as a shorthand to indicate that identification attributes for the client or server originating the request should be added to the request buffer prior to processing. For clients, TA_CLIENTID is added and for servers, TA_GRPNO and TA_SRVID are added.