tperror=6:TPENOENT Service is not available TOUPPER by shm

Added by elmehdi 6 months ago

I'm working on migrating a simple Tuxedo application to run on Tuxedo, using the `ubb2ex` tool to create my configuration files from the `ubbconfig`. Everything seemed fine: I executed the `setsimple` file to set my environment variables, and then ran the `xadmin start -y` command to start the application. It started successfully, and the output was as follows:

```
Enduro/X 8.0.10, build Nov 20 2023 15:18:15, using epoll for LINUX (64 bits)

Enduro/X Middleware Platform for Distributed Transaction Processing
Copyright (C) 2009-2016 ATR Baltic Ltd.
Copyright (C) 2017-2023 Mavimax Ltd. All Rights Reserved.

This software is released under one of the following licenses:
AGPLv3 (exceptions for Java, Go) or Mavimax license for commercial use.

  • Shared resources opened...
  • Enduro/X back-end (ndrxd) is not running
  • ndrxd PID (from PID file): 232330
  • ndrxd idle instance started.
    exec cconfsrv k pyajAUZe -i 3 -e /home/user/TuxedoToEnduroxMigration/atmi/simpapp_test/log/cconfsrv.3.log -r - :
    process id=232355 ... Started.
    exec cconfsrv k pyajAUZe -i 4 -e /home/user/TuxedoToEnduroxMigration/atmi/simpapp_test/log/cconfsrv.4.log -r - :
    process id=232379 ... Started.
    exec tpadmsv k pyajAUZe -i 5 -e /home/user/TuxedoToEnduroxMigration/atmi/simpapp_test/log/tpadmsv.5.log -r - :
    process id=232380 ... Started.
    exec tpadmsv k pyajAUZe -i 6 -e /home/user/TuxedoToEnduroxMigration/atmi/simpapp_test/log/tpadmsv.6.log -r - :
    process id=232381 ... Started.
    exec simpserv k pyajAUZe -i 1 -e /home/user/TuxedoToEnduroxMigration/atmi/simpapp_test/log/simpserv.1.log - :
    process id=232382 ... Started.
    Startup finished. 5 processes started.
    ```

However, when I try to execute my client and run the service, I get this error:

```
Can't send request to service TOUPPER
Tperrno = 6
tperror=6:TPENOENT (last error 6: ndrx_tpacall: Service is not available TOUPPER by shm)
```


Replies (6)

RE: tperror=6:TPENOENT Service is not available TOUPPER by shm - Added by Lauris 6 months ago

Hi there,

1) can you please run:

$ xadmin psc

to list the services in the system, after the boot?

2) Do you run the client code in the proper environment, i.e. $ source setsimple; ./your_client ?

3) You can enable a higher debug level for Enduro/X core topic (i.e. ndrx=5) in [@debug] section to have more output from the server binary, to see how it advertises the TOUPPER service. And then if possible, attach log file here.

4) If you are using buildserver, please add -k parameter to buildserver and if possible, attach the generated source code file for further inspection.

Thanks

RE: tperror=6:TPENOENT Service is not available TOUPPER by shm - Added by elmehdi 6 months ago

Hi Lauris,

Thank you for your response.

I checked the xadmin PSC, but I couldn't find my service. However, when I looked at the log file, I found the following message in the `cadmin.log`:

```
N:NDRX:2:55917863:256148:7ffff7fe4900:000:20240806:155003353538:_open_rply_q:config.c:0133:Reply queue [/simple,sys,bg,xadmin,256148] opened!
N:NDRX:2:55917863:256148:7ffff7fe4900:000:20240806:155003485796:hm_close_all:mi/shm.c:0199:ndrx shm library not initialized
```

Additionally, in the `ndrxd.log` file, I found a message that keeps repeating:

```
N:NDRX:2:55917863:256173:7ffff7fe4900:000:20240806:155029409563:sanity_check:sanity.c:0179:posix queue listing failed!
```


RE: tperror=6:TPENOENT Service is not available TOUPPER by shm - Added by elmehdi 6 months ago

it was my fault, I forgot to include the service advertisement in the build server command. (--_--)

RE: tperror=6:TPENOENT Service is not available TOUPPER by shm - Added by Lauris 6 months ago

Glad to hear that it is working fine.

By the waym "simpcl.c" stock version contains 'int sendlen, rcvlen;", however, the XATMI API requires "long" there. This is crucial to fix the sample code, otherwise, simpcl might give incorrect output (as memory buffer addresses due to data type sizes can be rewritten/corrupted).

(1-6/6)