Author Topic: Couldn't delete entry! - net cache flush  (Read 7401 times)

peptoniET

  • Zen Apprentice
  • *
  • Posts: 40
  • Karma: +4/-0
    • View Profile
Couldn't delete entry! - net cache flush
« on: May 03, 2016, 08:09:53 am »
Since sunday, when I upgraded TWO servers modules "Domain controller and file sharing" to version 4.2.3 i'm getting mails to the root account every couple of minutes with contents like this, on both servers:

Couldn't delete entry! key = IDMAP/UID2SID/3000002
Couldn't delete entry! key = IDMAP/SID2XID/S-1-5-21-4072495981-2812427868-577415633-1104
Couldn't delete entry! key = IDMAP/SID2XID/S-1-5-18
Couldn't delete entry! key = IDMAP/SID2XID/S-1-5-21-4072495981-2812427868-577415633-512
Couldn't delete entry! key = IDMAP/SID2XID/S-1-5-32-544
Couldn't delete entry! key = IDMAP/GID2SID/2512
Couldn't delete entry! key = IDMAP/SID2XID/S-1-5-21-4072495981-2812427868-577415633-1126
Couldn't delete entry! key = IDMAP/UID2SID/2502
Couldn't delete entry! key = IDMAP/SID2XID/S-1-5-21-4072495981-2812427868-577415633-500
Couldn't delete entry! key = IDMAP/UID2SID/2500
Couldn't delete entry! key = IDMAP/SID2XID/S-1-5-21-4072495981-2812427868-577415633-513
Couldn't delete entry! key = IDMAP/GID2SID/2513
Couldn't delete entry! key = IDMAP/GID2SID/3000002
Couldn't delete entry! key = IDMAP/GID2SID/3126
Couldn't delete entry! key = IDMAP/GID2SID/4

It says is coming from "/usr/bin/net cache flush" cron job

Info is different every time...

cmenghi

  • Zen Apprentice
  • *
  • Posts: 7
  • Karma: +1/-0
    • View Profile
Re: Couldn't delete entry! - net cache flush
« Reply #1 on: May 03, 2016, 06:35:25 pm »
Same problem from yesterday. I run the command manually and solve for some minutes.

« Last Edit: May 03, 2016, 06:37:42 pm by cmenghi »

peptoniET

  • Zen Apprentice
  • *
  • Posts: 40
  • Karma: +4/-0
    • View Profile
Re: Couldn't delete entry! - net cache flush
« Reply #2 on: May 03, 2016, 07:14:52 pm »
Why do the system needs to do this cron job every minute...

* * * * * root /usr/bin/net cache flush

It's in /etc/cron.d/zentyal-samba.

I MEAN: EVERY MINUTE?????????

peptoniET

  • Zen Apprentice
  • *
  • Posts: 40
  • Karma: +4/-0
    • View Profile
Re: Couldn't delete entry! - net cache flush
« Reply #3 on: May 03, 2016, 07:17:15 pm »
I guess we could modify the line like this

Code: [Select]
* * * * * root /usr/bin/net cache flush &>/dev/null
to get rid of the mails,

BUT: How relevant are this messages?  Could not find any info on them...

Anybody has a 4.2.2 module and check if there is this cronjob there too...?
« Last Edit: May 03, 2016, 07:21:20 pm by peptoniET »

peptoniET

  • Zen Apprentice
  • *
  • Posts: 40
  • Karma: +4/-0
    • View Profile
Re: Couldn't delete entry! - net cache flush
« Reply #4 on: May 03, 2016, 07:24:07 pm »
OK.  I forgot I had another server which I have not upgraded this module to 4.2.3.

THERE IS NO /etc/cron.d/zentyal-samba IN 4.2.2!!!

What kind of problem Zentyal has that it has to clear the cache EVERY MINUTE???  It's an insane method...

cmenghi

  • Zen Apprentice
  • *
  • Posts: 7
  • Karma: +1/-0
    • View Profile
Re: Couldn't delete entry! - net cache flush
« Reply #5 on: May 03, 2016, 07:30:36 pm »
My packages
ii  zentyal                               4.2                                 all          Zentyal - Core metapackage
ii  zentyal-antivirus                     4.2                                 all          Zentyal - Antivirus
ii  zentyal-common                        4.2                                 all          Zentyal - Common Library
ii  zentyal-core                          4.2.2                               all          Zentyal - Core
ii  zentyal-dns                           4.2.1                               all          Zentyal - DNS Server
ii  zentyal-firewall                      4.2                                 all          Zentyal - Firewall
ii  zentyal-network                       4.2.2                               all          Zentyal - Network Configuration
ii  zentyal-ntp                           4.2                                 all          Zentyal - NTP Service
ii  zentyal-objects                       4.2                                 all          Zentyal - Network Objects
ii  zentyal-samba                         4.2.3                               all          Zentyal - Domain Controller and File Sharing
ii  zentyal-services                      4.2                                 all          Zentyal - Network Services
ii  zentyal-software                      4.2                                 all          Zentyal - Software Management


