There is a problem with connecting CPRS to the server on GTM that the recent 
release of GTM is designed to fix.  Precviously, with the new listener using 
one port, you could connect once and then the listener died, and I am not 
positive that when it died that you stopped seeing it in the netstat 
listings, but you do not see anything connecting when you would telnet to it. 

The post Wally made about xinetd has to do with this, and I have wanted to 
post a discussion about this on the Wiki but can't considering there is the 
problem with the spam filter, so I am going to cram it on here with a really 
long email.  

I am not at all sure it will fix your problem that you are having now, but I 
wanted to get this out there for people in any case.  

What I am posting is really Broker team's and the GTM folk's work.  I just 
wrote it all down when Wally Fort explained it to me.  Following the 
documentation here, I have put the content of Wally's email so you can 
compare and contrast just to see what different ways there are to do this.  I 
will work on the documentation some more to make it better, but this should 
get everyone started.


Setting up the GTM fix 

1.  Set up you xinetd.conf file.

The xinetd.conf file is found in the /etc directory.  The existing file and 
modified only to log successful connections in the file listed. The log file 
is not unlimited in size and the man pages for xinetd.conf will tell you more 
about the option.  This is optional.

defaults
{
        instances               = 60
        log_type                = FILE /home/vista/xinetd.log
        log_on_success          = HOST PID
        log_on_failure          = HOST
        cps                     = 25 30
}

includedir /etc/xinetd.d



2. The file in /etc/xinetd.d/broker9210 sets up the connection to the broker 
on port 9210. The contents are as follows:  

cat broker9210
# This file to be placed in /etc/xinetd.d/  and then do
#/etc/init.d/xinetd restart to allow the changes in
#gtm $Principal to work

service broker9210
{
        port = 9210
        socket_type = stream
        protocol = tcp
        user = root
        server = /bin/su
        server_args = -p -c /home/vista/xwb9210_start vista
        passenv = REMOTE_HOST
        type = UNLISTED
        wait = no
        disable = no
}
 
3.The server in this case is actually a script in the home directory of vista.  
The file is, xpb9210_start is  owned by vista and its content are as follows:

xwb9210_start
#!/bin/sh
#xwbgtm: This is a file to test running RPCBroker as a Linux service
cd /home/vista/
#GTM profile
#provided by the vista user .bash_profile script
export HOME=$PWD
. ./.bash_profile
env >xwbtcp.log
#Run routine
mumps -run GTMLNX^XWBTCPM

4. The file XWBTCPM has a modification of the file at the GTMLNX tag as 
follows:

GTMLNX  ;From Linux xinetd script
        D ESET
        ;GTM specific code
        S @("$ZINTERRUPT=""I $$JOBEXAM^ZU($ZPOSITION)""")
        S XWBTDEV=$P U XWBTDEV:(NOWRAP)
        S %=$ZTRNLNM("REMOTE_HOST") S:$L(%) IO("GTM-IP")=%
        G CONNTYPE
        ;

5.  Last, the _ZOSV.m file needs a minor modification here:

SHARELIC(%)     ;
        Q
        ;


6.After these two files are set up, at the command line while root enter 

#/etc/init.d/xinetd restart

7.  When using the new listener controlled by the listener starter (Look/Set 
the RPC Broker Site Parameters file for your listener)

To stop the new listener, change its status to STOPPED in the RPC Broker site 
parameters file.

To REstart the listener, do D RESTART^XWBTCP([port number])  Controlled by 
Listener starter has to be set to YES

8 . To look at the Debugging log:

D ^XPAREDIT

Parameter for CPRS debug is XWBDEBUG  0-3 is the range, set it to 3, the most 
verbose

D VIEW^XWBDLOG  will display the log, which has date and time but does not 
appear in any particular order.  Just keep hitting enter until it clears out.  
It will log your CPRS connections and telnet connections.

To clean out the log:

GTM>D KILLALL^XWBDLOG

Remove all XWB log entries? No// YES
Done


9.  The log for the connection can be seen this way:

Log for connection

GTM>D ^%G

Output device: <terminal>:

