Welcome! Log In Create A New Profile

Advanced

nginx for Windows - WSASend() socket error 10057

Yury Shpakov
February 11, 2020 09:04PM
Hi there,


Trying to make nginx work as SMTP server and/or SMTP proxy. Done everything according to:
http://nginx.org/en/docs/howto_build_on_win32.html

But excluded (don't care about SSL at this point so don't want to install/configure Perl now):
--with-openssl=objs/lib/openssl-master \
--with-openssl-opt=no-asm \
--with-http_ssl_module \

And added:
--with-mail

nmake was successful and nginx.exe was created.

However nginx.exe keeps failing with the error:
WSASend() failed (10057: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied) while in http auth state, client: 127.0.0.1, server: 0.0.0.0:8025

Windows API says the following about this error:


WSAENOTCONN
10057

Socket is not connected.
A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using sendtohttps://docs.microsoft.com/en-us/windows/desktop/api/winsock/nf-winsock-sendto) no address was supplied. Any other type of operation might also return this error—for example, setsockopthttps://docs.microsoft.com/en-us/windows/desktop/api/winsock/nf-winsock-setsockopt setting SO_KEEPALIVEhttps://docs.microsoft.com/en-us/windows/desktop/winsock/so-keepalive if the connection has been reset.
https://docs.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2
Windows Sockets Error Codes (Winsock2.h) - Win32 apps | Microsoft Docshttps://docs.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2
Return code/value Description; WSA_INVALID_HANDLE 6: Specified event object handle is invalid. An application attempts to use an event object, but the specified handle is not valid.
docs.microsoft.com

Managed to debug your code in VS 2010 a little bit but it's brutal C so it's hard to figure your code out. And this debugger doesn't show you any local variables values.

Any recommendation for me to make it work?

Tried to play with config (commenting/uncommenting):

#user nobody;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;


events {
worker_connections 1024;
}


mail {
server_name localhost;
auth_http localhost:9000/cgi-bin/nginxauth.cgi;
# auth_http none;

smtp_auth none;
# smtp_auth login plain cram-md5;
# smtp_capabilities "SIZE 10485760" ENHANCEDSTATUSCODES 8BITMIME DSN;
xclient off;

server {
listen 8025;
protocol smtp;
proxy on;
proxy_pass_error_message on;
}
}

Tried both under a regular user and under admin. Tried on 25, 1025 and 8025 ports.


Thank you,
Yury
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

nginx for Windows - WSASend() socket error 10057

Yury Shpakov 142 February 11, 2020 09:04PM

Re: nginx for Windows - WSASend() socket error 10057

Sergey Brester 18 February 12, 2020 07:40AM

Re: nginx for Windows - WSASend() socket error 10057

Yury Shpakov 18 February 12, 2020 01:00PM

Re: nginx for Windows - WSASend() socket error 10057

Sergey Brester 18 February 12, 2020 01:52PM

Re: nginx for Windows - WSASend() socket error 10057

Yury Shpakov 19 February 13, 2020 04:46PM

Re: nginx for Windows - WSASend() socket error 10057

Yury Shpakov 16 February 13, 2020 04:50PM

Re: nginx for Windows - WSASend() socket error 10057

Sergey Brester 17 February 14, 2020 06:00AM

Re: nginx for Windows - WSASend() socket error 10057

Yury Shpakov 21 February 14, 2020 06:10PM

Re: nginx for Windows - WSASend() socket error 10057

Yury Shpakov 13 February 25, 2020 08:00PM

Re: nginx for Windows - WSASend() socket error 10057

Sergey Brester 12 February 26, 2020 04:52AM

Re: nginx for Windows - WSASend() socket error 10057 Attachments

Yury Shpakov 12 February 26, 2020 03:38PM

Re: nginx for Windows - WSASend() socket error 10057 Attachments

Sergey Brester 13 February 27, 2020 05:22AM

Re: nginx for Windows - WSASend() socket error 10057

Maxim Dounin 13 February 27, 2020 06:48AM

Re: nginx for Windows - WSASend() socket error 10057

Dipl. Ing. Sergey Brester 13 February 27, 2020 08:30AM

Re: nginx for Windows - WSASend() socket error 10057 Attachments

Yury Shpakov 13 February 27, 2020 02:42PM

Re: nginx for Windows - WSASend() socket error 10057

Maxim Dounin 25 February 28, 2020 08:28AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 95
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready