In need of Disaster...
 
Notifications
Clear all

In need of Disaster Recovery after upgrading Ubuntu 22 to 24

4 Posts
2 Users
0 Reactions
238 Views
(@betoceni)
New Member
Joined: 1 year ago
Posts: 8
Topic starter  

So here I am after some ideas on how to recover my server mailboxes from a broken carbonio server so that I can import them to a new carbonio server created on native ubuntu 24. Below are the reasons why I need it.

I have been using Zimbra since 2015. Migrated successfully to Carbonio using @anahuac's scripts.
My setup was based on ubuntu 22. Working like a charm until Dec 18 2025, when I decided to upgrade both the aplication and the OS (using do-release-upgrade) without consulting Carbonio's documentation first (just saw on the system requirements that Ubuntu 24 was on the supported OSes list...so I carried on).

Nothing was out of place...so I thought the updates were OK. Time passes...backups are being served to my VEEAM repositories...

One day I had to reboot the server...that is D-Day. Half the services were on a endless "activating" or "auto-restart" or auto-restart-queued start" state. Some change to "running" for a few seconds, only to be back to one of the three states beforementioned.

So I tried a lot of stuf...both on these forums and on the documentation regarding troubleshooting...tried to run "carbonio-bootstrap" to see the state of some things...

got:

Bootstrap mode: existing install
Adding /opt/zextras/conf/ca/ca.pem to cacerts...done.
Exception in thread "main" java.lang.RuntimeException: LDAP error: : An error occurred while attempting to connect to server localhost:389:  IOException(LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server localhost/127.0.0.1:389:  ConnectException(Connection refused), ldapSDKVersion=4.0.5, revision=27420'))
        at com.zimbra.cs.account.ldap.LdapProvisioning.create(LdapProvisioning.java:248)
        at com.zimbra.cs.account.Provisioning.getInstance(Provisioning.java:350)
        at com.zimbra.cs.account.Provisioning.getInstance(Provisioning.java:292)
        at com.zimbra.cs.account.ProvUtil.initProvisioning(ProvUtil.java:269)
        at com.zimbra.cs.account.ProvUtil.run(ProvUtil.java:912)
        at com.zimbra.cs.account.ProvUtil.main(ProvUtil.java:719)
Caused by: com.zimbra.cs.ldap.LdapException: LDAP error: : An error occurred while attempting to connect to server localhost:389:  IOException(LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server localhost/127.0.0.1:389:  ConnectException(Connection refused), ldapSDKVersion=4.0.5, revision=27420'))
ExceptionId:main:1769021879806:148271f078944d85
Code:ldap.LDAP_ERROR
        at com.zimbra.cs.ldap.LdapException.LDAP_ERROR(LdapException.java:79)
        at com.zimbra.cs.ldap.unboundid.UBIDLdapException.mapToLdapException(UBIDLdapException.java:63)
        at com.zimbra.cs.ldap.unboundid.UBIDLdapException.mapToLdapException(UBIDLdapException.java:29)
        at com.zimbra.cs.ldap.unboundid.LdapConnectionPool.createConnPool(LdapConnectionPool.java:99)
        at com.zimbra.cs.ldap.unboundid.LdapConnectionPool.createConnectionPool(LdapConnectionPool.java:46)
        at com.zimbra.cs.ldap.unboundid.UBIDLdapPoolConfig.createNewPool(UBIDLdapPoolConfig.java:55)
        at com.zimbra.cs.ldap.unboundid.UBIDLdapClient.createNew(UBIDLdapClient.java:41)
        at com.zimbra.cs.ldap.LdapClient.getInstanceIfLDAPavailable(LdapClient.java:31)
        at com.zimbra.cs.account.ldap.LdapProvisioning.<init>(LdapProvisioning.java:253)
        at com.zimbra.cs.account.ldap.LdapProvisioning.create(LdapProvisioning.java:246)
        ... 5 more
Caused by: LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to connect to server localhost:389:  IOException(LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server localhost/127.0.0.1:389:  ConnectException(Connection refused), ldapSDKVersion=4.0.5, revision=27420'))')
        at com.unboundid.ldap.sdk.LDAPConnection.connect(LDAPConnection.java:871)
        at com.unboundid.ldap.sdk.LDAPConnection.connect(LDAPConnection.java:761)
        at com.unboundid.ldap.sdk.LDAPConnection.connect(LDAPConnection.java:711)
        at com.unboundid.ldap.sdk.LDAPConnection.<init>(LDAPConnection.java:535)
        at com.unboundid.ldap.sdk.SingleServerSet.getConnection(SingleServerSet.java:308)
        at com.unboundid.ldap.sdk.LDAPConnectionPool.createConnection(LDAPConnectionPool.java:1288)
        at com.unboundid.ldap.sdk.LDAPConnectionPool.createConnection(LDAPConnectionPool.java:1261)
        at com.unboundid.ldap.sdk.LDAPConnectionPool.<init>(LDAPConnectionPool.java:1198)
        at com.unboundid.ldap.sdk.LDAPConnectionPool.<init>(LDAPConnectionPool.java:1053)
        at com.unboundid.ldap.sdk.LDAPConnectionPool.<init>(LDAPConnectionPool.java:977)
        at com.unboundid.ldap.sdk.LDAPConnectionPool.<init>(LDAPConnectionPool.java:907)
        at com.zimbra.cs.ldap.unboundid.LdapConnectionPool.createConnPool(LdapConnectionPool.java:96)
        ... 11 more
Caused by: java.io.IOException: LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server localhost/127.0.0.1:389:  ConnectException(Connection refused), ldapSDKVersion=4.0.5, revision=27420')
        at com.unboundid.ldap.sdk.LDAPConnectionInternals.<init>(LDAPConnectionInternals.java:179)
        at com.unboundid.ldap.sdk.LDAPConnection.connect(LDAPConnection.java:861)
        ... 22 more
Caused by: LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server localhost/127.0.0.1:389:  ConnectException(Connection refused), ldapSDKVersion=4.0.5, revision=27420')
        at com.unboundid.ldap.sdk.ConnectThread.getConnectedSocket(ConnectThread.java:250)
        at com.unboundid.ldap.sdk.LDAPConnectionInternals.<init>(LDAPConnectionInternals.java:162)
        ... 23 more
Caused by: java.net.ConnectException: Connection refused
        at java.base/sun.nio.ch.Net.pollConnect(Native Method)
        at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:682)
        at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542)
        at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:592)
        at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
        at java.base/java.net.Socket.connect(Socket.java:751)
        at com.unboundid.ldap.sdk.ConnectThread.run(ConnectThread.java:146)
