Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Problem with GDC port number  (Read 15960 times)
Richard M.
Posts: 10


« on: September 19, 2016, 12:10:24 pm »

Hi

I've got a situation where multiple users are logging on to a single Windows application server <Server IP>

At login a batch file is run for each user, which starts the GDC on a specific port for each user, sets FGLSERVER accordingly and runs a Genero program

The abbreviated batch file contains the lines;

start /D%FOURJS_HOME% /NORMAL /B C:\appsdir\fourjs\gdc\bin\gdc.exe -p %PORTNO%
set FGLSERVER=<server ip>:%PORTNO%
set FGLGUI=1
fglrun <program>

The GDC appears to start OK with any value for %PORTNO%, but the subsequent fglrun of a Genero program only seems to work if the Port Number part of the FGLSERVER setting is 00-99.    Set it specificaly to the value of %PORTNO% (6401 for example) and the program run fails with a 'cannot write to GUI' error.

ATM this is restricting the number of users to 100, which isn't enough.

I know they should be running the GAS... but this behaviour of the GDC and FGLSERVER is very odd.

Can someone explain why it doesn't work?
Bryce S.
Posts: 52


« Reply #1 on: September 19, 2016, 11:12:25 pm »

We connect using 'Direct, connection is established through terminal emulation', we use SSH2 for the protocol.

With this we have all our client machines connect using the same port.
Is setting a different port for each client a requirement of one of the other connect methods? I've never used the other methods, any with regard to direct connect...


In the 'Host Information' tab we have the command:

      @FGLNT && cmd.exe /k connect.cmd

@FGLNT sets ip address and listening port(?), then runs the server side batch file 'connect.cmd' to set the environment for the session.
Port forwarding is set to 'automatic'.
It all just works.

I've occasionally set a different port on a gdc instance on my machine when I want to run two different versions of the gdc at the same time to check behaviour between them.

Regards, Bryce Stenberg.
Reuben B.
Four Js
Posts: 1046


« Reply #2 on: September 19, 2016, 11:47:06 pm »


@RichardM
Quote
start /D%FOURJS_HOME% /NORMAL /B C:\appsdir\fourjs\gdc\bin\gdc.exe -p %PORTNO%
set FGLSERVER=<server ip>:%PORTNO%

The port number arguments should be 6400 different.  So if it is gdc -p 6401, then FGLSERVER=<server-ip>:1

Note the explanation here http://4js.com/online_documentation/fjs-fgl-manual-html/index.html#c_fgl_EnvVariables_FGLSERVER.html

You may also want to investigate using GDC short-cuts including specifying them from the command line with -S or (-s,-H,-U-C)  http://4js.com/online_documentation/fjs-gdc-manual-html/#c_gdc_cmd_line_options.html.  That is make the GDC responsible for setting FGLSERVER and launching the fglrun rather than your batch script.

@Bryce
Quote
Is setting a different port for each client a requirement of one of the other connect methods?

You are familiar with the situation where everyone has their own PC, and a GDC running on it using port 6400.  With Windows Terminal Servers, Citrix Server type solutions, there is in effect one server running multiple instances of GDC for multiple users.  In this scenario, each running instance of the GDC on the Windows Server is using a unique port number.   

Reuben


Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Richard M.
Posts: 10


« Reply #3 on: September 20, 2016, 10:45:20 am »


1) The connection to the server is done via a web browser, which ends up with the User effectively doing a remote login to the server. They don't have the GDC on their own desktop so the only one that (can) run is that on the server.  This means the ip address is the same for every user, hence the need to identify a seperate port.   

2) The documentation on FGLSERVER explains things. If you start at Port 6400 then you can only offset up to 99 before the number goes to 6500 and breaks things.   May seem obvious but the manual could state that explicitly i guess.

Thanks Guys
Reuben B.
Four Js
Posts: 1046


« Reply #4 on: September 21, 2016, 12:06:07 am »

...
2) The documentation on FGLSERVER explains things. If you start at Port 6400 then you can only offset up to 99 before the number goes to 6500 and breaks things.   May seem obvious but the manual could state that explicitly i guess.

Thanks Guys

AFAIK there is nothing at our end limiting you to the range 6400-6499

You should be able to start GDC on port 6399 and use FGLSERVER=<ip-address>:-1
or equally start GDC on port 6501 and use FGLSERVER=<ip-address>:101

I have customers using Citrix and I am fairly certain they have over 100 instances of the GDC on a single server.

Reuben
Reuben

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Richard M.
Posts: 10


« Reply #5 on: September 21, 2016, 02:50:53 pm »

That does work

Confusion on my part as to what number the offset starts from

My script reads a config file that contains the Port Number and the offset of that number from 6400

e.g 65100110

Port opens on 6510,  offset used when setting FGLSERVER is 110

So no theoretical limit i guess and i am looking at 200 users max so s'be ok.

Needs some stress testing though......

Thanks Reuben
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines