Author Topic: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused  (Read 11035 times)

xplanet

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
« on: April 30, 2013, 01:53:30 am »
I've made a zentyal update and after that I'm getting following error messages:
connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
and
delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused

The bad part is that the whole mail service is stopped.


cat /var/log/zentyal/zentyal.log | grep mailfilter

2013/04/30 02:06:19 ERROR> GlobalImpl.pm:641 EBox::GlobalImpl::__ANON__ - Failed to save changes in module mailfilter: LDAP error: An invalid parameter was specified
2013/04/30 02:06:19 ERROR> GlobalImpl.pm:698 EBox::GlobalImpl::saveAllModules - The following modules failed while saving their changes, their state is unknown: mailfilter
2013/04/30 02:12:42 INFO> Init.pm:89 EBox::Util::Init::stop - Modules to stop: apache network firewall antivirus audit ca dhcp dns ebackup events logs mailfilter monitor ntp openvpn printers remoteservices users webserver jabber mail samba usercorner webmail zarafa
2013/04/30 02:15:40 INFO> Init.pm:73 EBox::Util::Init::start - Modules to start: network firewall antivirus audit ca dhcp dns ebackup events logs mailfilter monitor ntp openvpn printers remoteservices users webserver jabber mail samba usercorner webmail zarafa apache
2013/04/30 02:16:00 INFO> Service.pm:821 EBox::Module::Service::restartService - Restarting service for module: mailfilter
2013/04/30 02:25:41 INFO> GlobalImpl.pm:603 EBox::GlobalImpl::saveAllModules - Saving config and restarting services: firewall dns dhcp mail events zarafa mailfilter logs
2013/04/30 02:26:00 INFO> Base.pm:229 EBox::Module::Base::save - Restarting service for module: mailfilter
2013/04/30 02:27:19 INFO> GlobalImpl.pm:603 EBox::GlobalImpl::saveAllModules - Saving config and restarting services: firewall dns dhcp mail events zarafa mailfilter logs
2013/04/30 02:27:38 INFO> Base.pm:229 EBox::Module::Base::save - Restarting service for module: mailfilter
2013/04/30 02:27:38 ERROR> GlobalImpl.pm:641 EBox::GlobalImpl::__ANON__ - Failed to save changes in module mailfilter: LDAP error: An invalid parameter was specified
2013/04/30 02:27:39 ERROR> GlobalImpl.pm:698 EBox::GlobalImpl::saveAllModules - The following modules failed while saving their changes, their state is unknown: mailfilter
2013/04/30 02:28:54 INFO> GlobalImpl.pm:603 EBox::GlobalImpl::saveAllModules - Saving config and restarting services: firewall mailfilter logs
2013/04/30 02:28:56 INFO> Base.pm:229 EBox::Module::Base::save - Restarting service for module: mailfilter
« Last Edit: April 30, 2013, 03:01:14 am by xplanet »

christian

  • Guest
Re: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
« Reply #1 on: April 30, 2013, 06:38:00 am »
As a temporary workaround, you could deactivate mail filtering in mail configuration and restart mail service.
At least you will have mail delivered.

Javier Amor Garcia

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1225
  • Karma: +12/-0
    • View Profile
Re: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
« Reply #2 on: April 30, 2013, 08:33:22 am »
Hello,

if you upgrade to the last version of zentyal-users you will get likely a more explicit error.

Since the message error is very terse I have not idea of what is going on but we had recently problems with losing LDAP schemas. If you see that this is the problem, you can try to fix it with this command:

Code: [Select]
sudo -s # this will prompt your for password to get superuser access
perl -MEBox -MEBox::Global -e'EBox::init(); $mod = EBox::Global->modInstance('mailfilter'); $mod->performLDAPActions(); 1'
/usr/share/zentyal-mailfilter/mailfilter-ldap update
/etc/init.d/zentyal mailfilter restart
exit # exit superuser account

And always, like Christian says, you can disable the mailfilter to at least deliver mail

xplanet

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
« Reply #3 on: April 30, 2013, 08:37:07 am »
I've already deactivated 'Antivirus enabled' and 'Antispam enabled' in 'Mail Filter > SMTP Mail Filter' (MailFilter/Composite/Amavis) but the only change is that, all messages Status in Queue Manegement is: "connect to 127.0.0.1[127.0.0.1]:10024: Connection refused" now.
I tried to 'Attempt to deliver all queues mail', none of them delivered.

christian

  • Guest
Re: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
« Reply #4 on: April 30, 2013, 08:43:23 am »
disabling anti-virus and anti-spam is not enough because mail will still be delivered to port 10024.
You should better "unselect" the "enabled" check-box so that mail filtering is not involved anymore.
Then you will have time to investigate further while mails are delivered.

xplanet

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
« Reply #5 on: April 30, 2013, 09:04:31 am »
You mean to to deactivate mailfiltering features but not the module, don't you?
Where can I do that?
'Module Status' > 'Mail Filter' would disable the module.

I read this old thread: http://forum.zentyal.org/index.php?topic=2339.0 but didn't solve my problems.
« Last Edit: April 30, 2013, 09:11:46 am by xplanet »

christian

  • Guest
Re: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
« Reply #6 on: April 30, 2013, 09:14:22 am »
I don't know which Zentyal version you run (you don't tell in your message) but in 2.2, when configuring mail filtering, you have multiple options:
- enabling or not mail filtering
- enabling or not anti-virus
- enabling or not anti-spam

my point was to say: if you just removed spam and anti-virus but kept mail filtering "enabled", this is not enough. Rather disable mail filtering (in mail filtering configuration).
The point is not to stop, remove or deactivate mail filtering "module" but to configure it so that it is not involved in mail delivering process.

xplanet

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
« Reply #7 on: April 30, 2013, 09:26:19 am »
Sorry to forgot. It is Zentyal 3.0.19

There is no any option at: 'Mail' > 'General' > 'Mail filter options'
only this text: "As long mailfilter module is enabled the mail server will use the filter it provides"
« Last Edit: April 30, 2013, 09:29:21 am by xplanet »

christian

  • Guest
Re: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
« Reply #8 on: April 30, 2013, 09:30:47 am »
Sure but you should have such options in mail filtering section isn't it ?  ;)

xplanet

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
« Reply #9 on: April 30, 2013, 09:37:34 am »
There is 'Mail Filter' section with:

        SMTP Mail Filter
        Antispam
        Files ACL

but there is no option to disable the mail filter.
In 'Mail Filter' > 'SMTP Mail Filter' > 'General' there are: 'Antivirus enabled', 'Antispam enabled' and 'Service's port' 'Notify of non-spam problematic messages' only.

christian

  • Guest
Re: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
« Reply #10 on: April 30, 2013, 09:40:09 am »
So, too bad  :(
I can't help further as I don't run Zentyal 3.0 and it will not help telling you that Zentyal 2.2 permits to selectively enable or not mail filtering  :-[

xplanet

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
« Reply #11 on: April 30, 2013, 09:52:56 am »
Maybe it is changed in Zentyal 3.0
I had no better idea, so I disabled the Mail Filter module in 'Module Status'. After that there was 'Filter in use' option at 'Mail' > 'General' > 'Mail filter options' which is set to 'none' now.
Now the mail server can send and receive mails at least.

It's time to repair the mail filter. Before that I go out for a coffee, I didn't sleep too much at night.  :(

xplanet

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
« Reply #12 on: April 30, 2013, 11:50:44 am »
Hello,

if you upgrade to the last version of zentyal-users you will get likely a more explicit error.

Since the message error is very terse I have not idea of what is going on but we had recently problems with losing LDAP schemas. If you see that this is the problem, you can try to fix it with this command:

Code: [Select]
sudo -s # this will prompt your for password to get superuser access
perl -MEBox -MEBox::Global -e'EBox::init(); $mod = EBox::Global->modInstance('mailfilter'); $mod->performLDAPActions(); 1'
/usr/share/zentyal-mailfilter/mailfilter-ldap update
/etc/init.d/zentyal mailfilter restart
exit # exit superuser account

And always, like Christian says, you can disable the mailfilter to at least deliver mail
Thank you, I've two questions:
Do I need to backup first or it's a safe command?
Can I use this command with disabled mailfilter module? Or I have to re-enable it before?

xplanet

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
« Reply #13 on: May 02, 2013, 09:32:43 am »
I've got several mails like this:
"Subject: Cron /usr/bin/freshclam --quiet
Content-Type: text/plain; charset=ANSI_X3.4-1968
X-Cron-Env:
X-Cron-Env:
X-Cron-Env:
X-Cron-Env:
Message-Id: <20130430070003.9B9B7780FE6@avenidatravel.avenidatravel-domain.lan>
Date: Tue, 30 Apr 2013 09:00:03 +0200 (CEST)

sh: 1: /usr/share/zentyal-antivirus/freshclam-observer: Permission denied"

Does it have any connection with mail filter problem?

The non-zarafa accounts never worked on this server. They can send e-mails but can't receive any. We don't use them because we need only zarafa mail service so it wasn't a big problem. However spam@ and ham@ accounts are not working, they are non-zarafa accounts. May it cause problem in mail filter?

ost

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
« Reply #14 on: May 10, 2013, 09:59:40 am »
I think that i have the same problem:
-----------------------------------
2013/05/10 09:12:21 INFO> GlobalImpl.pm:603 EBox::GlobalImpl::saveAllModules - Saving config and restarting services: firewall mailfilter logs
2013/05/10 09:12:21 INFO> Base.pm:229 EBox::Module::Base::save - Restarting service for module: firewall
2013/05/10 09:12:24 INFO> Base.pm:229 EBox::Module::Base::save - Restarting service for module: mailfilter
2013/05/10 09:12:25 ERROR> Ldap.pm:699 EBox::Ldap::_errorOnLdap - LDAP error: An invalid parameter was specified
.<br/> Operation parameters:{
  'base' => undef,
  'filter' => 'EBox::UsersAndGroups::User=HASH(0x6a8ba00)',
  'scope' => 'one'
}
2013/05/10 09:12:25 ERROR> GlobalImpl.pm:641 EBox::GlobalImpl::__ANON__ - Failed to save changes in module mailfilter: LDAP error: An invalid parameter was spec
.<br/> Operation parameters:{
  'base' => undef,
  'filter' => 'EBox::UsersAndGroups::User=HASH(0x6a8ba00)',
  'scope' => 'one'
}
2013/05/10 09:12:25 INFO> Base.pm:229 EBox::Module::Base::save - Restarting service for module: logs
2013/05/10 09:12:26 ERROR> GlobalImpl.pm:698 EBox::GlobalImpl::saveAllModules - The following modules failed while saving their changes, their state is unknown:
-----------------------------------

Is there any chance to solve this for using the mail-filter?

(i use the core version 3.0.20 with all updates)