List ^TMP(ZISTCP


List ^TMP("ZISTCP",*)
^TMP("ZISTCP",6210)=3
^TMP("ZISTCP",6210,1)="Open for Listen SCK$90810"
^TMP("ZISTCP",6210,2)="Have port."
^TMP("ZISTCP",6210,3)="Start Listening. LISTENING|listener|9200"
^TMP("ZISTCP",7005)=3
^TMP("ZISTCP",7005,1)="Open for Listen SCK$91605"
^TMP("ZISTCP",7005,2)="Have port."
^TMP("ZISTCP",7005,3)="Start Listening. LISTENING|listener|9200"
^TMP("ZISTCP",12186)=5
^TMP("ZISTCP",12186,1)="Open for Listen SCK$96786"
^TMP("ZISTCP",12186,2)="Have port."
^TMP("ZISTCP",12186,3)="Start Listening. LISTENING|listener|9200"
^TMP("ZISTCP",12186,4)="Got connection on h11155630180"
^TMP("ZISTCP",12186,5)="Run NT^XWBTCPM"

OR


GTM>ZWR ^TMP("ZISTCP",*)  
^TMP("ZISTCP",7005)=3
^TMP("ZISTCP",7005,1)="Open for Listen SCK$91605"
^TMP("ZISTCP",7005,2)="Have port."
^TMP("ZISTCP",7005,3)="Start Listening. LISTENING|listener|9200"

To get rid of that:
GTM>K ^TMP("ZISTCP")  ; kills this global so you can see the next connection c



This is Wally's email on the same subject:
*******************************************************
Broker as GT.M linux service.
 Date: Thu May 26 01:44:20 2005
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED], [email protected], 
[EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
 
With the new version of GT.M 
GT.M V5.0-FT02 Linux x86
The RPC Broker from patch XWB*1.1*35, and XWB*1.1*40 create a CPRS v25 that
does not make a call back to the client. �This will allow Broker/CPRS 
to work
thru firewalls or ssh tunnels.
�
This file goes into /etc/xinetd.d/<servicename>
�
# default: on
# description: This is a service for the new XWBserver Broker under 
# � � � � � � GT.M/Linux
service xwbgtm
{
� � � � port = 9502
� � � � socket_type = stream
� � � � protocol = tcp
� � � � user = gtmuser
� � � � server = /bin/bash
� � � � server_args = -l /home/vista/dev/xwbgtm_start
� � � � passenv = REMOTE_HOST
� � � � type = UNLISTED
� � � � wait = no
� � � � disable = no
}
�
This is the script that the service runs on a TCP/IP connect.
�
#!/bin/sh
#xwbgtm: This is a file to run RPCBroker as a Linux service
#
#env > /home/vista/xwbgtm.log
#pwd >> /home/vista/xwbgtm.log
#make sure of our directory
cd /home/vista/dev
#Get the GTM profile
. /home/vista/dev/gtmprofile
#Run routine
mumps -run GTMLNX^XWBTCPM
�
This is the code that goes into vista routine XWBTCPM, this will be 
part of an upcoming patch XWB*1.1*43.
�
GTMLNX �;From Linux xinetd script
� � � � D ESET
� � � � ;GTM specific code
� � � � S @("$ZINTERRUPT=""I $$JOBEXAM^ZU($ZPOSITION)""")
� � � � S XWBTDEV=$P X "U XWBTDEV:(nowrap:nodelimiter)"
� � � � S %="",@("%=$ZTRNLNM(""REMOTE_HOST"")") S:$L(%) IO("GTM-IP")=%
� � � � G CONNTYPE
� � � � ;
�
�
�
�



On Tuesday 31 May 2005 06:16 pm, Lloyd Milligan wrote:
> It appears you have verified that the listener is running and that your
> (client) firewall is not blocking callback.  Have you checked the VistA
> Kernel error log for any relevant entries?  From the programmer prompt, DO
> ^XTER and so forth.
>
> Lloyd
>
> ----- Original Message -----
> From: "Mark Goudie" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Tuesday, May 31, 2005 5:43 PM
> Subject: Re: [Hardhats-members] I cant seem to connect to the RPC Listener
>
> >I allready turned off the microsoft firewall, i ran iptables -L and it
> > came back with an error saying its not installed
> >
> > On 5/31/05, Kevin Toppenberg <[EMAIL PROTECTED]> wrote:
> >> Any Microsoft firewall up?
> >>
> >> Control Panel-->Administrative Tools-->Services  shows
> >> the services that are running.  If you see the
> >> firewall, try turning it off at least temporarily.
> >>
> >> Kevin
> >>
> >> --- Mark Goudie <[EMAIL PROTECTED]> wrote:
> >> > Sorry, Nestat is reporting that the port is open.  I
> >> > thought i was
> >> > ssh'ed into the pc but i wasnt.   Sorry for the
> >> > confusion. but even
> >> > tho the port is open i cant connect to it.  Im on a
> >> > private network
> >> > and they two pcs can ping each other.  Im using a
> >> > windows program
> >> > called Vista RPC Broker, the test executable.  The
> >> > IP and port feilds
> >> > are filled out properly
> >> >
> >> > On 5/31/05, Mark Goudie <[EMAIL PROTECTED]>
> >> >
> >> > wrote:
> >> > > I dont get anything listening on 9200 when i use
> >> >
> >> > netstat.
> >> >
> >> > > Just for info on my files im trying to mirror the
> >> >
> >> > install guide as
> >> >
> >> > > close as I can since its my first install
> >>
> >> http://openforum.worldvista.org/~forum/index.php?title=Begin_Configurati
> >>on_of_Vista
> >>
> >> > > On 5/31/05, Mark Street <[EMAIL PROTECTED]>
> >> >
> >> > wrote:
> >> > > > No error necessary.
> >> > > >
> >> > > > from your command prompt in Linux run the
> >> >
> >> > netstat command like so.
> >> >
> >> > > > netstat -an | grep 9200
> >> > > >
> >> > > > you should see output like so it the listener is
> >> >
> >> > running on port 9200 and
> >> >
> >> > > > listening for connections.
> >> > > >
> >> > > > tcp        0      0 0.0.0.0:9200
> >> >
> >> > 0.0.0.0:*               LISTEN
> >> >
> >> > > > On Tuesday 31 May 2005 13:28, Mark Goudie wrote:
> >> > > > > Im running this command
> >> > > > >
> >> > > > > GTM>D STRT^XWBTCP(9200)
> >> > > > > Start TCP Listener...
> >> > > > > Checking if TCP Listener has started...
> >> > > > > TCP Listener started successfully.
> >> > > > > GTM>D STRT^XWBTCP(9200)
> >> > > > > Start TCP Listener...
> >> > > > > Checking if TCP Listener has started...
> >> > > > > TCP Listener started successfully.
> >> > > > >
> >> > > > > If i wait just a couple seconds i can issue
> >> >
> >> > the command agian and it
> >> >
> >> > > > > wont error out saying its allready running
> >> > > > >
> >> > > > > Im running Debian Sarge install with no
> >> >
> >> > firewalls.  To my knowledge
> >> >
> >> > > > > its a pretty open system.
> >> > > >
> >> > > > --
> >> > > > Mark Street, RHCE
> >> > > > http://www.oswizards.com
> >> > > > --
> >> > > > Key fingerprint = 3949 39E4 6317 7C3C 023E  2B1F
> >> >
> >> > 6FB3 06E7 D109 56C0
> >> >
> >> > > > GPG key http://www.oswizards.com/pubkey.asc
> >>
> >> -------------------------------------------------------
> >>
> >> > > > This SF.Net email is sponsored by Yahoo.
> >> > > > Introducing Yahoo! Search Developer Network -
> >> >
> >> > Create apps using Yahoo!
> >> >
> >> > > > Search APIs Find out how you can build Yahoo!
> >> >
> >> > directly into your own
> >> >
> >> > > > Applications - visit
> >>
> >> http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> >>
> >> > > > _______________________________________________
> >> > > > Hardhats-members mailing list
> >> > > > [email protected]
> >>
> >> https://lists.sourceforge.net/lists/listinfo/hardhats-members
> >>
> >> > > --
> >> > > - Mark Goudie
> >> >
> >> > --
> >> > - Mark Goudie
> >>
> >> -------------------------------------------------------
> >>
> >> > This SF.Net email is sponsored by Yahoo.
> >> > Introducing Yahoo! Search Developer Network - Create
> >> > apps using Yahoo!
> >> > Search APIs Find out how you can build Yahoo!
> >> > directly into your own
> >> > Applications - visit
> >>
> >> http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> >>
> >> > _______________________________________________
> >> > Hardhats-members mailing list
> >> > [email protected]
> >>
> >> https://lists.sourceforge.net/lists/listinfo/hardhats-members
> >>
> >>
> >>
> >> __________________________________________________
> >> Do You Yahoo!?
> >> Tired of spam?  Yahoo! Mail has the best spam protection around
> >> http://mail.yahoo.com
> >>
> >>
> >> -------------------------------------------------------
> >> This SF.Net email is sponsored by Yahoo.
> >> Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
> >> Search APIs Find out how you can build Yahoo! directly into your own
> >> Applications - visit
> >> http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> >> _______________________________________________
> >> Hardhats-members mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/hardhats-members
> >
> > --
> > - Mark Goudie
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by Yahoo.
> > Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
> > Search APIs Find out how you can build Yahoo! directly into your own
> > Applications - visit http://developer.yahoo.net/?frfad-ysdn-ostg-q22005
> > _______________________________________________
> > Hardhats-members mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/hardhats-members
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Yahoo.
> Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
> Search APIs Find out how you can build Yahoo! directly into your own
> Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> _______________________________________________
> Hardhats-members mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hardhats-members

-- 
Nancy Anthracite


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Hardhats-members mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to