NetTalk Central

Author Topic: Troubleshoot connection to webserver  (Read 6329 times)

JohanR

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • Email
Troubleshoot connection to webserver
« on: April 21, 2015, 12:11:49 AM »

Hi,

After converting a C6 app to C9,
I am unable to connect to the webserver, using localhost, or from a different machine.

Is there a check list available anywhere that I can work through or any ideas on what I could check on what is going wrong.
I have tried to disable the firewall.

thanks

Johan

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Troubleshoot connection to webserver
« Reply #1 on: April 21, 2015, 12:15:46 AM »
Is it an SSL app? Have you checked Task Manager for any other instances running? Can you run the C9 NT Examples ok?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Troubleshoot connection to webserver
« Reply #2 on: April 21, 2015, 03:03:02 AM »
for debugging purposes turn on Errors, (ie turn off "suppress errors"),
and maybe run the server on a different port (for testing.)

also you can turn on logging, and watch the startup in debugview to see if anything leaps out at you.

cheers
Bruce

Richard I

  • Sr. Member
  • ****
  • Posts: 398
    • View Profile
    • Email
Re: Troubleshoot connection to webserver
« Reply #3 on: April 21, 2015, 09:05:32 PM »
You might have, on the first instance of running the app from localhost or 127.0.0.1: PORT answered the firewall option incorrectly.... so that its now blocked.

Try renaming the webserver exe , compiling and rerun, this time making sure you answer the windows firewall prompt to allow....
The other option is to try running from a PC outside your network if you have  the static IP address set up.... This is a pain in the long term because you will want to test again, so just rename
Hope this Helps,
Richard

mmelby

  • Newbie
  • *
  • Posts: 35
    • View Profile
    • Email
Re: Troubleshoot connection to webserver
« Reply #4 on: April 22, 2015, 09:09:53 AM »
Or... if you know how to configure your firewall you can go in and change the rule that was created.

If it is a Windows firewall you can go into Control Panel/Windows Firewall/Advanced settings. It should be in the Outbound rules. Double click on the rule and change to Allow the connection.

JohanR

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • Email
Re: Troubleshoot connection to webserver
« Reply #5 on: April 27, 2015, 12:41:43 AM »

Hi Guys,

thank you for all the advice.
I have made progress, renaming the exe helped as it seems as if it was the firewall.

Now I am getting this error:
 (Error code: ssl_error_no_cypher_overlap)

1) The web9 alwaysSSL Example works
2) This line in the debug log stands out
[5148] [NetDLL] [2] SSL_Our_ServerTryAccept() : SSL Error calling SSL_accept : SSL_ERROR_SSL [error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher] A failure in the SSL library occurred, usually a protocol error. SSL Error Code Error = 193
3) SSLscan.exe works for the eaxmple app, for my app it returns nothing.


The only difference I can see between my app and the example , is that the example has one "webserver" window with 2 nettalk objects, 80 and 443
and my app has 2 "webserver" windows each with it's own nettalk object, one for port 80, the other for port 443

Would this play a role?


Any pointers appreciated

Johan







Full log below

