Operating System - HP-UX
1820483 Members
2476 Online
109624 Solutions
New Discussion юеВ

ftp/tcp: accept: No buffer space available

 
Ing Meloni
Advisor

ftp/tcp: accept: No buffer space available

Hi,
sometimes ftp and telnet connections to my V2500 server running HPUX 11.00 seem to hang for a while.
On syslog I find messages like:
ftp/tcp: accept: No buffer space available
The number of connections is not higher than usual in these period.

Any hint?
7 REPLIES 7
T G Manikandan
Honored Contributor

Re: ftp/tcp: accept: No buffer space available

How much memory you have on the system?
Just do a

#swapinfo -ta
to check the memory and swap usage.

Can you post your kernel parameters?
What is the value for dbc_max_pct


REvert
Jerome Baron
Respected Contributor

Re: ftp/tcp: accept: No buffer space available

Hi,

Can this document found in HP knowledge base help your ?

<<
From 11.0, application server - Informix / Oracle / inetd /
etc - sometimes causes "No buffer space available" or ENOBUFS.
This didn't happen on 10.X. Why does this happen and what can be
done to prevent this error?

How this symptom can be seen:
=============================
The symptom can be seen with any 'server' type application
which calls accept() system call. Inetd can also cause this
error on 11.0. Some customers see this with Informix / Oracle
and other major application's server daemon. The errno(see
man errno, for more details) is defined like:

#define ENOBUFS 233 /* No buffer space available */

in /usr/include/sys/errno.h. The way of printing this error
varies. Some application can just leave '233' in its log file.
Sophisticated application would call perror(3C) or
strerror(3C) to print the corrsponding error message(for
ENOBUFS, the message is "No buffer space available").

What ENOBUFS means:
===================
In many cases, ENOBUFS just means there's no sufficient
memory available and the system(kernel) can not allocate
any more. This is general definition and in most of case
such situtaion can be regarded as transient resource
shortage. And each system call can add some more information
in man pages if there're some specific meaning for each
error. Application will usually retry the operation when it
detects this error from a system call since it indicates
there's transient resource shortage.

When you look at accept(2), you will find the following
explanation:

[ENOBUFS] No buffer space is available. The accept() cannot
complete. The queued socket connect request is
aborted.

Why 11.0 accept() can cause ENOBUFS?
====================================
The description has not been changed at 11.0. However,
the implementation of accept() system call was changed
at 11.0(Transport stack has changed drastically due to
STREAMS based TCP/IP). And it can return -1 with
errno=ENOBUFS based on the condition of "the queued socket
connect request is aborted". Here, this means the transport
stack received RST just after SYN was received. If RST comes
before accept() is done, this situation can happen.

On 10.X, if this happens, the connection was just silently
dropped.

How this error should be handled?
==================================
If this can be seen with existing application, just ignore
the error. Since this can happen when we receive RST just
after SYN, the connection request is anyway cancelled.
There should be no serious problem.

If the application aborts with this error situation, it
should be re-written so that it will retry accept() system
call. ENOBUFS is usually indicating transient error. So,
aborting the application just by seeing this error once
should not be proper action. The application should be
modified so that it gets more robustness.

PORTABILITY ISSUE:
==================
UNIX Networking Programming Vol 1 Second Edition
(Richard Stevens, ISBN 0-13-490012-X) mentions this in
"5.11 Connection Abort before accept Returns" (page 129).
It says what happens is implementation dependent. HP-UX
11.0 returns ENOBUFS.
>>

Regards,
Jerome
Ing Meloni
Advisor

Re: ftp/tcp: accept: No buffer space available

swap and memory looked good, mem usage was under 50% (16GB total), and it wasn't swapping.
dbc_max_pct 25


Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192000 0 8192000 0% 0 - 1 /dev/vg00/lvol2
reserve - 696560 -696560
memory 13128568 5033424 8095144 38%
total 21320568 5729984 15590584 27% - 0 -



Stefan Farrelly
Honored Contributor

Re: ftp/tcp: accept: No buffer space available

Take a look at this long sumary - there doesnt seem to be a clear solution except that its network related;

http://www.dutchworks.nl/htbin/hpsysadmin?h=3&dn=86590&q=accept:%20No%20buffer%20space%20available&fh
Im from Palmerston North, New Zealand, but somehow ended up in London...
Armin Feller
Honored Contributor

Re: ftp/tcp: accept: No buffer space available

Hi,

the buffer space error can be misleading, please check /var/adm/nettl.LOG** and look for duplicate ip address. In my mind that will produce the error message.

Good luck ;-)

Best regards,
Armin
U.SivaKumar_2
Honored Contributor

Re: ftp/tcp: accept: No buffer space available

Hi,

Two solutions

First do this
1) Change the network card. problem may be with network cards buffers.

If the problem is not yet solved then

2) Increase the TCP receive buffer size.


regards,
U.SivaKumar
Innovations are made when conventions are broken
rick jones
Honored Contributor

Re: ftp/tcp: accept: No buffer space available

The description about the connection being aborted before the app gets to the accept() call is likely spot-on. Either the remote client just gave-up quickly, or perhaps the ftp session was blocked waiting for resources or something before it could call accept() and then the client gave up.

The likelihood that an ENOBUFS on an accept call would be related to either the NIC or the TCP socket buffer settings is basically epsilon.
there is no rest for the wicked yet the virtuous have no pillows