smb.synchronize_group_mappings FAILED error after updating from RELEASE to either .03 or .04

NOTORIOUS VR

Cadet
Joined
Mar 16, 2022
Messages
7
Not sure what the issue is - can be fixed by booting back to the RELEASE environment, but no matter what I do if I update this failure appears.

truenas-fail.jpg
 

NOTORIOUS VR

Cadet
Joined
Mar 16, 2022
Messages
7
So not sure why @anodos just stopped replying to this.... I've done everything I can think of here and TN only works correctly with AD on RELEASE..

Even updating to Sailfish RC1 I have the same issue. I've left the Domain and reconnected... all works as expected until I restart TN then I get the smb.synchronize_group_mappings FAILED error which is following the exact same issue as in this thread: https://www.truenas.com/community/threads/smb-syncronize_group_mappings-fails-in-v21-08.95254/

from that thread running the command:
Code:
midclt call core.get_jobs '[["method", "=", "smb.synchronize_group_mappings"]]' | jq


gives me this result:
Code:
[
  {
    "id": 51,
    "method": "smb.synchronize_group_mappings",
    "arguments": [],
    "description": null,
    "abortable": false,
    "logs_path": null,
    "logs_excerpt": null,
    "progress": {
      "percent": 0,
      "description": "",
      "extra": null
    },
    "result": null,
    "error": "(6, 'WBC_ERR_WINBIND_NOT_AVAILABLE: wbcInterfaceDetails failed', '../../nsswitch/py_wbclient.c:1680')",
    "exception": "Traceback (most recent call last):\n  File \"/usr/lib/python3/dist-packages/middlewared/job.py\", line 426, in run\n    await self.future\n  File \"/usr/lib/python3/dist-packages/middlewared/job.py\", line 461, in __run_body\n    rv = await self.method(*([self] + args))\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/smb_/groupmap.py\", line 492, in synchronize_group_mappings\n    await self.sync_foreign_groups()\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/smb_/groupmap.py\", line 133, in sync_foreign_groups\n    domain_info = await self.middleware.call('idmap.domain_info',\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1306, in call\n    return await self._call(\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1266, in _call\n    return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1169, in run_in_executor\n    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))\n  File \"/usr/lib/python3.9/concurrent/futures/thread.py\", line 52, in run\n    result = self.fn(*self.args, **self.kwargs)\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/idmap.py\", line 343, in domain_info\n    return WBClient().domain_info()\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/idmap_/utils.py\", line 53, in __init__\n    self.ctx = wbclient.Ctx()\nwbclient.WBCError: (6, 'WBC_ERR_WINBIND_NOT_AVAILABLE: wbcInterfaceDetails failed', '../../nsswitch/py_wbclient.c:1680')\n",
    "exc_info": {
      "repr": "WBCError(6, 'WBC_ERR_WINBIND_NOT_AVAILABLE: wbcInterfaceDetails failed', '../../nsswitch/py_wbclient.c:1680')",
      "type": "WBCError",
      "extra": null
    },
    "state": "FAILED",
    "time_started": {
      "$date": 1669328259100
    },
    "time_finished": {
      "$date": 1669328261272
    }
  }
]


wbinfo -u and -g return valid info for users and groups so obviously they're sync'd

running the following commands from the above linked thread seems to work just fine further make me not understand why this is an issue with every reboot of TN.

Code:
rm /var/db/system/samba4/group_mapping.tdb
midclt call smb.synchronize_group_mappings -job


result of the midclt call above with or without rm the .tdb file first:
Code:
root@gotham[~]# midclt call smb.synchronize_group_mappings -job
Status: (none)
Total Progress: [########################################] 100.00%Total Progress: [########################################] 100.00%
null


and running this again:
Code:
midclt call core.get_jobs '[["method", "=", "smb.synchronize_group_mappings"]]' | jq


I see this:
Code:
[
  {
    "id": 51,
    "method": "smb.synchronize_group_mappings",
    "arguments": [],
    "description": null,
    "abortable": false,
    "logs_path": null,
    "logs_excerpt": null,
    "progress": {
      "percent": 0,
      "description": "",
      "extra": null
    },
    "result": null,
    "error": "(6, 'WBC_ERR_WINBIND_NOT_AVAILABLE: wbcInterfaceDetails failed', '../../nsswitch/py_wbclient.c:1680')",
    "exception": "Traceback (most recent call last):\n  File \"/usr/lib/python3/dist-packages/middlewared/job.py\", line 426, in run\n    await self.future\n  File \"/usr/lib/python3/dist-packages/middlewared/job.py\", line 461, in __run_body\n    rv = await self.method(*([self] + args))\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/smb_/groupmap.py\", line 492, in synchronize_group_mappings\n    await self.sync_foreign_groups()\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/smb_/groupmap.py\", line 133, in sync_foreign_groups\n    domain_info = await self.middleware.call('idmap.domain_info',\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1306, in call\n    return await self._call(\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1266, in _call\n    return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1169, in run_in_executor\n    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))\n  File \"/usr/lib/python3.9/concurrent/futures/thread.py\", line 52, in run\n    result = self.fn(*self.args, **self.kwargs)\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/idmap.py\", line 343, in domain_info\n    return WBClient().domain_info()\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/idmap_/utils.py\", line 53, in __init__\n    self.ctx = wbclient.Ctx()\nwbclient.WBCError: (6, 'WBC_ERR_WINBIND_NOT_AVAILABLE: wbcInterfaceDetails failed', '../../nsswitch/py_wbclient.c:1680')\n",
    "exc_info": {
      "repr": "WBCError(6, 'WBC_ERR_WINBIND_NOT_AVAILABLE: wbcInterfaceDetails failed', '../../nsswitch/py_wbclient.c:1680')",
      "type": "WBCError",
      "extra": null
    },
    "state": "FAILED",
    "time_started": {
      "$date": 1669328259100
    },
    "time_finished": {
      "$date": 1669328261272
    }
  },
  {
    "id": 96,
    "method": "smb.synchronize_group_mappings",
    "arguments": [],
    "description": null,
    "abortable": false,
    "logs_path": null,
    "logs_excerpt": null,
    "progress": {
      "percent": 100,
      "description": "",
      "extra": null
    },
    "result": null,
    "error": null,
    "exception": null,
    "exc_info": null,
    "state": "SUCCESS",
    "time_started": {
      "$date": 1669328743496
    },
    "time_finished": {
      "$date": 1669328745992
    }
  }
]


so as far as I can tell, the group mappings work fine, the AD connection is fine. Yet I consistently get the failure at reboot and I don't know how to fix it unless I stay with the outdated RELEASE version.

Can anyone help?
 

jackc00

Cadet
Joined
Jan 1, 2023
Messages
4
So not sure why @anodos just stopped replying to this.... I've done everything I can think of here and TN only works correctly with AD on RELEASE..

Even updating to Sailfish RC1 I have the same issue. I've left the Domain and reconnected... all works as expected until I restart TN then I get the smb.synchronize_group_mappings FAILED error which is following the exact same issue as in this thread: https://www.truenas.com/community/threads/smb-syncronize_group_mappings-fails-in-v21-08.95254/

from that thread running the command:
Code:
midclt call core.get_jobs '[["method", "=", "smb.synchronize_group_mappings"]]' | jq


gives me this result:
Code:
[
  {
    "id": 51,
    "method": "smb.synchronize_group_mappings",
    "arguments": [],
    "description": null,
    "abortable": false,
    "logs_path": null,
    "logs_excerpt": null,
    "progress": {
      "percent": 0,
      "description": "",
      "extra": null
    },
    "result": null,
    "error": "(6, 'WBC_ERR_WINBIND_NOT_AVAILABLE: wbcInterfaceDetails failed', '../../nsswitch/py_wbclient.c:1680')",
    "exception": "Traceback (most recent call last):\n  File \"/usr/lib/python3/dist-packages/middlewared/job.py\", line 426, in run\n    await self.future\n  File \"/usr/lib/python3/dist-packages/middlewared/job.py\", line 461, in __run_body\n    rv = await self.method(*([self] + args))\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/smb_/groupmap.py\", line 492, in synchronize_group_mappings\n    await self.sync_foreign_groups()\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/smb_/groupmap.py\", line 133, in sync_foreign_groups\n    domain_info = await self.middleware.call('idmap.domain_info',\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1306, in call\n    return await self._call(\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1266, in _call\n    return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1169, in run_in_executor\n    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))\n  File \"/usr/lib/python3.9/concurrent/futures/thread.py\", line 52, in run\n    result = self.fn(*self.args, **self.kwargs)\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/idmap.py\", line 343, in domain_info\n    return WBClient().domain_info()\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/idmap_/utils.py\", line 53, in __init__\n    self.ctx = wbclient.Ctx()\nwbclient.WBCError: (6, 'WBC_ERR_WINBIND_NOT_AVAILABLE: wbcInterfaceDetails failed', '../../nsswitch/py_wbclient.c:1680')\n",
    "exc_info": {
      "repr": "WBCError(6, 'WBC_ERR_WINBIND_NOT_AVAILABLE: wbcInterfaceDetails failed', '../../nsswitch/py_wbclient.c:1680')",
      "type": "WBCError",
      "extra": null
    },
    "state": "FAILED",
    "time_started": {
      "$date": 1669328259100
    },
    "time_finished": {
      "$date": 1669328261272
    }
  }
]


wbinfo -u and -g return valid info for users and groups so obviously they're sync'd

running the following commands from the above linked thread seems to work just fine further make me not understand why this is an issue with every reboot of TN.

Code:
rm /var/db/system/samba4/group_mapping.tdb
midclt call smb.synchronize_group_mappings -job


result of the midclt call above with or without rm the .tdb file first:
Code:
root@gotham[~]# midclt call smb.synchronize_group_mappings -job
Status: (none)
Total Progress: [########################################] 100.00%Total Progress: [########################################] 100.00%
null


and running this again:
Code:
midclt call core.get_jobs '[["method", "=", "smb.synchronize_group_mappings"]]' | jq


I see this:
Code:
[
  {
    "id": 51,
    "method": "smb.synchronize_group_mappings",
    "arguments": [],
    "description": null,
    "abortable": false,
    "logs_path": null,
    "logs_excerpt": null,
    "progress": {
      "percent": 0,
      "description": "",
      "extra": null
    },
    "result": null,
    "error": "(6, 'WBC_ERR_WINBIND_NOT_AVAILABLE: wbcInterfaceDetails failed', '../../nsswitch/py_wbclient.c:1680')",
    "exception": "Traceback (most recent call last):\n  File \"/usr/lib/python3/dist-packages/middlewared/job.py\", line 426, in run\n    await self.future\n  File \"/usr/lib/python3/dist-packages/middlewared/job.py\", line 461, in __run_body\n    rv = await self.method(*([self] + args))\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/smb_/groupmap.py\", line 492, in synchronize_group_mappings\n    await self.sync_foreign_groups()\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/smb_/groupmap.py\", line 133, in sync_foreign_groups\n    domain_info = await self.middleware.call('idmap.domain_info',\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1306, in call\n    return await self._call(\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1266, in _call\n    return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1169, in run_in_executor\n    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))\n  File \"/usr/lib/python3.9/concurrent/futures/thread.py\", line 52, in run\n    result = self.fn(*self.args, **self.kwargs)\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/idmap.py\", line 343, in domain_info\n    return WBClient().domain_info()\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/idmap_/utils.py\", line 53, in __init__\n    self.ctx = wbclient.Ctx()\nwbclient.WBCError: (6, 'WBC_ERR_WINBIND_NOT_AVAILABLE: wbcInterfaceDetails failed', '../../nsswitch/py_wbclient.c:1680')\n",
    "exc_info": {
      "repr": "WBCError(6, 'WBC_ERR_WINBIND_NOT_AVAILABLE: wbcInterfaceDetails failed', '../../nsswitch/py_wbclient.c:1680')",
      "type": "WBCError",
      "extra": null
    },
    "state": "FAILED",
    "time_started": {
      "$date": 1669328259100
    },
    "time_finished": {
      "$date": 1669328261272
    }
  },
  {
    "id": 96,
    "method": "smb.synchronize_group_mappings",
    "arguments": [],
    "description": null,
    "abortable": false,
    "logs_path": null,
    "logs_excerpt": null,
    "progress": {
      "percent": 100,
      "description": "",
      "extra": null
    },
    "result": null,
    "error": null,
    "exception": null,
    "exc_info": null,
    "state": "SUCCESS",
    "time_started": {
      "$date": 1669328743496
    },
    "time_finished": {
      "$date": 1669328745992
    }
  }
]


so as far as I can tell, the group mappings work fine, the AD connection is fine. Yet I consistently get the failure at reboot and I don't know how to fix it unless I stay with the outdated RELEASE version.

Can anyone help?
I am having the same issue. Warning message comes up after reboot and yet AD and mapped drives are all working fine.
 
Top