Error Code 123

Advertisement

bilkins
Joined:
Posts:
1

Error Code 123

Hi there!

I have been receiving the following error when attempting to download files from a remote computer cluster:
System Error. Code: 123.
The filename, directory name, or volume label syntax is incorrect
From the log file:
. 2019-05-28 14:53:18.597 Copying "/home/clb02327/MAX-IV Feb/280219/ScreenOpt_28-May-2019/280219.mag
" to local directory started.
. 2019-05-28 14:53:18.597 Binary transfer mode selected.
. 2019-05-28 14:53:18.597 Checking existence of partially transferred file.
. 2019-05-28 14:53:18.597 Opening remote file.
> 2019-05-28 14:53:18.597 Type: SSH_FXP_OPEN, Size: 83, Number: 5891
< 2019-05-28 14:53:18.597 Type: SSH_FXP_STATUS, Size: 24, Number: 5636
. 2019-05-28 14:53:18.597 Discarding reserved response
< 2019-05-28 14:53:18.598 Type: SSH_FXP_HANDLE, Size: 13, Number: 5891
> 2019-05-28 14:53:18.598 Type: SSH_FXP_FSTAT, Size: 13, Number: 6152
< 2019-05-28 14:53:18.599 Type: SSH_FXP_ATTRS, Size: 37, Number: 6152
* 2019-05-28 14:53:18.600 (EOSError) System Error.  Code: 123.
 
* 2019-05-28 14:53:18.600 The filename, directory name, or volume label syntax is incorrect
. 2019-05-28 14:53:18.600 Asking user:
. 2019-05-28 14:53:18.600 Can't create file 'C:\Users\clb0232703\Documents\PhD\GPT\Bill_GPT\MAX-IV_Feb\280219\ScreenOpt_28-May-2019\280219.mag
.filepart'. ("System Error.  Code: 123.
 
. 2019-05-28 14:53:18.600 The filename, directory name, or volume label syntax is incorrect")

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,517
Location:
Prague, Czechia

Re: Error Code 123

Where/how do you get the error? In WinSCP GUI? Or is it some kind of script?

Anyway, it looks like the filename ends with a new-line character. That's not allowed in Windows.
Can you download other files from the server?

Reply with quote

i3vi3v
Donor
Joined:
Posts:
1

I might be experiencing the same issue (same "Code 123", at least).

I see the following error dialog:
---------------------------
Error
---------------------------
File or folder 'xxx' does not exist.
---------------------------
System Error.  Code: 123.
The filename, directory name, or volume label syntax is incorrect
---------------------------
Abort   Retry   Skip   Skip all   Help   
---------------------------
(where xxx is a "local" file name)

In the following circumstances:
  1. "local" folder is actually a Samba NAS. The xxx is a "problematic" file, like \\server\share\folder1\folder2\file.png.
  2. "local" path length of the innermost folder is somewhat close to Windows MAX_PATH limit (more than ~250 chars), and the path length of the file is slightly above 260.
  3. I've noticed that Windows Explorer problematic file properties dialog shows "Size on disk = 0" for these files (could be a random coincidence, actually – this dialog is very buggy for long paths).
  4. I've just tested with the latest version, e.g. "WinSCP Version 5.19.6 (Build 12002 2022-02-22) (OS 10.0.19044 - Windows 10)". A couple of years ago I ran into the same issue on "WinSCP Version 5.17.7 (Build 10640) (OS 10.0.17134 - Windows 10)" but, after all, never filed that bug report. I guess the issue itself is even older.
  5. I'm using SFTP as my remote folder, but I guess it's not very relevant
  6. I'm using GUI, commander style
