- Community Home
- >
- Servers and Operating Systems
- >
- NonStop Servers
- >
- AWAITIOX with SERVERCLASS_SENDL_ in nonstop HPE sy...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2025 04:13 AM - edited 01-13-2025 06:50 AM
01-12-2025 04:13 AM - edited 01-13-2025 06:50 AM
AWAITIOX with SERVERCLASS_SENDL_ in nonstop HPE systems
Hi All,
I'm new to Non Stop and I've written a C program that invokes a SERVERCLASS_SENDL_ that then calls a rest API. This API returns a 200 with a valid response. However when I tried converting this procedure call to be asynchronous using AWAITIOX, there is an error. The API call still returns 200 but the AWAITIOX fails to wait for the operation to complete.
I have just started NonStop programming, any guidance in this direction is appreciated. Thanks!
In the following code snippet it alwys ends up in the if block event ==-1, and prints "AWAITIOX failed with error code -1" :
/* Initiate the asynchronous SERVERCLASS_SENDL_ operation */
result = SERVERCLASS_SENDL_(
(char*)pathmon_name, (short)strlen(pathmon_name),
I_serverclass, (short)strlen(I_serverclass),
(char*)&con_records_rq, (char*)&con_generic_response,
sizeof(con_records_rq), sizeof(con_generic_response)
);
if (result != 0) {
printf("SERVERCLASS_SENDL_ failed with error code %d\n", result);
return con_generic_response;
}
/* Use AWAITIOX to wait for completion of the operation */
event = AWAITIOX(&server_class_filenum, &buffer_addr, &count_transferred, &tag, timelimit, &segment_id);
if (event == -1) {
printf("AWAITIOX failed with error code %d\n", event);
return con_generic_response;
}
if (buffer_addr != 0) {
printf("Asynchronous operation failed with buffer_addr %d\n", buffer_addr);
return con_generic_response;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 02:16 AM
01-28-2025 02:16 AM
Re: AWAITIOX with SERVERCLASS_SENDL_ in nonstop HPE systems
- Make sure SERVERCLASS_SENDL_ returns a success code (0). If not, log the error and exit early and cross check if server_class_filenum is correctly initialized and corresponds to the active server class file descriptor.[ Initialize buffer_addr to 0 before calling AWAITIOX and set a reasonable timelimit (e.g., 100 ticks) to avoid premature timeouts.]
- If AWAITIOX fails, use ERRNO_() to retrieve a detailed error code instead of just checking for -1. Log errors and handle them accordingly.
- make sure server class is running and properly handling the message using MSGMON. Review the timeout (timelimit) to ensure the operation completes before timing out.
Let me know if you need further clarification!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 01:24 AM
02-10-2025 01:24 AM
Query: AWAITIOX with SERVERRCLASS_SENDL_ in nonstop HPE systems
Hello,
Let us know if you were able to resolve the issue.
If you are satisfied with the answers then kindly click the "Accept As Solution" button for the most helpful response so that it is beneficial to all community members.
Please click on "Thumbs Up/Kudo" icon to give a "Kudo".