-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Socket error on Azure app service #14
Comments
The "invalid pointer address" looks like an internal NET problem. I don't use Azure. Could you try writing a small program that just calls Connect() on a UDP socket? If it fails, we know it's not GuerrillaNTP-related. |
Hi Robert, The error has been identified and can be resolved with a few small changes to your code. For some strange reason, Azure always tries to connect via IPV6, I think if you create an overload of the NtpClient method to include the possibility of choosing the range of addresses the problem will be solved, the following code does not generate an error in Azure: var teste = new DnsEndPoint("ntp02.oal.ul.pt", 123); If i Remove the AddressFamily Azure throws one exception error. Just add the parameter to NtpClient and change all socket connections to include the parameter if defined *if not defined use the default value AddressFamily.Unspecified NtpClient client = new NtpClient("ntp02.oal.ul.pt", 123, AddressFamily.InterNetwork); Hope this helps you to solve the issue Cheers |
Good analysis. Would you be able to make a pull request with the API changes you are proposing? |
Hi Robert Created the pull request, if you use it and after you update the Nudget Package I'll try it on production server. Cheers Jorge |
Hi Robert Did you have the opportunity to check the pull request I made regarding this error? Still saying that needs to be approved by a maintainer Cheers Jorge |
I am a bit busy, but it's on my priority TODO list. I will get to it as soon as possible. |
I'm getting this error:
Error: System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (10014): The system detected an invalid pointer address in attempting to use a pointer argument in a call. [::ffff:194.117.47.42]:123
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at GuerrillaNtp.NtpClient.Connect()
at GuerrillaNtp.NtpClient.Query()
When using in a Azure App, running local don't throw error.
Code used
//NtpClient client = new NtpClient("ntp02.oal.ul.pt");
NtpClient client = new NtpClient(IPAddress.Parse("194.117.47.42"));
NtpClock clock = client.Query();
Any idea how to solve this?
Cheers
Jorge
The text was updated successfully, but these errors were encountered: