PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Port problem
Port problem
Débuté par iso, 25 oct. 2016 09:46 - 3 réponses
Posté le 25 octobre 2016 - 09: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
Posté le 25 octobre 2016 - 13:05
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)

The connection is established over WAN or LAN?

Regards,
José Antonio.
Posté le 27 octobre 2016 - 09:47
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
Posté le 27 octobre 2016 - 12:57
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.