shinken-monitoring / mod-booster-nrpe

Shinken module for boosting NRPE connections

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLOSE_WAIT in using boost_nrpe

andyxning opened this issue · comments

I have tested boost_nrpe for a little time and finally got a problem. We have more than 1, 000 CLOSE_WAIT in our machine running boost_nrpe. In order to make the things clearly, i read the code about 1.4.1 which is at the same time used by us. I have found some problems.

Since we got a lot of CLOSE_WAIT, then it is the cause that we(boost_nrpe) does not close the socket properly under some special circumstances. i have found some positions, like 1 2 3 4.

All these four positions there are some special cases and they just call set_exit and does not call self.close() under these circumstances. So i think we should remove the line between line 272-273. And at the same time i think we should add the above two line into the bottom of set_exit method.

At the same time, why should you just recv 1034 bytes in NRPE response, since at Shinken the response length of this is usually 8192 bytes. It seems that you just read once if the received contents is not empty it will be used as the result and set the status of the check with set_exit and then in the normal circumstances close the socket. This is really limited to just receive one with buf size about 1034 bytes.

Hi we face this problem some time ago. The upstream version of the module should be working. Did you install the module from shinken.io? If yes just take this one and it may work.

so can you just tag and release the same version about 1.4.2 and i will check and find if it will work.

@andyxning
Can we close ?

Yes, of cause.