error after update

Hi everybody !

i have a problem after orthanc update… :frowning:

“E1218 19:10:48.332980 main.cpp:2074] Uncaught exception, stopping now: [The directory to be created is already occupied by a regular file] (code 2000)”

I’m on Windows and i store images in : C:\PACS\OrthancStore

When i create new destination folder othanc start normaly.

When i try to move some subfolder in the new destination, orthanc stop.

Thanks for your help
Romain

Hi,

Never heard of that error message but, the way I understand it is that Orthanc tries to create e.g.
C:\PACS\OrthancStore\a2\cd\a2cd… and e.g. there is already a file named
C:\PACS\OrthancStore\a2\cd and therefore, Orthanc is not able to create the directory

HTH,

Alain.

Hi,

happy new year :slight_smile:

yes, indeed I think it is about this problem.

but I haven’t found a solution.

romain

fyi, same problem with 22.12.2 update :

W0101 18:36:04.721049 main.cpp:1685] Using a custom database from plugins
W0101 18:36:04.722050 OrthancInitialization.cpp:504] Storage directory: “C:\PACS\OrthancStore”
W0101 18:36:04.741066 PluginsManager.cpp:208] Unregistering plugin ‘delayed-deletion’ (version 1.11.2)
W0101 18:36:04.742066 PluginsManager.cpp:208] Unregistering plugin ‘dicom-web’ (version 1.12)
W0101 18:36:04.742066 PluginsManager.cpp:208] Unregistering plugin ‘osimis-web-viewer’ (version 1.4.2.0-9d9eff4)
W0101 18:36:04.742066 PluginsManager.cpp:157] Finalizing the Web viewer
W0101 18:36:04.749072 PluginsManager.cpp:208] Unregistering plugin ‘postgresql-index’ (version 4.0)
W0101 18:36:04.750073 PluginsManager.cpp:157] PostgreSQL index is finalizing
W0101 18:36:04.750073 PluginsManager.cpp:208] Unregistering plugin ‘postgresql-storage’ (version 4.0)
W0101 18:36:04.750073 PluginsManager.cpp:157] PostgreSQL storage area is finalizing
W0101 18:36:04.751074 PluginsManager.cpp:208] Unregistering plugin ‘stone-webviewer’ (version 2.5)
W0101 18:36:04.751074 PluginsManager.cpp:208] Unregistering plugin ‘web-viewer’ (version 2.8)
W0101 18:36:04.751074 PluginsManager.cpp:157] Finalizing the Web viewer
E0101 18:36:07.725592 main.cpp:2074] Uncaught exception, stopping now: [The directory to be created is already occupied by a regular file] (code 2000)
W0101 18:36:07.725592 main.cpp:2105] Orthanc has stopped

Yes, new versions won’t help. Only thing you can do to identify the problem is to run Process Monitor, filter logs on Orthanc.exe and check for the error. That should tell you which file is being accessed when the error occurs.

HTH,

Alain

Hi,

i try process mon but my files rights are ok… :frowning: It’s the same folder than older orthanc version.

You can see end of my logs :

1703 19:36:22,7626952 Orthanc.exe 4484 IRP_MJ_QUERY_INFORMATION C:\Program Files\Orthanc Server\Logs\Orthanc.log.20230102-193616.4484 SUCCESS Type: QueryBasicInformationFile, CreationTime: 02/01/2023 19:36:16, LastAccessTime: 02/01/2023 19:36:16, LastWriteTime: 02/01/2023 19:36:20, ChangeTime: 02/01/2023 19:36:20, FileAttributes: A 1703 19:36:22,7627240 Orthanc.exe 4484 IRP_MJ_QUERY_INFORMATION C:\Program Files\Orthanc Server\Logs\Orthanc.log.20230102-193616.4484 SUCCESS Type: QueryStandardInformationFile, AllocationSize: 8 192, EndOfFile: 4 385, NumberOfLinks: 1, DeletePending: False, Directory: False 1703 19:36:22,7627425 Orthanc.exe 4484 IRP_MJ_CLEANUP C:\Program Files\Orthanc Server\Logs\Orthanc.log.20230102-193616.4484 SUCCESS 1703 19:36:22,7628670 Orthanc.exe 4484 IRP_MJ_CLOSE C:\Program Files\Orthanc Server\Logs\Orthanc.log.20230102-193616.4484 SUCCESS 1703 19:36:22,7630428 Orthanc.exe 4484 IRP_MJ_READ C:\Program Files\Orthanc Server\Orthanc.exe SUCCESS Offset: 4 703 232, Length: 32 768, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O, Priority: Normal 1703 19:36:22,7678221 Orthanc.exe 4484 IRP_MJ_READ C:\Program Files\Orthanc Server\Orthanc.exe SUCCESS Offset: 9 520 128, Length: 4 096, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O, Priority: Normal 1703 19:36:22,7699213 Orthanc.exe 4484 IRP_MJ_READ C:\Program Files\Orthanc Server\Orthanc.exe SUCCESS Offset: 9 499 648, Length: 29 184, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O, Priority: Normal 1703 19:36:22,7932926 Orthanc.exe 4484 FASTIO_NETWORK_QUERY_OPEN C:\Windows\System32\api-ms-win-appmodel-runtime-l1-1-2.DLL FAST IO DISALLOWED 1703 19:36:22,7933785 Orthanc.exe 4484 IRP_MJ_CREATE C:\Windows\System32\api-ms-win-appmodel-runtime-l1-1-2.DLL NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a 1703 19:36:22,7936685 Orthanc.exe 4484 Thread Exit SUCCESS Thread ID: 8076, User Time: 0.5937500, Kernel Time: 0.2187500 1703 19:36:22,7938901 Orthanc.exe 4484 Process Exit SUCCESS Exit Status: 2000, User Time: 0.5937500 seconds, Kernel Time: 0.2187500 seconds, Private Bytes: 3 371 008, Peak Private Bytes: 37 203 968, Working Set: 20 086 784, Peak Working Set: 61 333 504

