psychedelys / mysql-cacti-templates

Automatically exported from code.google.com/p/mysql-cacti-templates
GNU General Public License v2.0
0 stars 0 forks source link

memcached - netcat closes before output is received #152

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have come across an issue where data for memcached is received only seldomly 
when the remote system is at least running Ubuntu 10.04LTS. 

The sequence of "echo \"stats\nquit\" | nc $srv $prt" will often return no data 
(and no error), nc appears to close the connection before the data is received 
(tcpdump does not show the data coming back), but manual connections show that 
"stats" works every time.

I could manually recreate this at will on the local server with "/bin/echo -e 
"stats\nquit" | nc IPADDRESS PORT" - no output received at least 50% of the 
time.

Adding a "-q 1" to the nc options solved this for me without undue delay in the 
query.

Original issue reported on code.google.com by docone...@gmail.com on 23 Jul 2010 at 7:31

GoogleCodeExporter commented 9 years ago
Different operating systems ship incompatible versions of netcat.  I think we 
need a configuration variable $nc_options to solve this.  If I add those 
options to the script, some systems running RHEL or CentOS will break :-(  
Search past bugs, there have been some related to this, although I don't 
remember the details.

Original comment by baron.schwartz on 23 Jul 2010 at 7:43

GoogleCodeExporter commented 9 years ago
OK, I see that RHEL/CentOS up through 5.5 still uses an older version.

"-i 1" also works and would work for that version as well, but it causes a more 
definitive delay in the output.

Unfortunately, the options would depend on the remote destination OS, not the 
source.

Original comment by docone...@gmail.com on 23 Jul 2010 at 7:49

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r534.

Original comment by baron.schwartz on 15 Jan 2011 at 6:17