SMB Share access issue from Canon MF750C Series printer/scanner

rdeckard

Cadet
Joined
Jan 1, 2024
Messages
2
I bought a Canon multifunction color laser printer/scanner a few weeks ago, installed it in my home network (LAN) and am still testing it. In addition to printing, it is important for me to be able to scan to an SMB share on my TrueNAS Scale server. (I want to use paperless ngx later).
In the first few days I did a short scan test on an existing TrueNAS SMB share which was successful. I'm not 100% sure, but most likely my TrueNAS Scale was still on Bluefin at that time, as I only recently upgraded to Cobia (23.10.1).
Now I finally wanted to finalize this scan configuration (with a dedicated dataset/SMB share) and unfortunately I can't get any further.
I have already deleted the dataset completely and created a new one (ACL Type=SMB/NFSv4) with a local user (Full Control). For testing purposes, everyone also has Full Control permissions.
For the SMB share I have also left everything to default or as described in the TrueNAS documentation.

I have created an address book entry in the Canon printer with the settings of this share and the local TrueNAS user. (You can't enter much more there).
Unfortunately, this no longer works. The printer gives a generic error message after a certain timeout (sometimes authentication error, sometimes just a network error).
With every test scan, a 0-byte PDF file is created on the SMB share, so the printer seems to be able to create something on the share. But it cannot complete the job.
This still worked with my first tests (Bluefin?). I also tried it with other (existing) SMB shares on my TrueNAS Scale. Always the same problem.
If I scan to an SMB share on my old QNAP NAS, it works immediately and flawlessly. So it seems to be a problem with the TrueNAS (and apparently only with Cobia).

Unfortunately, I don't know exactly how to troubleshoot/debug the problem.
I have only found entries in /var/log/samba4/auth_audit.log and /var/log/samba4/log.smbd. Unfortunately without any errors or hints as to what is causing the problem.

Here is an example of the auth_audit.log:
Code:
"clientAccount": "gamma", "workstation": "CANONF0210F", "becameAccount": "gamma", "becameDomain": "TRUENAS", "becameSid": "S-1-5-21-1387644970-4183348159-4012807230-20070", "mappedAccount": "gamma", "mappedDomain": "", "netlogonComputer": null, "netlogonTrustAccount": null, "netlogonNegotiateFlags": "0x00000000", "netlogonSecureChannelType": 0, "netlogonTrustAccountSid": null, "passwordType": "NTLMv2", "duration": 104229}}


And here is something from log.smbd:
Code:
[2024/01/01 13:07:55.352400,  2] ../../source3/smbd/smb2_service.c:825(make_connection_snum)
  canonf0210f (ipv4:192.168.10.51:64320) signed connect to service paperless initially as user gamma (uid=3003, gid=3003) (pid 913713)
[2024/01/01 13:07:55.353994,  2] ../../source3/smbd/open.c:1713(open_file)
  gamma opened file 0034_240101130753_001.pdf read=No write=Yes (numopen=2)


The last line at least shows the file name (0-byte PDF). I cannot tell whether read=No is wrong, as it also says write=Yes.
Without a comparison to a successful scan, I also don't know whether there should also be a "file closed" entry next to the "file opened" entry.
 

rdeckard

Cadet
Joined
Jan 1, 2024
Messages
2
I did some more tests with a test installation (TrueNAS Scale on a Proxmox VM) and it seems, my issue is NOT directly related to Cobia.

I first created a standard Proxmox VM with TrueNAS Scale 22.12.4.2 ISO and configured a SMB share.
Scanning from my Canon printer/scanner to this SMB Share worked fine (what I expected). Here's the interesting part of the log:
Code:
[2024/01/02 16:02:17.025752,  2] ../../source3/smbd/smb2_service.c:851(make_connection_snum)
  canonf0210f (ipv4:192.168.10.51:54085) signed connect to service paperless initially as user gamma (uid=3000, gid=3000) (pid 9418)
[2024/01/02 16:02:17.028249,  2] ../../source3/smbd/open.c:1718(open_file)
  gamma opened file 0042_240102160215_001.pdf read=No write=Yes (numopen=2)
[2024/01/02 16:02:17.126696,  3] ../../source3/smbd/smb2_write.c:213(smb2_write_complete_internal)
  smb2: fnum 1065769314, file 0042_240102160215_001.pdf, length=65535 offset=0 wrote=65535
[2024/01/02 16:02:17.136008,  3] ../../source3/smbd/smb2_write.c:213(smb2_write_complete_internal)
  smb2: fnum 1065769314, file 0042_240102160215_001.pdf, length=65535 offset=65535 wrote=65535
[2024/01/02 16:02:17.143949,  3] ../../source3/smbd/smb2_write.c:213(smb2_write_complete_internal)
  smb2: fnum 1065769314, file 0042_240102160215_001.pdf, length=65535 offset=131070 wrote=65535
[2024/01/02 16:02:17.153054,  3] ../../source3/smbd/smb2_write.c:213(smb2_write_complete_internal)
  smb2: fnum 1065769314, file 0042_240102160215_001.pdf, length=61016 offset=196605 wrote=61016
[2024/01/02 16:02:17.156415,  3] ../../source3/smbd/smb2_write.c:213(smb2_write_complete_internal)
  smb2: fnum 1065769314, file 0042_240102160215_001.pdf, length=453 offset=257621 wrote=453
[2024/01/02 16:02:17.158294,  2] ../../source3/smbd/close.c:831(close_normal_file)
  gamma closed file 0042_240102160215_001.pdf (numopen=0) NT_STATUS_OK
[2024/01/02 16:02:17.159429,  2] ../../source3/smbd/smb2_service.c:944(close_cnum)
  canonf0210f (ipv4:192.168.10.51:54085) closed connection to service paperless
[2024/01/02 16:02:17.161656,  3] ../../source3/smbd/server_exit.c:229(exit_server_common)
  Server exit (NT_STATUS_END_OF_FILE)


(Here I see a "closed file" log entry, which I don't have in my productive/physical TN server.)

Then I updated this TrueNAS VM to 23.10.1, rebooted twice (no configuration changed from my site) and tried another scan.
And it worked like the test with Bluefin! (log looks identically)

Comparing these logs to my log from my previous message, it really seems, my physical TN server is not able to write to the scanned PDF file. (It is created, but there is no writing and no closing.)

Do I still have a permission issue on my TrueNAS server, even if I configured Full Control to everyone (for this dataset/share)?
 
Top