In another server running Zentyal 4.0 this cron job doesn't exist!!

peptoniET

  • Zen Apprentice
  • *
  • Posts: 40
  • Karma: +4/-0
    • View Profile
Re: Couldn't delete entry! - net cache flush
« Reply #6 on: May 03, 2016, 07:33:07 pm »
Ok then.  This s**t was introduced by zentyal-samba 4.2.3.  >:(

peptoniET

  • Zen Apprentice
  • *
  • Posts: 40
  • Karma: +4/-0
    • View Profile
Re: Couldn't delete entry! - net cache flush
« Reply #7 on: May 03, 2016, 07:34:54 pm »
More about this here: https://forum.zentyal.org/index.php?topic=27113.0

But that is back to November 2015...

cmenghi

  • Zen Apprentice
  • *
  • Posts: 7
  • Karma: +1/-0
    • View Profile
Re: Couldn't delete entry! - net cache flush
« Reply #8 on: May 03, 2016, 09:41:17 pm »
What's happen if remove the cron entry ?

peptoniET

  • Zen Apprentice
  • *
  • Posts: 40
  • Karma: +4/-0
    • View Profile
Re: Couldn't delete entry! - net cache flush
« Reply #9 on: May 04, 2016, 08:37:50 am »
I would not remove this entry.  Zentyal team has put it there for some powerful reason...  you don't clean the cache every minute for nothing...

cmenghi

  • Zen Apprentice
  • *
  • Posts: 7
  • Karma: +1/-0
    • View Profile
Re: Couldn't delete entry! - net cache flush
« Reply #10 on: May 04, 2016, 07:10:12 pm »
This is true, sound like a temporaly patch. For now i'm deconfigure the mails for this server.

peptoniET

  • Zen Apprentice
  • *
  • Posts: 40
  • Karma: +4/-0
    • View Profile
Re: Couldn't delete entry! - net cache flush
« Reply #11 on: May 05, 2016, 04:33:41 pm »
I cannot afford to disable root mails, so I've gone through this solutions instead.

Code: [Select]
* * * * * root /usr/bin/net cache flush &>/dev/null
But I'm still worried about the error messages...

cmenghi

  • Zen Apprentice
  • *
  • Posts: 7
  • Karma: +1/-0
    • View Profile
Re: Couldn't delete entry! - net cache flush
« Reply #12 on: May 05, 2016, 08:16:17 pm »
I cannot afford to disable root mails, so I've gone through this solutions instead.

Code: [Select]
* * * * * root /usr/bin/net cache flush &>/dev/null
But I'm still worried about the error messages...

Yes, this can work.

jfaria

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Couldn't delete entry! - net cache flush
« Reply #13 on: July 25, 2016, 05:29:52 pm »
I have a similar a similar situation but, in my case, machine almoust stop running, completly overloaded.

I was able to login (very slow) and I issue command ps -aux. It shows a lot (hundreds) of lines like this:

root     10123  0.0  0.0   4440     0 ?        Ss   07:55   0:00 /bin/sh -c /usr/bin/net cache flush
root     10125  0.0  0.0 321840     8 ?        S    07:55   0:00 /usr/bin/net cache flush

After a reboot everything seems to be ok again.

I decided to remove the CRON job and see what happens.

CRON runs net cache flush every minute. Somewher in time, there is a condition when the command hangs and doesn't complete and stay in memory (but system doesn't crash!). CRON continues to run every minute until no more memory available.

Mr. Zentyal, why do you need to flush the cache every minute? And why net cache flush hangs in memory?

Thank you.
« Last Edit: July 25, 2016, 05:33:18 pm by jfaria »

allitsk

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Couldn't delete entry! - net cache flush
« Reply #14 on: October 13, 2016, 09:33:24 am »
Hello @jfaria,
the same situation with lots of net cache flush happened to me . When you removed this line from cron, was it ok?

Thank you.
« Last Edit: October 13, 2016, 09:38:46 am by allitsk »