Network Modules NG - Restore error (JSONException: JSONObject[config] is not a JSONArray)...

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
User avatar
DavidMerrill
Advanced member
Advanced member
Posts: 126
Joined: Thu Jul 30, 2015 2:44 pm
Location: Portland, ME
ZCS/ZD Version: 8.8.15 P19
Contact:

Network Modules NG - Restore error (JSONException: JSONObject[config] is not a JSONArray)...

Post by DavidMerrill »

I've run into an odd error doing mailbox restores from one server to another (we have a client who's moving from a dedicated Zimbra server to one that's hosting several domains).

I took a fresh backup from the source server, rsync'ed it to the target server and ran a restore at the command line. The restore failed and I received the following notification (see below):

Code: Select all

This is an automated notification from ZxBackup about External Restore.

Operation External Restore failed.

Operation Id: 4e596864-d105-4f57-9e90-3630128c8602
Operation Host: ***** REDACTED *****

Operation requested by: ***** REDACTED *****

Network Modules NG Version: 3.1.9
commit: 2bec46eb187a8322851c06544398a95b76546cfd

Zal Version: 2.22.0
Zal commit: 3814144c2ef1f5893b898f41a4cf4e035de3265e
Zimbra version: 8.8.15_GA_4018 20210324061606 20210324-0653 NETWORK

- exception -
com.zextras.lib.Error.RestoringServerLayoutError: Exception when restoring server layout
        at com.zextras.modules.backup.ZEBackupServer.restorePostAccount (ZEBackupServer.java:571)
        at com.zextras.modules.backup.operations.ZEExternalRestoreOperation.doOperation (ZEExternalRestoreOperation.java:956)
        at com.zextras.lib.operations.ZEOperation.exec (ZEOperation.java:827)
        at com.zextras.lib.operations.LegacyOperationProxy.exec (LegacyOperationProxy.java:84)
        at com.zextras.lib.operations.ModifiableStatefulOperation.exec (ModifiableStatefulOperation.java:123)
        at com.zextras.lib.operations.OperationStarterActivity.run (OperationStarterActivity.java:46)
        at com.zextras.lib.activities.ActivityThread.run (ActivityThread.java:144)
Caused by: com.zextras.lib.json.JSONException: JSONObject[config] is not a JSONArray.
        at com.zextras.lib.json.JSONObject.getJSONArray (JSONObject.java:317)
        at com.zextras.utils.JsonUtils.makeAttrMap (JsonUtils.java:192)
        at com.zextras.modules.backup.ZEBackupServer.restorePostAccount (ZEBackupServer.java:264)
        at com.zextras.modules.backup.operations.ZEExternalRestoreOperation.doOperation (ZEExternalRestoreOperation.java:956)
        at com.zextras.lib.operations.ZEOperation.exec (ZEOperation.java:827)
        at com.zextras.lib.operations.LegacyOperationProxy.exec (LegacyOperationProxy.java:84)
        at com.zextras.lib.operations.ModifiableStatefulOperation.exec (ModifiableStatefulOperation.java:123)
        at com.zextras.lib.operations.OperationStarterActivity.run (OperationStarterActivity.java:46)
        at com.zextras.lib.activities.ActivityThread.run (ActivityThread.java:144)

Last progress info:
 --
 Operation log path:                           /opt/zimbra/log/op_ExternalRestore_4e596864-d105-4f57-9e90-3630128c8602.log
 Warnings/Errors:                              15/0
 Restored Accounts(only attributes):           15/15
 Restored Accounts(common items):              0/15
 Restored Accounts(only shared & datasources): 0/15
 Current Account:                              ***** REDACTED *****
 Restored/Skipped Zimbra Items:                0/0
 Unrestored Zimbra Items:                      0
 Restored/Skipped Drive Items:                 0/0
 Unrestored Drive Items:                       0
 
The exception com.zextras.lib.Error.RestoringServerLayoutError: Exception when restoring server layout caused by com.zextras.lib.json.JSONException: JSONObject[config] is not a JSONArray. is new to me. I've searched a bit and haven't yet found a lead to chase.

In the operation log I see entries like this:

Code: Select all

2021-07-25 09:12:48,363 INFO Restoring account attribute of foo@abc.com
2021-07-25 09:12:48,363 WARN Cannot find COS for account foo@abc.com: falling back to original default
2021-07-25 09:12:48,363 WARN Unrestorable attribute zimbraCreateTimestamp, removed.
2021-07-25 09:12:48,363 WARN Unrestorable attribute zimbraId, removed.
2021-07-25 09:12:48,370 INFO Skipping restore of aliases as required.
2021-07-25 09:12:48,370 INFO Skipping identity: b421df0e-abdd-4dcf-865e-e5c27f0fdd55
2021-07-25 09:12:48,380 INFO Restoring account foo@abc.com credentials...
2021-07-25 09:12:48,380 INFO No credentials to restore for account foo@abc.com
2021-07-25 09:12:48,380 INFO Account foo@abc.com restored
The "Unrestorable attribute" warnings give me pause, and even though log claims the account is restored, there's no data in the mailbox.

Has anyone run into something like this?
___________________________________
David Merrill - Zimbra Practice Lead
OTELCO Zimbra Hosting, Licensing and Professional Services
Zeta Alliance
Klug
Ambassador
Ambassador
Posts: 2746
Joined: Mon Dec 16, 2013 11:35 am
Location: France - Drôme
ZCS/ZD Version: All of them
Contact:

Re: Network Modules NG - Restore error (JSONException: JSONObject[config] is not a JSONArray)...

Post by Klug »

Unrestorable attribue is "ok", I had the same error (for the same variable) when doing a disaster restore (ExternalRestore): the creation date stamp becomes the restore date stamp, the initial one is not recovered.

Which command did you use to restore?
emiliano7437
Posts: 4
Joined: Fri Apr 06, 2018 3:24 pm

Re: Network Modules NG - Restore error (JSONException: JSONObject[config] is not a JSONArray)...

Post by emiliano7437 »

Hi Team. Im having the same issue when trying to migrate from 8.8.15 NE (server RHEL 6) to 9.0 NE (server CENTOS 7.x).

Any idea how to solve this error? Thanks!

- exception -
com.zextras.lib.Error.RestoringServerLayoutError: Exception when restoring server layout
at com.zextras.modules.backup.ZEBackupServer.restorePostAccount (ZEBackupServer.java:498)
at com.zextras.modules.backup.operations.ZEExternalRestoreOperation.doOperation (ZEExternalRestoreOperation.java:943)
at com.zextras.lib.operations.ZEOperation.exec (ZEOperation.java:809)
at com.zextras.lib.operations.LegacyOperationProxy.exec (LegacyOperationProxy.java:84)
at com.zextras.lib.operations.ModifiableStatefulOperation.exec (ModifiableStatefulOperation.java:123)
at com.zextras.lib.operations.OperationStarterActivity.run (OperationStarterActivity.java:46)
at com.zextras.lib.activities.ActivityThread.run (ActivityThread.java:144)
Caused by: com.zextras.lib.json.JSONException: JSONObject[config] is not a JSONArray.
at com.zextras.lib.json.JSONObject.getJSONArray (JSONObject.java:317)
at com.zextras.utils.JsonUtils.makeAttrMap (JsonUtils.java:192)
at com.zextras.modules.backup.ZEBackupServer.restorePostAccount (ZEBackupServer.java:253)
at com.zextras.modules.backup.operations.ZEExternalRestoreOperation.doOperation (ZEExternalRestoreOperation.java:943)
at com.zextras.lib.operations.ZEOperation.exec (ZEOperation.java:809)
at com.zextras.lib.operations.LegacyOperationProxy.exec (LegacyOperationProxy.java:84)
at com.zextras.lib.operations.ModifiableStatefulOperation.exec (ModifiableStatefulOperation.java:123)
at com.zextras.lib.operations.OperationStarterActivity.run (OperationStarterActivity.java:46)
at com.zextras.lib.activities.ActivityThread.run (ActivityThread.java:144)
Post Reply