Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald Knuth


computers / comp.sys.tandem / Re: PATHSEND/SERVERCLASS SEND procedure from C

Re: PATHSEND/SERVERCLASS SEND procedure from C

<09b4463e-7df3-4a59-a62c-6040a6f29082n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=170&group=comp.sys.tandem#170

  copy link   Newsgroups: comp.sys.tandem
X-Received: by 2002:a05:6214:2249:: with SMTP id c9mr27515748qvc.41.1622626932931;
Wed, 02 Jun 2021 02:42:12 -0700 (PDT)
X-Received: by 2002:a25:9a01:: with SMTP id x1mr44793647ybn.269.1622626932727;
Wed, 02 Jun 2021 02:42:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.tandem
Date: Wed, 2 Jun 2021 02:42:12 -0700 (PDT)
In-Reply-To: <5a57cdcd-079b-4b84-80ac-e30337104bc3n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=91.208.168.48; posting-account=dNxdAgoAAADbf7oqjm6wK0FgVxfPvmuX
NNTP-Posting-Host: 91.208.168.48
References: <5be026f4-cadf-46c5-b40d-8d16f689cdc4n@googlegroups.com>
<b0i2bg1gapv2mahulce8cab2qdlcrpht0c@4ax.com> <94ebc487-3d70-4424-a339-5dfc7604a0a5n@googlegroups.com>
<828d83e3-fdd2-4095-9641-ebdbfe13999an@googlegroups.com> <fvfabghrs9m70j629fs6lsj2df9l8lt7uu@4ax.com>
<34f0e5fb-cf04-4b4c-804d-5d9453a8f795n@googlegroups.com> <5a57cdcd-079b-4b84-80ac-e30337104bc3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <09b4463e-7df3-4a59-a62c-6040a6f29082n@googlegroups.com>
Subject: Re: PATHSEND/SERVERCLASS SEND procedure from C
From: uros.ku...@gmail.com (uros kusar)
Injection-Date: Wed, 02 Jun 2021 09:42:12 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: uros kusar - Wed, 2 Jun 2021 09:42 UTC

