logon errors, write_socket_data: write failure. Error
=Brokenpipe
Lee Howard
faxguy at deanox.com
Mon Oct 30 19:03:31 GMT 2000
I just tried:
socket options = TCP_NODELAY
socket options = SO_RCVBUF=1
socket options = SO_SNDBUF=1
With no improvement... Any ideas anyone?
Lee.
At 12:27 PM 10/27/00 -0600, Lee Howard wrote:
>Can somebody who knows C better than me look at the write_socket_data
>routine below and tell me under what conditions I would see the following
>error:
>
>write_socket_data: write failure. Error = Broken pipe
>
>This always appears in this fashion:
>
>[2000/10/26 16:07:52, 0] lib/util_sock.c:write_socket_data(540)
> write_socket_data: write failure. Error = Broken pipe
>[2000/10/26 16:07:52, 0] lib/util_sock.c:write_socket(566)
> write_socket: Error writing 4 bytes to socket 6: ERRNO = Broken pipe
>[2000/10/26 16:07:52, 0] lib/util_sock.c:send_smb(754)
> Error writing 4 bytes to client. -1. Exiting
>
>I know that it would correlate with one of:
>
>SSL_write(ssl,buffer + total,N - total)
>send(fd,buffer + total,N - total, 0)
>send(fd,buffer + total,N - total,0)
>
>returning the value of -1, but I don't know what send() or SSL_write() do.
>
>Thanks
>
>Lee Howard
>
>
>( from samba-2.0.7/source/lib/util_sock.c ):
>
>/****************************************************************************
> Write data to a socket - use send rather than write.
>****************************************************************************/
>
>ssize_t write_socket_data(int fd,char *buffer,size_t N)
>{
> size_t total=0;
> ssize_t ret;
>
> while (total < N)
> {
>#ifdef WITH_SSL
> if(fd == sslFd){
> ret = SSL_write(ssl,buffer + total,N - total);
> }else{
> ret = send(fd,buffer + total,N - total, 0);
> }
>#else /* WITH_SSL */
> ret = send(fd,buffer + total,N - total,0);
>#endif /* WITH_SSL */
>
> if (ret == -1) {
> DEBUG(0,("write_socket_data: write failure. Error = %s\n",
>strerror(errno$
> return -1;
> }
> if (ret == 0) return total;
>
> total += ret;
> }
> return (ssize_t)total;
>}
>
>
More information about the samba
mailing list