Experiments:
  1. If I click "Retry", the file is copied OK. But the next file is likely to cause the same issue again. It looks like, when it happens, all files in a particular folder are affected.
  2. I can copy those "problematic" files back to my local HDD without any issues (using my file commander app).
  3. I can use the Windows built-in "Map network drive" (e.g. \\server\share\folder1 to Z:), and WinSCP would copy "folder2" flawlessly.
    • BTW, the Windows Explorer problematic file properties dialog shows reasonable non-zero "Size on disk" for the same file in this case.
  4. I've tried to create an MWE file structure. I've also tried to re-create the same file tree – ending up with changing just a single character in the middle (while keeping length exactly the same). This is very weird, but I failed to reproduce the issue using the new copy – all new copies just work OK! I've tried few other things, but after all I just gave up.
    1. I've tried to create dummy file trees with up to 600 char long paths and copy them (on the same NAS) – works OK.
    2. I've tried to copy \\server\share\folder1\* to \\server\share\folder3\* (e.g. "next" name) – works OK.
    3. I've tried to copy \\server\share\folder1\* to \\server\share\folder0\* (e.g. "previous" name) – works OK.
    4. I've tried eyeballing the stupid Windows "8.3 names" that Windows properties dialog shows – they are only different in single ~2\ vs ~1\, as expected.
    5. The Windows Explorer file properties dialog shows reasonable non-zero "Size on disk" for the copied files. Even though the path length is the same.
    6. I've tried to copy the same files (from both \\server\share\folder1 and \\server\share\folder3) using another PC (same latest WinSCP version) – both were just the same (e.g. the original folder is still problematic, while the copies work OK).
    7. This brings me to an uncomfortable idea, that some weird cache for that particular folder could be broken on the NAS itself. I've not tried to ask our admins to reboot / run consistency check on that NAS yet.
    8. This is a rather large folder structure, with ~60k of files in it. Few thousands of them appear to be "problematic". But I mostly played with a particular small sub-folder. Anyway, that's definitely does not look like a "random single bit flip".
    9. Anyway, even if there's something wrong with that NAS or Windows itself, provided that all other tools are able to read that file... And provided that other WinSCP users reported "Code: 123" as well... I wonder if that would be possible to just make WinSCP compatible with that. Especially, provided that it already works after you click "Retry".
    10. Maybe, there's, after all, nothing really wrong with that folder. Maybe it's just kind of special in a way that WinSCP does not expect.
  5. I doubt that this is related to file permissions anyhow – they all should be the same for all files.
  6. The issue is fully reproducible for the specific set of files (e.g. each time I start new WinSCP instance)
  7. If, instead of browsing into \\server\share\folder1 and copying whole folder2 I browse down to \\server\share\folder1\folder2 and select all files there (they all are "problematic", and there's no sub-folders) and copy them - they are just copied flawlessly. Next, if I can go back to \\server\share\folder1 and try to copy the whole folder2 again – it works. Restart WinSCP... Cannot copy this folder again. This looks like if something (file info?) is cached already in this case and the broken part is thus skipped.
The only relevant part in the Debug-2 log that I see is:
. 2022-05-09 22:52:56.659 Received 28 bytes
. 2022-05-09 22:52:56.659 Timeout waiting for network events
. 2022-05-09 22:52:56.659 Read 4 bytes (24 pending)
. 2022-05-09 22:52:56.659 Read 24 bytes (0 pending)
< 2022-05-09 22:52:56.659 Type: SSH_FXP_STATUS, Size: 24, Number: 1806
< 2022-05-09 22:52:56.659 65,00,00,07,0E,00,00,00,00,00,00,00,07,53,75,63,63,65,73,73,00,00,00,00,
< 2022-05-09 22:52:56.659 Status code: 0
. 2022-05-09 22:52:56.660 File: '\\mi2712yxb05\tgkoykz\hCT_srosredz\6546 Meaowrejlz\Tewq\je66692.7lmd2P_pf_kp16446.7\3648-82-65 (58.23.19) ghq_g_vzsip_cxw64\6) @(Tvgpa)lie_Tekc_IR(Tpmss,[qabi,nrkv,sznic])\5) pulc gdhlnl, wny-qyg\6) rhrsbgfrv\iurapkxamllu  i=5, (umaesmdipetgx)\fmin_search_\p=ax.fig' [2021-12-15T22:40:25.037Z] [511603]
* 2022-05-09 22:52:56.705 (EOSError) System Error.  Code: 123.
 
* 2022-05-09 22:52:56.705 The filename, directory name, or volume label syntax is incorrect
. 2022-05-09 22:52:56.705 Asking user:
. 2022-05-09 22:52:56.705 File or folder '\\mi2712yxb05\tgkoykz\hCT_srosredz\6546 Meaowrejlz\Tewq\je66692.7lmd2P_pf_kp16446.7\3648-82-65 (58.23.19) ghq_g_vzsip_cxw64\6) @(Tvgpa)lie_Tekc_IR(Tpmss,[qabi,nrkv,sznic])\5) pulc gdhlnl, wny-qyg\6) rhrsbgfrv\iurapkxamllu  i=5, (umaesmdipetgx)\fmin_search_\p=ax.fig' does not exist. ("System Error.  Code: 123.
 
. 2022-05-09 22:52:56.705 The filename, directory name, or volume label syntax is incorrect")
. 2022-05-09 22:52:57.041 Session upkeep
. 2022-05-09 22:52:57.041 Looking for network events
. 2022-05-09 22:52:57.041 Timeout waiting for network events
. 2022-05-09 22:52:57.534 Session upkeep
. 2022-05-09 22:52:57.534 Looking for network events
. 2022-05-09 22:52:57.534 Timeout waiting for network events
. 2022-05-09 22:52:58.042 Session upkeep
. 2022-05-09 22:52:58.043 Looking for network events
. 2022-05-09 22:52:58.043 Timeout waiting for network events
. 2022-05-09 22:52:58.535 Session upkeep
. 2022-05-09 22:52:58.535 Looking for network events
. 2022-05-09 22:52:58.535 Timeout waiting for network events
. 2022-05-09 22:52:59.044 Session upkeep
. 2022-05-09 22:52:59.045 Looking for network events
. 2022-05-09 22:52:59.045 Timeout waiting for network events
. 2022-05-09 22:52:59.536 Session upkeep
. 2022-05-09 22:52:59.536 Looking for network events
. 2022-05-09 22:52:59.536 Timeout waiting for network events
. 2022-05-09 22:53:00.045 Session upkeep
. 2022-05-09 22:53:00.046 Looking for network events
. 2022-05-09 22:53:00.046 Timeout waiting for network events
. 2022-05-09 22:53:00.536 Session upkeep
. 2022-05-09 22:53:00.537 Looking for network events
. 2022-05-09 22:53:00.537 Timeout waiting for network events
. 2022-05-09 22:53:01.040 Session upkeep
. 2022-05-09 22:53:01.041 Looking for network events
. 2022-05-09 22:53:01.042 Timeout waiting for network events
. 2022-05-09 22:53:01.547 Session upkeep
. 2022-05-09 22:53:01.548 Looking for network events
. 2022-05-09 22:53:01.549 Timeout waiting for network events
. 2022-05-09 22:53:02.036 Session upkeep
. 2022-05-09 22:53:02.036 Looking for network events
. 2022-05-09 22:53:02.037 Timeout waiting for network events
. 2022-05-09 22:53:02.542 Session upkeep
. 2022-05-09 22:53:02.543 Looking for network events
. 2022-05-09 22:53:02.543 Timeout waiting for network events
. 2022-05-09 22:53:03.047 Session upkeep
. 2022-05-09 22:53:03.049 Looking for network events
. 2022-05-09 22:53:03.049 Timeout waiting for network events
. 2022-05-09 22:53:03.536 Session upkeep
. 2022-05-09 22:53:03.537 Looking for network events
. 2022-05-09 22:53:03.537 Timeout waiting for network events
. 2022-05-09 22:53:04.041 Session upkeep
. 2022-05-09 22:53:04.041 Looking for network events
. 2022-05-09 22:53:04.041 Timeout waiting for network events
. 2022-05-09 22:53:04.548 Session upkeep
. 2022-05-09 22:53:04.549 Looking for network events
. 2022-05-09 22:53:04.549 Timeout waiting for network events
. 2022-05-09 22:53:05.039 Session upkeep
. 2022-05-09 22:53:05.040 Looking for network events
. 2022-05-09 22:53:05.040 Timeout waiting for network events
. 2022-05-09 22:53:05.543 Session upkeep
. 2022-05-09 22:53:05.544 Looking for network events
. 2022-05-09 22:53:05.544 Timeout waiting for network events
. 2022-05-09 22:53:06.050 Session upkeep
. 2022-05-09 22:53:06.051 Looking for network events
. 2022-05-09 22:53:06.051 Timeout waiting for network events
. 2022-05-09 22:53:06.543 Session upkeep
. 2022-05-09 22:53:06.545 Looking for network events
. 2022-05-09 22:53:06.545 Timeout waiting for network events
. 2022-05-09 22:53:07.048 Session upkeep
. 2022-05-09 22:53:07.049 Looking for network events
. 2022-05-09 22:53:07.049 Timeout waiting for network events
. 2022-05-09 22:53:07.235 Answer: Retry
. 2022-05-09 22:53:07.235 Transfer progress: Transferred: 0, Left: 0:00:00, CPS: 0/s
. 2022-05-09 22:53:07.239 Copying "\\mi2712yxb05\tgkoykz\hCT_srosredz\6546 Meaowrejlz\Tewq\je66692.7lmd2P_pf_kp16446.7\3648-82-65 (58.23.19) ghq_g_vzsip_cxw64\6) @(Tvgpa)lie_Tekc_IR(Tpmss,[qabi,nrkv,sznic])\5) pulc gdhlnl, wny-qyg\6) rhrsbgfrv\iurapkxamllu  i=5, (umaesmdipetgx)\fmin_search_\p=ax.fig" to remote directory started.
. 2022-05-09 22:53:07.240 Binary transfer mode selected.
. 2022-05-09 22:53:07.240 Opening remote file.
I've obfuscated the first part of the path a bit, replacing characters 'a':'z' and '0':'9' with random characters from the same groups.
I doubt it's useful. AFAIU, it only demonstrates the same "Code: 123" and the fact that same file copy started OK after I've clicked "Retry".
Just-in-case, I'm also attaching (as a private attachment) the login part of the log.
  • cropped_log_auth_obfuscated.txt (27.67 KB, Private file)

Reply with quote

i3v
Joined:
Posts:
1

@martin,
Please excuse me for the delay.
I've just sent you the debug trace via email.
I hope it would shed some light at this.
I'm a bit puzzled with that the debug version behaves differently than 5.19.6 – it is actually unable to copy any files (while 5.19.6 is able to copy all files, if I'm patient enough to click "Retry" enough times).

I doubt that the behavior of the debug version could be explained by https://winscp.net/tracker/2056 ("File on local network share treated as folder when uploading") alone, because the debug version also fails to create an intermediate subfolder.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum