NetTalk Central

Author Topic: Web browser not connecting to webserver  (Read 5668 times)

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Web browser not connecting to webserver
« on: October 14, 2015, 01:36:29 AM »
I have one web application where a webbrowser can't connect to the webserver.
I have checked that the port and app is allowed through the windows Firewall (the allow connection screen came up)
I checked via netstat -ano that no other application is listening on the port
The webapp starts and I can see the port it is listening on in netstat
In the webbrowser i enter http://127.0.0.1:8088
I get a blank screen with the message connecting and the busy indicator.
Nothing shows on the log page
This can go on for a long time.
If I stop the webapplication I immediately get a message Problem loading page on the browser and that the connection was reset so the browser was definitely trying to  connect to the right port.
I have also placed a trace in theWebhandler Process Link procedure just to see if it was accessed but nothing appears.
Are there any other embed points that I can enter traces it to see where, or why I can't connect?
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

MyBrainIsFull

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Web browser not connecting to webserver
« Reply #1 on: October 14, 2015, 04:54:39 AM »
Mate, can you run the NetTalk Demo as a server on port 8088
Run your app, then see if the demo gets the connection.
If not,  then repeat this on a local machine,   
it has to work !!!   A server and a client MUST work.

So if it works on a laptop or  something but not on your production machine, then that machine is the problem.

Please advise if   the laptop (whatever) is an issue   OR     is it the machine you are testing on.

Please advise
Kevin

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Web browser not connecting to webserver
« Reply #2 on: October 14, 2015, 12:16:31 PM »
Hi Kevin
You're preaching to the choir. I have never had a webapp which didn't connect unless it hadn't been passed by the Windows Firewall and I think right at the beginning of string theory when there was no error message if string theory wasn't installed.
If you check out these images.
I compile the app (compile no errors.jpg)
I start the webserver
I start a webbrowser and enter the URL http://127.0.0.1:8088. (waiting.jpg) This screen just hangs there for as long as I do nothing. Nothing appears in the log screen
I stop the server. Immediately this screen appears (stopserver.jpg). Indicates to me it was trying to connect on port8088
I start another webapp also running on port 8088 (anotherapp8088.jpg)

Really, really weird.
I get absolutely no messages.

[attachment deleted by admin]
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Web browser not connecting to webserver
« Reply #3 on: October 14, 2015, 08:42:45 PM »
check no ssl is being set on the server or if it is you are using https on the browser. Have seen the effect you described.


MyBrainIsFull

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Web browser not connecting to webserver
« Reply #4 on: October 14, 2015, 08:47:10 PM »
Best I can think of is send me your server exe and I will run it here to see if it works.
OR
if you can send me your app with all your secret stuff cut out, I will try to compile it here and see if that works.  Only need the login page really.

 nettalkcentral@3d.com.au

Let me know
Kevin

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Web browser not connecting to webserver
« Reply #5 on: October 14, 2015, 09:32:38 PM »
Got a bit further but still no cigar
I set the webserver to not suppress messages
When I compiled I got nettalkerror.jpg
I then used netstat in cmd to get a list of ports using 8088. There was only one - PID9404 (netstatresult.jpg)
I then check TaskManager and PID9404 is the application that I started.(taskmanager.jpg)

Thanks the two Kevin's for your replies
Kevin Plummer - No bog standard app - SSL is not set
MyBrainIsFull - Thanks but I will probably find it quicker to start a new app and copy procedures across one by one if I don't find anything this morning. Anyway you should be sleeping now ;-)
I just would be interested to know why this is happening though.



[attachment deleted by admin]
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Web browser not connecting to webserver
« Reply #6 on: October 14, 2015, 10:14:58 PM »
Found it!!
I used to have the commented section in sorted.jpg in OverrideServerSettings in the Webserver procedure
I raised an issue in a previous thread with Bruce where ThisWebserver.Close() did not close and what appeared to happen was that two ports would be open in the same webapp, in this instance 8088 was opened twice. Bruce's recommendation was to change the default port in the webserver extension to a variable, HttpPort which meant that once I allocated it I wouldn't have to close and open the Webserver again.
This section slipped through the cracks in this app. ONce I replaced it with the uncommented app runs as expected.

[attachment deleted by admin]
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11247
    • View Profile
Re: Web browser not connecting to webserver
« Reply #7 on: October 19, 2015, 11:36:44 PM »
>> I raised an issue in a previous thread with Bruce where ThisWebserver.Close() did not close and what appeared to happen was that two ports would be open in the same webapp,

BTW - fixed in 8.62

cheers
Bruce