Exception in thread "main" java.lang.RuntimeException: LDAP error: : An error occurred while attempting to connect to server localhost:389:  IOException(LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server localhost/127.0.0.1:389:  ConnectException(Connection refused), ldapSDKVersion=4.0.5, revision=27420'))
        at com.zimbra.cs.account.ldap.LdapProvisioning.create(LdapProvisioning.java:248)
        at com.zimbra.cs.account.Provisioning.getInstance(Provisioning.java:350)
        at com.zimbra.cs.account.Provisioning.getInstance(Provisioning.java:292)
        at com.zimbra.cs.account.ProvUtil.initProvisioning(ProvUtil.java:269)
        at com.zimbra.cs.account.ProvUtil.run(ProvUtil.java:912)
        at com.zimbra.cs.account.ProvUtil.main(ProvUtil.java:719)
Caused by: com.zimbra.cs.ldap.LdapException: LDAP error: : An error occurred while attempting to connect to server localhost:389:  IOException(LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server localhost/127.0.0.1:389:  ConnectException(Connection refused), ldapSDKVersion=4.0.5, revision=27420'))
ExceptionId:main:1769021884611:75d5cee772e2e9cf
Code:ldap.LDAP_ERROR
        at com.zimbra.cs.ldap.LdapException.LDAP_ERROR(LdapException.java:79)
        at com.zimbra.cs.ldap.unboundid.UBIDLdapException.mapToLdapException(UBIDLdapException.java:63)
        at com.zimbra.cs.ldap.unboundid.UBIDLdapException.mapToLdapException(UBIDLdapException.java:29)
        at com.zimbra.cs.ldap.unboundid.LdapConnectionPool.createConnPool(LdapConnectionPool.java:99)
        at com.zimbra.cs.ldap.unboundid.LdapConnectionPool.createConnectionPool(LdapConnectionPool.java:46)
        at com.zimbra.cs.ldap.unboundid.UBIDLdapPoolConfig.createNewPool(UBIDLdapPoolConfig.java:55)
        at com.zimbra.cs.ldap.unboundid.UBIDLdapClient.createNew(UBIDLdapClient.java:41)
        at com.zimbra.cs.ldap.LdapClient.getInstanceIfLDAPavailable(LdapClient.java:31)
        at com.zimbra.cs.account.ldap.LdapProvisioning.<init>(LdapProvisioning.java:253)
        at com.zimbra.cs.account.ldap.LdapProvisioning.create(LdapProvisioning.java:246)
        ... 5 more
Caused by: LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to connect to server localhost:389:  IOException(LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server localhost/127.0.0.1:389:  ConnectException(Connection refused), ldapSDKVersion=4.0.5, revision=27420'))')
        at com.unboundid.ldap.sdk.LDAPConnection.connect(LDAPConnection.java:871)
        at com.unboundid.ldap.sdk.LDAPConnection.connect(LDAPConnection.java:761)
        at com.unboundid.ldap.sdk.LDAPConnection.connect(LDAPConnection.java:711)
        at com.unboundid.ldap.sdk.LDAPConnection.<init>(LDAPConnection.java:535)
        at com.unboundid.ldap.sdk.SingleServerSet.getConnection(SingleServerSet.java:308)
        at com.unboundid.ldap.sdk.LDAPConnectionPool.createConnection(LDAPConnectionPool.java:1288)
        at com.unboundid.ldap.sdk.LDAPConnectionPool.createConnection(LDAPConnectionPool.java:1261)
        at com.unboundid.ldap.sdk.LDAPConnectionPool.<init>(LDAPConnectionPool.java:1198)
        at com.unboundid.ldap.sdk.LDAPConnectionPool.<init>(LDAPConnectionPool.java:1053)
        at com.unboundid.ldap.sdk.LDAPConnectionPool.<init>(LDAPConnectionPool.java:977)
        at com.unboundid.ldap.sdk.LDAPConnectionPool.<init>(LDAPConnectionPool.java:907)
        at com.zimbra.cs.ldap.unboundid.LdapConnectionPool.createConnPool(LdapConnectionPool.java:96)
        ... 11 more
Caused by: java.io.IOException: LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server localhost/127.0.0.1:389:  ConnectException(Connection refused), ldapSDKVersion=4.0.5, revision=27420')
        at com.unboundid.ldap.sdk.LDAPConnectionInternals.<init>(LDAPConnectionInternals.java:179)
        at com.unboundid.ldap.sdk.LDAPConnection.connect(LDAPConnection.java:861)
        ... 22 more
Caused by: LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server localhost/127.0.0.1:389:  ConnectException(Connection refused), ldapSDKVersion=4.0.5, revision=27420')
        at com.unboundid.ldap.sdk.ConnectThread.getConnectedSocket(ConnectThread.java:250)
        at com.unboundid.ldap.sdk.LDAPConnectionInternals.<init>(LDAPConnectionInternals.java:162)
        ... 23 more
Caused by: java.net.ConnectException: Connection refused
        at java.base/sun.nio.ch.Net.pollConnect(Native Method)
        at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:682)
        at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542)
        at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:592)
        at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
        at java.base/java.net.Socket.connect(Socket.java:751)
        at com.unboundid.ldap.sdk.ConnectThread.run(ConnectThread.java:146)
