PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Is a start-up program required for Simple Client Server?  (Read 375 times)

bmohrhardt

  • Member
  • **
  • Posts: 17
    • View Profile
Is a start-up program required for Simple Client Server?
« on: April 15, 2019, 06:33:51 PM »
Hello Forum :

      My apologies if this sounds like a newbie question. I am attempting to setup our backup servers for developing GUI versions of our character-based programs. I have modified the iptables on the CentOS server to accept tcp port 4093, and I have issued the command /0/pxp15/pxplus "*plus/cs/host" -arg "4093;recon=300" and the server answers back : Awaiting connect ... When I issue the lsof -i:4093 command, it shows the process listening. Both the server and the client machine are on the same node, so no firewall is blocking the attempt, and we are not using SSL.

[root@ecoback ~]# lsof -i:4093
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
pxplus  12481 root    5u  IPv4 816627      0t0  TCP *:4093 (LISTEN)
[root@ecoback ~]# iptables -L | grep 4093
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:4093

Then, I attempt to connect from an Ubuntu 16.04 workstation running Wine, from a command window, using :

"/home/prog/.wine/drive_c/PVX Plus Technologies/Windx Plugin 2018 Upd 1/pxplus.exe" *plus/cs/client -arg 192.168.150.6;4093

After a brief pause, the message box comes back stating that it cannot connect to 192.168.150.6 on port 4093, and offers to test
connectivity by browsing th http://192.168.150.6:4093. That does not connect either, but we have never allowed http traffic into
the backup server.  Do I have to specify a startup program? If so, does that program need to be resident on the server, or on the client?

Thanks,
Bill.

EVa

  • Member
  • **
  • Posts: 18
    • View Profile
    • EDIAS
Re: Is a start-up program required for Simple Client Server?
« Reply #1 on: April 16, 2019, 03:32:11 AM »
You don't need a start-up program for the Simple Client/Server.  When testing the connection with a browser, this should appear:

PxPlus CS Host server active

Please connect to this port using CS Client
Your workstation address is ::ffff:xxx.xxx.xxx.xxx
Server has been up since YYYY-MM-DD HH:mm and processed x requests

If that doesn't appear, the host isn't started correctly or the client is unable to reach the host.  In your case, I would simply start PxPlus as 'root' on the host and in console mode, enter RUN "*plus/cs/host".  The 'Awaiting connect' message should appear.  You can test if the host is started correctly by connecting with a browser on the host machine (http://127.0.0.1:4093).

Then try a browser on the client machine (http://host_ip:4093).  This must work before trying to connect with *plus/cs/client.

bmohrhardt

  • Member
  • **
  • Posts: 17
    • View Profile
Re: Is a start-up program required for Simple Client Server?
« Reply #2 on: April 18, 2019, 12:55:01 PM »
Thanks, EVa.  ;D The issue was the iptables settings.

One question though, when we are at a 1} prompt in Windx, how
can we quickly execute Shell Commands? In the old character-based
world, it was with a " followed by the command? Do we have to create
our own shortcuts?

EVa

  • Member
  • **
  • Posts: 18
    • View Profile
    • EDIAS
Re: Is a start-up program required for Simple Client Server?
« Reply #3 on: April 19, 2019, 05:35:31 AM »
ls should work in console mode (at the -} prompt) without the need for " as it's a user command (stored in lib/_cmd{/system}).

If you need other ones, this logic should work:

0010 OPEN INPUT (1)"<command" ! for example "<ps -ax"
0020 WHILE 1; READ (1,ERR=*BREAK)O$; PRINT O$; WEND
0030 CLOSE (1)

You can create a user command to execute shell commands, for example:

0010 ! do - execute Linux commands
0020 ENTER COMMAND$,ERR=*NEXT
0030 LET COMMAND$=STP(COMMAND$,2); IF COMMAND$="" THEN EXIT
0040 LET CHAN=UNT; OPEN INPUT (CHAN)"<"+COMMAND$
0050 WHILE 1; READ (CHAN,ERR=*BREAK)OUT$; PRINT OUT$; WEND
0060 CLOSE (CHAN); EXIT
-;save"*cmd/do"
/pxplus/lib/_cmd/do

-}do ps ax|grep pxp
 3351 ?        Ss     0:00 /pxplus/pxplus /pxplus/pxplus.ini -id=T0 -port=4093 *plus/cs/host;ChkRun;2019-02-28 07:46;56 -arg 4093 /pxplus/web/check.pxp
 3420 ?        S      0:00 /bin/sh -c ps ax|grep pxp
 3422 ?        S      0:00 grep pxp
-}