Jump to content

Thousand attempts per second to connect to SMTP


ndemou
 Share

Recommended Posts

When we tried to start v5.4.0 on our development edition without a local SMTP server active we noticed that the pbx was not starting, the CPU was at 99% usage and strace revealed 5000 thousand requests per second to connect to the localhost SMTP port:

0.000199 connect(1, {sa_family=AF_INET, sin_port=htons(25), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
0.000277 connect(1, {sa_family=AF_INET, sin_port=htons(25), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
0.000177 connect(1, {sa_family=AF_INET, sin_port=htons(25), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
0.000176 connect(1, {sa_family=AF_INET, sin_port=htons(25), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
0.000175 connect(1, {sa_family=AF_INET, sin_port=htons(25), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
0.000175 connect(1, {sa_family=AF_INET, sin_port=htons(25), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
0.000284 connect(1, {sa_family=AF_INET, sin_port=htons(25), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)

I'm noting it because failure in one part of a system (the SMTP service) will cause the PBX to fail to start and there is no clear clue as to what is happening.

 

BTW just accepting the connection by a dummy process (ncat -l 25 --keep-open --exec /bin/cat) fixes the problem -- no need for an actual SMTP response.

Link to comment
Share on other sites

 

This post will need approval from a moderator before this post is shown.

 

Again!? This is my second thread with this obstacle when posting. Is it only me or it happens to everyone?

 

Anyway, back to your questions:

Regarding the setting: it's 127.0.0.1

Regarding the logs -- yes it does appear there also:

tail  /opt/pbxnsip/pbx/log/2016-03-04.txt
[7] 20160304150933: 127.0.0.1: Connect to 127.0.0.1:25
[7] 20160304150933: 127.0.0.1: Connected
[7] 20160304150933: 127.0.0.1: Connect to 127.0.0.1:25
[7] 20160304150933: 127.0.0.1: Connected
[7] 20160304150933: 127.0.0.1: Connect to 127.0.0.1:25
[7] 20160304150933: 127.0.0.1: Connected
[7] 20160304150933: 127.0.0.1: Connect to 127.0.0.1:25
[7] 20160304150933: 127.0.0.1: Connected
[7] 20160304150933: 127.0.0.1: Connect to 127.0.0.1:25
[7] 20160304150933: 127.0.0.1: Connected
# root  @ testpbx.zanadoo.gr  ~  
grep "Connect to 127.0.0.1"  /opt/pbxnsip/pbx/log/2016-03-04.txt |head -1
[7] 20160304150851: 127.0.0.1: Connect to 127.0.0.1:25
# root  @ testpbx.zanadoo.gr  ~  
grep "Connect to 127.0.0.1"  /opt/pbxnsip/pbx/log/2016-03-04.txt |tail -1
[7] 20160304150933: 127.0.0.1: Connect to 127.0.0.1:25
# root  @ testpbx.zanadoo.gr  ~  
grep "Connect to 127.0.0.1"  /opt/pbxnsip/pbx/log/2016-03-04.txt |wc -l
353085

Link to comment
Share on other sites

Help! Where do my posts go? I've replied within hours of your question but my post doesn't show up after many days. Then and now I see a green label "This post will need approval from a moderator before this post is shown."

This is the second thread with the same problem.

Link to comment
Share on other sites

  • 1 month later...
  • 5 months later...

Approved... <_< We have requested an upgrade of the forum software, we are using the hosted edition ... Password changes should work now. We still have a lot of posts from the well-known SPAM countries. Record was 60000 new users in a few hours, phew. I did not know we are so popular!

 

So the problem is with the SNMP server still? Latest version?

Link to comment
Share on other sites

We have requested an upgrade of the forum software, we are using the hosted edition ... Password changes should work now. We still have a lot of posts from the well-known SPAM countries. Record was 60000 new users in a few hours, phew. I did not know we are so popular!

 

Oh! I see..I hope your problems end sooner than later

Not sure what you meant by "Password changes should work now". Does it have something to do with my posts being left waiting for moderator approval? Should I change my password?

 

So the problem is with the SNMP server still?

 

SNMP? Sorry I lost you. Anyway the behaviour is exactly as described in posts #1 and #3

 

Latest version?

 

As stated, I tested on v5.5.0 -- I think it is the latest. It's extremely easy to test on any version. Set 127.0.0.1 as the mailserver, set debug level at 7, start the pbx and look at the logs.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...