Setting defaults...done.
Setting defaults from existing config...done.
Checking for port conflicts
Port conflict detected: 7306 (carbonio-appserver)
Port conflict detected: 993 (carbonio-appserver)
Port conflict detected: 995 (carbonio-appserver)
Port conflict detected: 143 (carbonio-appserver)
Port conflict detected: 25 (carbonio-mta)
Port conflict detected: 110 (carbonio-appserver)
Port conflict detected: 80 (carbonio-appserver)
Port conflict detected: 443 (carbonio-appserver)
Port conflict detected: 10024 (carbonio-mta)
Port conflict detected: 10026 (carbonio-mta)
Port conflict detected: 25 (carbonio-mta)
Port conflicts detected! - Press Enter/Return key to continue

Main menu

   1) Common Configuration:
   2) carbonio-antivirus:                      Enabled
   3) carbonio-directory-server:               Enabled
   4) carbonio-mta:                            Enabled
   5) carbonio-appserver:                      Enabled
   6) carbonio-proxy:                          Enabled
   s) Save config to file
   x) Expand menu
   q) Quit

*** CONFIGURATION COMPLETE - press 'y' to apply configuration
Select from menu, or press 'y' to apply config (? - help) y
Saving config in /opt/zextras/config.330386...done.
Operations logged to /tmp/zmsetup.20260121-145746.log
Setting replication password...done.
Setting Postfix password...done.
Setting amavis password...done.
Setting nginx password...done.
Setting Keyboard Shortcut Preferences...failed.
Updating LDAP Schema version to '1763368281'...failed.
Disabling strict server name enforcement on localhost...done.
Setting Public Service Hostname correio.gei.sesdec.ro.gov.br...done.
Setting services on localhost...done.
Adding localhost to MailHostPool in default COS...failed. Couldn't find a server entry for localhost
Setting up syslog.conf...done.
Starting servers...
        stopping carbonio-directory-server.target...Done.
        stopping carbonio-appserver.target...Done.
        stopping carbonio-proxy.target...Done.
        stopping carbonio-mta.target...Done.
        starting carbonio-directory-server.target...Done.
        starting carbonio-appserver.target...Done.
        starting carbonio-proxy.target...Done.
        starting carbonio-mta.target...Done.