[2528] D3D11: Removing Device.
[5148] [NetDLL] [2] CallBackWindowClientCallBack() :  Count=1 p_wMsg = 8181 wParam = 796 (lParam = 8) = Loc:WSAGetSelect.Err = 0 & Loc:WSAGetSelect.Event = 8. p_hWnd = 656714
[5148] [NetDLL] [2] SimpleServer_Accept() : Server FD_ACCEPT ------
[5148] [NetDLL] [2] SimpleServer_Accept() : Before GetNextMessageNumber
[5148] [NetDLL] [2] SimpleServer_Accept - GetNextMessageNumber() : loc:ux = 1 NETDLL:WM:CurrentSimpleServerConnections = 10262
[5148] [NetDLL] [2] SimpleServer_Accept - GetNextMessageNumber() : Before Clear
[5148] [NetDLL] [2] SimpleServer_Accept - GetNextMessageNumber() : After Clear - Before Assign
[5148] [NetDLL] [2] SimpleServer_Accept - GetNextMessageNumber() : After Assign - Before Get
[5148] [NetDLL] [2] SimpleServer_Accept - GetNextMessageNumber() : After Get - Before Er_Code
[5148] [NetDLL] [2] SimpleServer_Accept - GetNextMessageNumber() : loc:OurErr = 30
[5148] [NetDLL] [2] SimpleServer_Accept() : After GetNextMessageNumber
[5148] [NetDLL] [2] SimpleServer_Accept() : About to accepted new connection on current listening server port socket using = 796 WinMsg (for callback on this socket) = 10262
[5148] [NetDLL] [2] SimpleServer_Accept() : Accepted new socket connection on listening port = 443 new Socket = 588 SockID = 85 from IP = 127.0.0.1 (Remote Port = 53809) WinMsg (for callback on this socket) = 10262
[5148] [NetDLL] [2] SimpleClearInQueue() : Start of function. IP = 0.0.0.0 Socket = 588 SockID = 85
[5148] [NetDLL] [2] SimpleClearInQueue() : Normal check. (Nothing deleted)
[5148] [NetDLL] [2] SimpleClearOutQueues() : Start of function. IP = 0.0.0.0 Socket = 588 SockID = 85
[5148] [NetDLL] [2] SimpleClearOutQueues() : Normal check. (Nothing deleted)
[5148] [NetDLL] [2] SimpleServer_Accept() : SSL. About to call SSL_OurServerSwitchToSSL.
[5148] [NetDLL] [2] SSL_Our_ServerSwitchToSSL() : qSimpleServerListeningPorts.SSL_lpSSL_CTX = 36896256
[5148] [NetDLL] [2] SSL_Our_ServerTryAccept() : qSimpleServerConnections.SSL_lpSSL = 80680704
[5148] [NetDLL] [2] SSL_Our_GetErrorString() : Changing p_SSLError from -1 to 193
[5148] [NetDLL] [2] SSL_Our_ServerTryAccept() : SSL Error calling SSL_accept : SSL_ERROR_SSL [error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher] A failure in the SSL library occurred, usually a protocol error. SSL Error Code Error = 193
[5148] [NetDLL] [2] SimpleCloseSocket - Abort() : Calling SetSockOpt. Linger = 0 0
[5148] [NetDLL] [2] SSL_Our_Close() : Before SSL_Shutdown 80680704
[5148] [NetDLL] [2] SSL_Our_Close() : Result (SSL_Shutdown) = 1
[5148] [NetDLL] [2] SSL_Our_Close() : Before SSL_Free 80680704
[5148] [NetDLL] [2] SSL_Our_Close() :  After SSL_Free
[5148] [NetDLL] [2] SimpleServer_Accept - AbortSocket() : After CloseSocket
[5148] [NetDLL] [2] CallBackWindowClientCallBack() : End of Function - will Return (1)
[5148] [NetDLL] [2] CallBackWindowClientCallBack() :  Count=1 p_wMsg = 10262 wParam = 588 (lParam = 1) = Loc:WSAGetSelect.Err = 0 & Loc:WSAGetSelect.Event = 1. p_hWnd = 656714
[5148] [NetDLL] [2] SimpleServer_Async() : Warning! A socket is dead. Got a FD_READ message = 10262 for a socket that is no longer in qSimpleServerConnections. (ie The connection was closed before the message arrived).Message = 10262
[5148] [NetDLL] [2] CallBackWindowClientCallBack() : End of Function - will Return (1)
[5148] [NetDLL] [2] CallBackWindowClientCallBack() :  Count=1 p_wMsg = 10262 wParam = 588 (lParam = 2) = Loc:WSAGetSelect.Err = 0 & Loc:WSAGetSelect.Event = 2. p_hWnd = 656714
[5148] [NetDLL] [2] SimpleServer_Async() : Warning! A socket is dead. Got a FD_WRITE message = 10262 for a socket that is no longer in qSimpleServerConnections. (ie The connection was closed before the packet could be sent).Message = 10262
[5148] [NetDLL] [2] CallBackWindowClientCallBack() : End of Function - will Return (1)
[5148] [NetDLL] [2] CallBackWindowClientCallBack() :  Count=1 p_wMsg = 10262 wParam = 588 (lParam = 1) = Loc:WSAGetSelect.Err = 0 & Loc:WSAGetSelect.Event = 1. p_hWnd = 656714
[5148] [NetDLL] [2] SimpleServer_Async() : Warning! A socket is dead. Got a FD_READ message = 10262 for a socket that is no longer in qSimpleServerConnections. (ie The connection was closed before the message arrived).Message = 10262
[5148] [NetDLL] [2] CallBackWindowClientCallBack() : End of Function - will Return (1)
[5148] [NetDLL] [2] CallBackWindowClientCallBack() :  Count=1 p_wMsg = 10262 wParam = 588 (lParam = 32) = Loc:WSAGetSelect.Err = 0 & Loc:WSAGetSelect.Event = 32. p_hWnd = 656714
[5148] [NetDLL] [2] SimpleServer_Async() : Warning! A socket is dead. Got a FD_CLOSE message = 10262 for a socket that is no longer in qSimpleServerConnections. (ie The connection was closed before the message arrived).Message = 10262
[5148] [NetDLL] [2] CallBackWindowClientCallBack() : End of Function - will Return (1)
[2528] D3D11: Removing Device.
[5148] [NetDLL] [2] CallBackWindowSrc() : Before CloseInActiveNetAutoConnections().
[5148] [NetDLL] [2] CallBackWindowSrc() : After CloseInActiveNetAutoConnections().



Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Troubleshoot connection to webserver
« Reply #6 on: April 28, 2015, 02:13:35 AM »
Hi Johan,

probably a good idea to try with 8.45 as there have been some tweaks to SSL in this build.
Regarding the error - I suspect an issue in the certificate you are deploying - perhaps you haven't got that quite right yet.

cheers
Bruce