Truenas smb problem

Hi everyone. This is my first post. Thank you for the great videos that inspire you to experiment and expand your knowledge.

I have a problem with SMB in Truenas.

When I connect a samba resource under Windows and it is not used for about 2 hours, the resource disconnects. The Windows Explorer window closes by itself. I checked communication in WireShark.
I have similar logs with Samba resources in Debian, but this problem does not occur. This happens on all computers but not at the same time. Or maybe someone has encountered such a problem?

xx.xx.xx.xx is windows

462 2021-05-26 08:43:24,420005 xx.xx.xx.xx yy.yy.yy.yy TCP 1514 1100 β†’ 445 [ACK] Seq=8936 Ack=30138 Win=1024 Len=1460 [TCP segment of a reassembled PDU]
463 2021-05-26 08:43:24,420005 xx.xx.xx.xx yy.yy.yy.yy SMB2 427 Session Setup Request
464 2021-05-26 08:43:24,420349 yy.yy.yy.yy xx.xx.xx.xx TCP 60 445 β†’ 1100 [ACK] Seq=30138 Ack=10769 Win=999 Len=0
465 2021-05-26 08:43:24,430612 yy.yy.yy.yy xx.xx.xx.xx SMB2 292 Session Setup Response
466 2021-05-26 08:43:24,430961 xx.xx.xx.xx yy.yy.yy.yy SMB2 160 Tree Connect Request Tree: \ds-wenus\IPC$
467 2021-05-26 08:43:24,431996 yy.yy.yy.yy xx.xx.xx.xx SMB2 138 Tree Connect Response
468 2021-05-26 08:43:24,432369 xx.xx.xx.xx yy.yy.yy.yy SMB2 220 Ioctl Request FSCTL_DFS_GET_REFERRALS, File: \ds-wenus\developer
469 2021-05-26 08:43:24,433061 yy.yy.yy.yy xx.xx.xx.xx SMB2 131 Ioctl Response, Error: STATUS_NOT_FOUND
470 2021-05-26 08:43:24,434293 xx.xx.xx.xx yy.yy.yy.yy SMB2 170 Tree Connect Request Tree: \ds-wenus\developer
471 2021-05-26 08:43:24,435468 yy.yy.yy.yy xx.xx.xx.xx SMB2 138 Tree Connect Response
472 2021-05-26 08:43:24,436527 xx.xx.xx.xx yy.yy.yy.yy SMB2 160 Tree Connect Request Tree: \ds-wenus\IPC$
473 2021-05-26 08:43:24,437387 yy.yy.yy.yy xx.xx.xx.xx SMB2 138 Tree Connect Response
474 2021-05-26 08:43:24,437632 xx.xx.xx.xx yy.yy.yy.yy SMB2 220 Ioctl Request FSCTL_DFS_GET_REFERRALS, File: \ds-wenus\developer
475 2021-05-26 08:43:24,438050 yy.yy.yy.yy xx.xx.xx.xx SMB2 131 Ioctl Response, Error: STATUS_NOT_FOUND
476 2021-05-26 08:43:24,479987 xx.xx.xx.xx yy.yy.yy.yy TCP 54 1100 β†’ 445 [ACK] Seq=11429 Ack=30782 Win=1022 Len=0
477 2021-05-26 08:43:24,736857 xx.xx.xx.xx yy.yy.yy.yy SMB2 234 Create Request File:
478 2021-05-26 08:43:24,737984 yy.yy.yy.yy xx.xx.xx.xx SMB2 298 Create Response File:
479 2021-05-26 08:43:24,738375 xx.xx.xx.xx yy.yy.yy.yy SMB2 275 GetInfo Request FS_INFO/FileFsVolumeInformation File: ;GetInfo Request FS_INFO/FileFsAttributeInformation File:
480 2021-05-26 08:43:24,738866 yy.yy.yy.yy xx.xx.xx.xx SMB2 266 GetInfo Response;GetInfo Response
481 2021-05-26 08:43:24,738967 xx.xx.xx.xx yy.yy.yy.yy SMB2 162 GetInfo Request FILE_INFO/SMB2_FILE_EA_INFO File:
482 2021-05-26 08:43:24,739465 yy.yy.yy.yy xx.xx.xx.xx SMB2 134 GetInfo Response
483 2021-05-26 08:43:24,746639 xx.xx.xx.xx yy.yy.yy.yy SMB2 382 Create Request File: Desktop.ini
484 2021-05-26 08:43:24,747250 yy.yy.yy.yy xx.xx.xx.xx SMB2 131 Create Response, Error: STATUS_OBJECT_NAME_NOT_FOUND
485 2021-05-26 08:43:24,747722 xx.xx.xx.xx yy.yy.yy.yy SMB2 250 Create Request File: AutoRun.inf
486 2021-05-26 08:43:24,748261 yy.yy.yy.yy xx.xx.xx.xx SMB2 131 Create Response, Error: STATUS_OBJECT_NAME_NOT_FOUND
487 2021-05-26 08:43:24,798143 xx.xx.xx.xx yy.yy.yy.yy TCP 54 1100 β†’ 445 [ACK] Seq=12462 Ack=31472 Win=1025 Len=0
488 2021-05-26 08:43:25,070122 xx.xx.xx.xx yy.yy.yy.yy SMB2 162 GetInfo Request FILE_INFO/SMB2_FILE_EA_INFO File:
489 2021-05-26 08:43:25,070576 yy.yy.yy.yy xx.xx.xx.xx SMB2 134 GetInfo Response
490 2021-05-26 08:43:25,114284 xx.xx.xx.xx yy.yy.yy.yy TCP 54 1100 β†’ 445 [ACK] Seq=12570 Ack=31552 Win=8212 Len=0
491 2021-05-26 08:43:37,885060 xx.xx.xx.xx yy.yy.yy.yy SMB2 126 Tree Disconnect Request
492 2021-05-26 08:43:37,885087 xx.xx.xx.xx yy.yy.yy.yy SMB2 126 Tree Disconnect Request
493 2021-05-26 08:43:37,885669 yy.yy.yy.yy xx.xx.xx.xx TCP 60 445 β†’ 1100 [ACK] Seq=31552 Ack=12714 Win=1025 Len=0
494 2021-05-26 08:43:37,885961 yy.yy.yy.yy xx.xx.xx.xx SMB2 126 Tree Disconnect Response
495 2021-05-26 08:43:37,886183 yy.yy.yy.yy xx.xx.xx.xx SMB2 126 Tree Disconnect Response
496 2021-05-26 08:43:37,886219 xx.xx.xx.xx yy.yy.yy.yy TCP 54 1100 β†’ 445 [ACK] Seq=12714 Ack=31696 Win=8211 Len=0

1 Like

Thanks for posting here, but that is not a problem I have had before. Have you checked the logs in the TrueNAS system to see if the service is restarting?

1 Like

The service does not restart, other people can work on the resource at that time.
If he indicates a given resource again, it will also open for me without any problems.
I found nothing interesting in the logs. He will review the logs again.

I was able to solve a problem that was not on TrueNas’ side, but on Group Policy. In the disk mapping policy, I had Action set to Replace. Which caused the disk to be dismounted and mounted periodically.

2 Likes