done.
Skipping creation of default domain GAL sync account - existing install detected.
Setting up zextras crontab...done.

^C

Moving /tmp/zmsetup.20260121-145746.log to /opt/zextras/log


Configuration complete - press return to exit

So...it appears that the LDAP is the culprit.

Tried executing pending-setups, got:

Executing all setup scripts...

--------------------------------------------------------------------------------
Executing /etc/zextras/pending-setups.d/111-carbonio-docs-connector-db-setup.sh
Insert the cluster credential password:
Error determining policy ID: Failed to find policy with name carbonio-docs-connector-db-policy: Get "http://127.0.0.1:8500/v1/acl/policy/name/carbonio-docs-connector-db-policy": dial tcp 127.0.0.1:8500: connect: connection refused
Setup failed: Cannot update policy for carbonio-docs-connector-db-policy
Setup script failed, keeping it

Found nothing relevant on openldap or slapd's logs thou.

When I run systemctl stop carbonio* followed by systemctl restart carbonio-directory-server.target / systemctl restart carbonio-appserver.target /systemctl restart carbonio-mta.target / systemctl restart carbonio-proxy.target

my processes look like this:

# systemctl --type=service | grep carbonio*
carbonio-altermime-config.service loaded activating start start Carbonio AlterMIME Config
carbonio-antivirus.service loaded active running Carbonio Anti-virus Daemon
carbonio-appserver-db.service loaded active running Carbonio Appserver DB Daemon
carbonio-appserver.service loaded activating start-pre start Carbonio Appserver Daemon
carbonio-configd.service loaded activating start-pre start Carbonio Config Daemon
carbonio-freshclam.service loaded active running Carbonio Freshclam Daemon
carbonio-mailthreat.service loaded active running Carbonio Mail Threat Daemon
carbonio-memcached.service loaded active running Carbonio Memcached Daemon
carbonio-milter.service loaded active running Carbonio Milter Daemon
carbonio-nginx.service loaded active running Carbonio Web and Reverse Proxy Server
carbonio-opendkim.service loaded activating auto-restart-queued start Carbonio OpenDKIM Daemon
carbonio-openldap.service loaded active running Carbonio OpenLDAP Daemon
carbonio-postfix.service loaded active running Carbonio Postfix Daemon
carbonio-saslauthd.service loaded active running Carbonio SASL Auth Daemon
carbonio-stats.service loaded active running Carbonio Stats Daemon
● carbonio-videoserver.service loaded failed failed Zextras Videoserver

Which allowed me to export accounts, passwords using some scripts...but not MailBoxes, also can't access any WEBUI or admin WEBUI (I see a page that says: Something went wrong. We are sorry but there was an error trying to load this page)

Never used carbonio's own backup solution because I trusted my VEEAM backups...fact is using any of them didn't help beucase restoring a VM requires me to reboot it, and rebooting it was when the issues started. (got no backup of before upgrading aplication and OS)

Any ideas are apreciated, even troubleshooting related.


   
Quote
(@sharif)
Honorable Member Admin
Joined: 4 years ago
Posts: 924
 

@betoceni

Carbonio CE does not have any backup system. In your situation, it seems it would be better to try to migrate the data to a new server.


   
ReplyQuote
(@betoceni)
New Member
Joined: 1 year ago
Posts: 8
Topic starter  

@sharif precisely what I want to do...the only question is, how to do that when the services on the defected server won't start? (ldap for example).

moving the store folder does any good?


   
ReplyQuote
(@sharif)
Honorable Member Admin
Joined: 4 years ago
Posts: 924
 

@betoceni 

Try this:

Imapsync Email Migration

Though there concerns like:

  • at this condition, imap services/ports are listening or not
  • Is LDAP authenticating or not

something like these. 


   
ReplyQuote