sreda, 02. junij 2021 ob 10:54:14 UTC+2 je oseba uros kusar napisala:
> torek, 01. junij 2021 ob 14:10:00 UTC+2 je oseba Dave Bossi napisala:
> > On Monday, May 31, 2021 at 3:59:31 PM UTC-4, Bill Honaker wrote:
> > > On Mon, 31 May 2021 04:07:05 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:
> > >
> > > >petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com napisala:
> > > >> On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker wrote:
> > > >> > On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:
> > > >> >
> > > >> > >Hi,
> > > >> > >I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide....) but I can't get anyting from Pathway except errors. Can you tell me what am I doing wrong?
> > > >> > >
> > > >> > >This is the code that I'm working on:
> > > >> > >----------------------------------------------------------------------------------------------------------------
> > > >> > >include <stdlib.h>
> > > >> > >#include <stdio.h>
> > > >> > >#include <string.h>
> > > >> > >#include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
> > > >> > >#include <tal.h>
> > > >> > >
> > > >> > >main()
> > > >> > >{
> > > >> > >short error, error2,pserror, fserror,countread;
> > > >> > >char *pmon;
> > > >> > >char *buffer;
> > > >> > >char *sname;
> > > >> > >
> > > >> > >pmon ="$D1MN";
> > > >> > >sname = "SERVER-NCPI-1A";
> > > >> > >buffer ="STATUS PROCESS P1A^BICUNI1";
> > > >> > >
> > > >> > >error = SERVERCLASS_SEND_ (pmon,
> > > >> > > (short) strlen(pmon), /* pathmon */
> > > >> > > sname,
> > > >> > > (short) strlen(sname), /* server class */
> > > >> > > buffer,
> > > >> > > (short) strlen(buffer),
> > > >> > > 200,
> > > >> > > &countread,
> > > >> > > -1); /* timeout = forever */
> > > >> > >
> > > >> > >if (error != 0)
> > > >> > > {
> > > >> > > error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
> > > >> > > printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
> > > >> > > exit (1);
> > > >> > > }
> > > >> > >else
> > > >> > > {
> > > >> > > buffer [countread] = 0;
> > > >> > > printf ("\nReply = %s\n", buffer);
> > > >> > > }
> > > >> > >}
> > > >> > >----------------------------------------------------------------------------------------------------------------
> > > >> > >Response:
> > > >> > >SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12
> > > >> > >
> > > >> > >Best Regards,
> > > >> > >Uros
> > > >> > Uros,
> > > >> >
> > > >> > Keith and Randall gave very valuable responses.
> > > >> >
> > > >> > Also one other possibility is that, in creating the link, the PATHMON tried to start a server process.
> > > >> > If that server process has a fixed PROCESS NAME for each isntance, and if there is already a running process with that name,
> > > >> > the attempt to start the process would get an error 12. Look at the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and
> > > >> > check what is in the "PROCESS". If it's present, there will either be one process name, or a list in paraentheses.
> > > >> > From a TACL prompt, issue a status command for each process in the list.
> > > >> >
> > > >> > Bill
> > > >> Bill,
> > > >>
> > > >> Very good remembering that filesystem error 12 is used for attempting to start a process with a name that already exists. I should have remembered that myself. Unless Pathway's link management also uses filesystem error 12 for other problems, I'd say a duplicate process name is likely to be the explanation for this problem. Perhaps Uros has set up a test environment by duplicating the configuration of an existing environment and did not know to change the configured fixed server process names.
> > > >Hi,
> > > >
> > > >Thank you all for your help.
> > > >
> > > >I changed the code:
> > > >1) I added SERVERCLASS_SEND_INFO output error number to see if command was succsesfully processed.
> > > >2) I changed the buffer to a 200-byte array.
> > > >3) I find some tal example of a similar program and I noticed that this tal program, sends the command to a different pathway server. I send it to the SERVER-NCPI-1A server, which is a server for P1A^NODE. But the tal program sends the command to the server SERVER-NCP, which sees all "node" servers.
> > > >
> > > >It is interesting because if I send a command to SERVER-NCP I get a different error code.
> > > >SERVER-NCP:
> > > >SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21
> > > >
> > > >SERVER-NCP-1A:
> > > >SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12
> > > >
> > > >I think that the correct server is a SERVER-NCP.
> > > >
> > > >---------------------------------------------------------------------------------------------------------------------------------------------
> > > >Pahway server configuration:
> > > >MAXLINKMONS 20 [CURRENTLY 2]
> > > >
> > > >SERVER SERVER-NCPI-1A
> > > >LINKDEPTH 1
> > > >MAXLINKS 32
> > > >MAXSERVERS 3
> > > >PROCESS $D1AU (ASSOCIATIVE ON)
> > > >
> > > >SERVER SERVER-NCP
> > > > LINKDEPTH 32
> > > > MAXLINKS 32
> > > > MAXSERVERS 3
> > > > PROCESS $D1C1
> > > > PROCESS $D1C2
> > > > PROCESS $D1C3
> > > >---------------------------------------------------------------------------------------------------------------------------------------------
> > > >code:
> > > >#include <stdlib.h>
> > > >#include <stdio.h>
> > > >#include <string.h>
> > > >#include <tal.h>
> > > >#include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
> > > >main()
> > > >{
> > > >short error, error2, pserror, fserror,countread;
> > > >char *pmon;
> > > >char buffer [200]={0};
> > > >char *sname;
> > > >
> > > >pmon ="$D1MN";
> > > >sname = "SERVER-NCP";
> > > >strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");
> > > >
> > > >error = SERVERCLASS_SEND_ (pmon,
> > > > (short)strlen(pmon), /* pathmon */
> > > > sname,
> > > > (short)strlen(sname), /* server class */
> > > > buffer,
> > > > (short)strlen(buffer),
> > > > 200,
> > > > &countread,
> > > > -1); /* timeout = forever */
> > > >if (error != 0)
> > > > {
> > > > error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
> > > > printf("\nSERVERCLASS_SEND_INFO error = %d \nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n",error2, error, pserror, fserror);
> > > > printf("\nBuffer size = %d\n", strlen(buffer));
> > > >
> > > > int i;
> > > > for(i=0; i<strlen(buffer); i++)
> > > > {
> > > > printf("%c",buffer[i]);
> > > > }
> > > > printf("\n\n\n");
> > > > exit (1);
> > > > }
> > > >else
> > > > {
> > > > buffer [countread] = 0;
> > > > printf ("\nReply = %s\n", buffer);
> > > > }
> > > >}
> > > I see the original server was setup with 'Asoociative On' It's possible the open table in the server can't accept another open.
> > >
> > > Can't explain the error 21.
> > I would try changing PMON and SNAME from pointers to arrays and see if it doesn't help with the error 21.
> >
> > char pmon[] = "$D1MN";
> > char sname[] = "SERVER-NCP";
> >
> > Dave
> Hi,
>
> Keith, I don't find anything in the manuals, that would show me what to send to the server.
>
> I did not post the complete output to make this thread readable as possible. The SERVERCLASS_SEND_INFO returns 0(OK) and I tried different data types, also arrays instead of pointers. The result is the same. I'm almost sure that I need to send command to the SERVER-NCP server instead the SERVER-NCPI-1A.
>
> Currently I'm using arrays:
>
> char pmon[5]={0};
> char buffer [200]={0};
> char sname[20]={0};
>
> strcpy(pmon,"$D1MN");
> strcpy(sname,"SERVER-NCP");
> strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");
>
> error = SERVERCLASS_SEND_ (pmon,
> (short)strlen(pmon), /* pathmon */
> sname,
> (short)strlen(sname), /* server class */
> buffer,
> (short)strlen(buffer),
> 200,
> &countread,
> -1); /* timeout = forever */
> OUTPUT:
> SERVERCLASS_SEND_INFO error = 0
> SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21
> Buffer size = 26
> STATUS PROCESS P1A^BICUNI1
>
>
> EMS messages:
>
> 21-06-02;10:03:23.101 \PERUN.$D1MN TANDEM.PATHWAY.L01 3116
> \PERUN.$D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01,
> ERROR DURING SERVER I/O (21) - SERVER SERVER-NCP
>
> 21-06-02;10:03:23.102 \PERUN.$D1SUD TANDEM.VHS.L01 6
> DEV1VHS:
> 02JUN21,10:03 $D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01, ERROR
> DURING SERVER I/O (21) - SERVER SERVER-NCP. Display text received
> from process $D1MN. Program file \PERUN.$SYSTEM.SYSTEM.PATHMON.
> Primary log file \PERUN.$DATA01.DEV1VHS.LOG0000.
>
> I'm losing ideas what else to try.
>
> Uros

I just notice another EMS error in collector $0

21-06-02;11:39:59.662 \PERUN.$ZL01 TANDEM.APPCLSTR.L01 1038
WARNING 1038 - Server \PERUN.$D1MN.SERVER-NCP file
operation ACS_FS_PSWRITEREAD_() failed, process
\PERUN.$D1C1:115841149, file \PERUN.$D1C1, error 21

Uros

SubjectRepliesAuthor
o PATHSEND/SERVERCLASS SEND procedure from C

By: uros kusar on Fri, 28 May 2021

24uros kusar
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor