habibzain Just husband, father and enthusiastic men about System Administration. Love to write short article about it. Perhaps can help and be useful for others.

Zimbra zclient.IO_ERROR (invoke Connection refused, server: localhost)

1 min read

zclient.IO_ERROR-invoke-Connection-refused-server-localhost

When we get this error, you can’t execute any Zimbra zmprov commands. This is devastating since daily Zimbra Admin users use Zimbra CLI a lot. When execute zmprov, suddenly get error Zimbra “zclient.IO_ERROR …” with detail like below.

ERROR: zclient.IO_ERROR (invoke Connection refused, server: localhost) (cause: java.net.ConnectException Connection refused)
Zimbra zclient.IO_ERROR

What is Zimbra zmprov?

The zmprov tool performs all provisioning tasks in Zimbra LDAP, including creating accounts, aliases, domains, COS, distribution lists, and calendar resources. Each operation is invoked through command-line options, each of which has a long name and a short name.

What causes this error?

First, the main cause for this error is when Zimbra zmprov is not configured to get results from LDAP. To fix this, you need to set zimbra_zmprov_default_to_ldap to TRUE. This will make sure all the zmprov commands get replies from LDAP server.

How to fix it.

Do a checking for the setting of zimbra_zmprov_default_to_ldap to be sure.

zimbra@mbox1:~$ zmlocalconfig |grep zmprov
zimbra_zmprov_default_soap_server = localhost
zimbra_zmprov_default_to_ldap = false
zmprov_safeguarded_attrs = zimbraServiceEnabled,zimbraServiceInstalled
zmprov_tmp_directory = ${zimbra_tmp_directory}/zmprov

If set to false, reconfigure it to have the true flag. This will enable the setting.

zimbra@mbox1:~$ zmlocalconfig -e zimbra_zmprov_default_to_ldap=true

Then recheck the settings again:

$ zmlocalconfig |grep zmprov
zimbra_zmprov_default_soap_server = localhost
zimbra_zmprov_default_to_ldap = true
zmprov_safeguarded_attrs = zimbraServiceEnabled,zimbraServiceInstalled
zmprov_tmp_directory = ${zimbra_tmp_directory}/zmprov

Now try to execute any zmprov commands and see if it’s working fine.

$ zmprov gs `zmhostname` | grep zimbraServiceEnabled
zimbraServiceEnabled: amavis
zimbraServiceEnabled: antivirus
zimbraServiceEnabled: antispam
zimbraServiceEnabled: opendkim
zimbraServiceEnabled: stats
zimbraServiceEnabled: logger
zimbraServiceEnabled: service
zimbraServiceEnabled: zimbra
zimbraServiceEnabled: zimbraAdmin
zimbraServiceEnabled: zimlet
zimbraServiceEnabled: mailbox
zimbraServiceEnabled: spell
zimbraServiceEnabled: ldap
zimbraServiceEnabled: mta
zimbraServiceEnabled: snmp
zimbraServiceEnabled: dnscache

If this doesn’t solve your problem, try changing the zimbra_zmprov_default_soap_server to the IP address of your Mailbox server. Your setting will look like this.

See also  PFlogsumm - Daily Report Postfix Monitoring on CentOS 6

May be it’s helpful, please feel free to leave a comment if you have any questions and I’ll appreciate it. Or if there is another method fix, you can also add it in the comments, I will mention you and add a backlink to your website.


Let's Buy Me Coffee.

Buy Me a Coffee at ko-fi.com

https://saweria.co/habibzain
https://ko-fi.com/habibzain
habibzain Just husband, father and enthusiastic men about System Administration. Love to write short article about it. Perhaps can help and be useful for others.

Zimbra Relay Amazon SES

Zimbra is a widely used collaboration platform that provides robust email services. When it comes to improving email deliverability and ensuring the security of...
habibzain
1 min read

Install Zimbra 10 Ubuntu 20.04 from Scratch

Zimbra 10 may have had specific installation requirements, and there might be updates or changes beyond that point. Here is simple guide how to...
habibzain
4 min read

Zimbra Cannot start TLS: handshake failure

The Zimbra log show error message “Cannot start TLS handshake” typically indicates an issue with establishing a secure TLS (Transport Layer Security) connection. This...
habibzain
1 min read

Leave a Reply

Your email address will not be published. Required fields are marked *

Never miss good article from us, get weekly updates in your inbox