Port problem

Startbeitrag von iso am 25.10.2016 07:46

Hi,

Possibly not directly a Windev query/question but hoping someone may have had this issue and has a solution or an idea of whats causing it.

one of my clients server uses a Windev Mobile App [WM21] and a Windev Program [WD21], HyperfileSQL Server is installed on their server.

The app and a number of users of the program access the HyperfileSQL Server through IP address and port. Heres where the problem lies:

What seems randomly when i connect to the db the port says its closed. It can be fine all day then all of a sudden i start the app and it says its closed (and checks show it only closed the exact second i open the app) then i leave it 5 minutes and try again and its fine. Its not only on initial connection it could be any time while a user is using the app or the windev program. I cant seem to find any correlation, anybody any ideas?

Thanks

ISO

Antworten:

Well, in the exact moment the problem occurs, I would do some checks and save it to a log file.

If NOT ConnectToHFSQL() THEN

ChekPing(Server_IP)
CheckIfPortOpenend(constant_HFSQL_Port,Server_IP)
CheckIfPortOpenend(constant_FTP_Port,Server_IP)
CheckIfPortOpenend(constant_SMB_Port,Server_IP)

ChekPing(AnotherServerOrHost_IP)
CheckIfPortOpenend(constant_HFSQL_Port,AnotherServerOrHost_IP)
CheckIfPortOpenend(constant_FTP_Port,AnotherServerOrHost_IP)
CheckIfPortOpenend(constant_SMB_Port,AnotherServerOrHost_IP)

Edit:
With those check you will be able to discard a lot of things and even point directly to the culpit.
It aslo depends if your connection is stablished over WAN or LAN. If it over WAN I would also check another server(or Host) from a different public IP, and another Server(or Host) from to the same public IP.

Regards,
José Antonio.

von Jose Antonio Garrido - am 25.10.2016 11:05
Hi Jose

Thanks for your reply, how do i check the port is open with windev, i have been using a website http://ping.eu/port-chk/ to check .

thanks

iso

von iso - am 27.10.2016 07:47
Hi. With SocketConnect. It returns True if port is opened and False if it's not.


SocketConnect("SocketName",80,"www.google.es")



You will test if port 80 is opened on google web server (of course it will return true)

and with:


SocketConnect("SocketName",21,"127.0.0.1")


You will test if your own computer have FTP port (21) opened. So if you have a FTP Server running, or anyother thing listening at port 21, the function will return TRUE.

Regards,
José Antonio.

von Jose Antonio Garrido - am 27.10.2016 10:57
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.