Hi Romain,

You should look in the Process Monitor for any errors - not only at the end of the logs since there are probably thousands of logs generated once Orthanc initiates its shutdown.

HTH,

Alain.

Hi Alain,

there is no error :frowning:

I can read every where “SUCCESS” for orthanc.exe process.

romain

And access to datastore is success too :

1703 19:36:19,3027040 Orthanc.exe 4484 IRP_MJ_QUERY_INFORMATION \\10.50.24.248\pacs\OrthancStore SUCCESS Type: QueryAttributeTagFile, Attributes: N, ReparseTag: 0x0 1703 19:36:19,3027558 Orthanc.exe 4484 IRP_MJ_CLEANUP \\10.50.24.248\pacs\OrthancStore SUCCESS 1703 19:36:19,3027914 Orthanc.exe 4484 IRP_MJ_CLOSE \\10.50.24.248\pacs\OrthancStore SUCCESS

Only “”“error”“”" :

1703
<Time_of_Day>19:36:19,2769157</Time_of_Day>
<Process_Name>Orthanc.exe</Process_Name>
4484
IRP_MJ_CREATE
C:\PACS\OrthancStore
REPARSE
Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: <unknown>

Sorry for multiple messages :stuck_out_tongue:

Hello,

From what I see in your logs, you are trying to write to a network drive:

\10.50.24.248\pacs\OrthancStore

Have you read the FAQ about network drives on Windows?

“If you run Orthanc as a Windows service, and if you want to store the Orthanc database (or the Orthanc Web Viewer plugin) onto a shared network drive, you might encounter an error boost::filesystem::status: The specified server cannot perform the requested operation. This probably means that the SYSTEM account is not allowed to access the mapped network drive. The easiest approach to this end consists in configuring the Windows service to run as user (instead of the default SYSTEM account),”
https://book.orthanc-server.com/faq/troubleshooting.html#windows-specific-issues
https://groups.google.com/g/orthanc-users/c/axrJfgA-Enk/m/i5nq-zhDAwAJ

If this doesn’t apply to you, have a look at the content of your “OrthancStore” directory, or start with a fresh installation.

Regards,
Sébastien-

HI,

Yes i read this kb and my orthanc service run as user. :frowning:

If i start a fresh install, how can i import old images ?

thx
romain

Hello,

If i start a fresh install, how can i import old images ?

The replication process is explained in the Orthanc Book:
https://book.orthanc-server.com/users/replication.html#direct-access-to-the-filesystem

Sébastien-

thx

:frowning: script does not work if compression is active

there are no tips for this?

romain

Hello,

The “OrthancRecoverCompressedFile” command-line tool is available if compression is active. Check out the following references:
https://groups.google.com/g/orthanc-users/c/A4m9AY4i7xU/m/o9iDn4cnCAAJ
https://book.orthanc-server.com/faq/features.html#compression

Sébastien-

hi !
thx !!! :slight_smile:

if someone interested…

my script to use the program :

@echo off
::VARIABLE
set REP_ENTREE=C:\Users\Administrateur\Desktop\input
set REP_SORTIE=C:\Users\Administrateur\Desktop\OUTPUT
set REP_ORTHANC=%PROGRAMFILES%\Orthanc Server\Tools
::SCRIPT
for /F “delims=” %%a in (‘dir “%REP_ENTREE%*” /b’) do (“%REP_ORTHANC%\OrthancRecoverCompressedFile.exe” “%REP_ENTREE%%%a” “%REP_SORTIE%%%a.DCM”)

an other question : do you have solution / script for Windows it can mass import dicom files to my fresh install ?

I hereby re-post Benjamin Golinvaux’s answer to your question, as it looks like Google Groups has removed it:

"The following one-liner will recursively list all *.com files in the current directory and all subdirectories, and will upload them to Orthanc.

Please adapt the file pattern, IP host and port to your needs.

ls -Recurse -Filter *.dcm |% {Invoke-RestMethod -Method POST -Uri http://127.0.0.1:8048/instances -InFile $_ }

If you need to use basic authentication, please see this link

On a side note, if I may comment on your previous script, you really should kiss cmd.exe goodbye. Powershell is 120x easier to use, is available on all Windows versions since Vista and is as well integrated into Windows as cmd.exe is.

Hope this helps!"