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: GDC using VPN connection  (Read 15891 times)
Wee Ting C.
Posts: 21


« on: June 21, 2017, 12:30:45 pm »

Hi, my user connect to Genero server using VPN. He did not encounter issue when using GDC shortcut with http connection, but Genero application unable to run when using SSH connection. Error message:
Program error at 'fletmm01.4gl', line number 4248.
FORMS statement error number -6219.
WHENEVER ERROR CALL: The error-handler recursively calls itself.

I noticed the error message changes. Please assist. Thank you.
Laurent G.
Four Js
Posts: 110


« Reply #1 on: June 21, 2017, 07:30:11 pm »

Hello,

I actually came across this working for a ISV of ours a few days ago. The issue here is that there is another error that is trapped by your application and not directly visible to you. First course of action is to debug your app to spot the initial issue so the WHENEVER ERROR call is never called.

But that's not the full /right answer, which is to check your callback function code for recursion as the message suggests. Something like:

MAIN
WHENEVER ANY ERROR CALL spv_err
CONNECT TO 'temp'
END MAIN

FUNCTION spv_err()
CALL spv_msg()
END FUNCTION

FUNCTION spv_msg()
DEFINE test INT
ERROR "error message"
WHENEVER ANY ERROR CALL spv_err
SELECT COUNT INTO test
FROM test
END FUNCTION

If your code is looking good, then I'm curious if you are using or upgrading to 3.00 and are starting to see the issue ? ... I still have a task to investigate the source for my ISV

Keep us posted
Wee Ting C.
Posts: 21


« Reply #2 on: June 22, 2017, 03:35:21 am »

Hi Laurent,

Thanks for the feedback.

If my PC connect to server using VPN, is GDC version got thing to do with the connection? FYI, my GDC version is 2.11.

Thank you.

Regards,
Cheong
Reuben B.
Four Js
Posts: 1047


« Reply #3 on: June 22, 2017, 04:00:38 am »

Hi,

There are two issues at play here.

The first is that you not getting a very accurate error message because of the way the application has been coded.

The message you are getting "WHENEVER ERROR CALL: The error-handler recursively calls itself." is telling you that an error has occurred, and then when the code has passed through the error handling routine, another error has occurred, at which point the runner stops before ending up in an infinite loop.  If you want to see the original error, you can most likely can read it in the ERRORLOG.  Your code does need to be tided up to handle this gracefully.  The normal technique is to ensure that the FUNCTION that is called with your WHENEVER ANY ERROR routine has a different error handler.   Normally this involves stopping quickly with no UI (or minimum UI), rather than the nice tidyup / error dialog that your error handler might have.

The possible misunderstanding that whoever coded it had is that WHENEVER is a compile time directive and has no concept of scope.  Placing WHENEVER [ANY] ERROR in your code applies to ALL lines below until it hits another WHENEVER [ANY] ERROR line.  The compile time directive does not stop at END FUNCTION.  This is the "Important" note here http://4js.com/online_documentation/fjs-fgl-manual-html/#c_fgl_Exceptions_006.html

As to the actual error, you say it works with GDC over HTTP, and you get the error when trying GDC over SSH with VPN.  The important thing to note with this is that it is likely that the fglrun process that is launched has a different environment and/or process owner and/or current directory.  So to debug further you could investigate those.

My money is that environment variable FGLSERVER is not set correctly, and so you are initially getting a cannot connect to GUI error message, the code triggers the WHENEVER ERROR handler, and inside that error handler there is some user interface,  so the error handler is triggered again, and hence you get the "error-handler recursively calls itself" message.

The GDC version although old and you should have upgraded years ago, is not likely to be an issue here.

Reuben

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Wee Ting C.
Posts: 21


« Reply #4 on: June 22, 2017, 05:40:53 am »

Hi Reuben,

We set FGLSERVER as FGLSERVER=`who am i | awk '{print $6}' | sed 's/(//g' | sed 's/)//g'`:0 in AIX, which will give us ip address, 192.168.16.13:0.

Thank you.

Regards,
Cheong
Reuben B.
Four Js
Posts: 1047


« Reply #5 on: June 22, 2017, 06:17:34 am »

Hi,

... and is that FGLSERVER value correct?   The bigger clue will be what is appearing in the ERRORLOG file.

This is turning into a support issue.  Please contact your local support centre.  https://4js.com/support/support-request/  If you are who I think you are, then that regions support is now conducted via a web based portal rather than the e-mail address you used to use.

Reuben


Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines