microsoft / dicom-server

OSS Implementation of DICOMweb standard
MIT License
455 stars 172 forks source link

Unable to load shared library 'Dicom.Native-linux-x64.so' or one of its dependencies. #2499

Closed ashutosh1211 closed 1 year ago

ashutosh1211 commented 1 year ago

Describe the bug Getting following error on Azure App Service Ubuntu Instance.

When I view files on OHIF Viewer then getting following error and not able to view images in viewer.

2023-03-25T18:17:43.265347920Z: [INFO]  fail: Microsoft.Health.Dicom.Core.Features.Retrieve.Transcoder[0]

2023-03-25T18:17:43.265420121Z: [INFO]        Failed to transcode frame 0 from 1.2.840.10008.1.2.4.70 to 1.2.840.10008.1.2.1

2023-03-25T18:17:43.266371339Z: [INFO]        System.DllNotFoundException: Unable to load shared library 'Dicom.Native-linux-x64.so' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: 

2023-03-25T18:17:43.266404740Z: [INFO]        /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/site/wwwroot/runtimes/linux-x64/native/Dicom.Native-linux-x64.so.so)

2023-03-25T18:17:43.266409840Z: [INFO]        /usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.2/Dicom.Native-linux-x64.so.so: cannot open shared object file: No such file or directory

2023-03-25T18:17:43.275408110Z: [INFO]        /home/site/wwwroot/Dicom.Native-linux-x64.so.so: cannot open shared object file: No such file or directory

2023-03-25T18:17:43.275448110Z: [INFO]        /home/site/wwwroot/runtimes/linux-x64/native/libDicom.Native-linux-x64.so.so: cannot open shared object file: No such file or directory

2023-03-25T18:17:43.275453710Z: [INFO]        /usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.2/libDicom.Native-linux-x64.so.so: cannot open shared object file: No such file or directory

2023-03-25T18:17:43.275458010Z: [INFO]        /home/site/wwwroot/libDicom.Native-linux-x64.so.so: cannot open shared object file: No such file or directory

2023-03-25T18:17:43.275462011Z: [INFO]        /home/site/wwwroot/runtimes/linux-x64/native/Dicom.Native-linux-x64.so: cannot open shared object file: No such file or directory

2023-03-25T18:17:43.275465911Z: [INFO]        /usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.2/Dicom.Native-linux-x64.so: cannot open shared object file: No such file or directory

2023-03-25T18:17:43.275470211Z: [INFO]        /home/site/wwwroot/Dicom.Native-linux-x64.so: cannot open shared object file: No such file or directory

2023-03-25T18:17:43.275473811Z: [INFO]        /home/site/wwwroot/runtimes/linux-x64/native/libDicom.Native-linux-x64.so: cannot open shared object file: No such file or directory

2023-03-25T18:17:43.275477511Z: [INFO]        /usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.2/libDicom.Native-linux-x64.so: cannot open shared object file: No such file or directory

2023-03-25T18:17:43.275481411Z: [INFO]        /home/site/wwwroot/libDicom.Native-linux-x64.so: cannot open shared object file: No such file or directory

2023-03-25T18:17:43.275485311Z: [INFO]        

2023-03-25T18:17:43.275488611Z: [INFO]           at FellowOakDicom.Imaging.NativeCodec.Jpeg.JpegCodec.jpeg_std_error_16_Linux_x64(jpeg_error_mgr& err)

2023-03-25T18:17:43.275492811Z: [INFO]           at FellowOakDicom.Imaging.NativeCodec.Jpeg.JpegCodec.Decode(DicomPixelData oldPixelData, DicomPixelData newPixelData, DicomJpegParams jpegParams, Int32 frame)

2023-03-25T18:17:43.275496611Z: [INFO]           at FellowOakDicom.Imaging.NativeCodec.DicomJpegNativeCodec.Decode(DicomPixelData oldPixelData, DicomPixelData newPixelData, DicomCodecParams parameters)

2023-03-25T18:17:43.275500311Z: [INFO]           at FellowOakDicom.Imaging.Codec.DicomTranscoder.Decode(DicomDataset oldDataset, DicomTransferSyntax outSyntax, IDicomCodec codec, DicomCodecParams parameters)

2023-03-25T18:17:43.275504011Z: [INFO]           at FellowOakDicom.Imaging.Codec.DicomTranscoder.Transcode(DicomDataset dataset)

2023-03-25T18:17:43.275508111Z: [INFO]           at Microsoft.Health.Dicom.Core.Features.Retrieve.Transcoder.TranscodeFrame(DicomDataset dataset, Int32 frameIndex, DicomTransferSyntax targetSyntax) in /home/vsts/work/1/s/src/Microsoft.Health.Dicom.Core/Features/Retrieve/Transcoder.cs:line 90

2023-03-25T18:17:43.294187664Z: [INFO]  warn: Microsoft.Health.Dicom.Api.Features.Exceptions.ExceptionHandlingMiddleware[0]

2023-03-25T18:17:43.294279465Z: [INFO]        Unhandled exception

2023-03-25T18:17:43.294286766Z: [INFO]        Microsoft.Health.Dicom.Core.Exceptions.TranscodingException: The specified transcoding is not supported.

2023-03-25T18:17:43.294549071Z: [INFO]           at Microsoft.Health.Dicom.Core.Features.Retrieve.Transcoder.TranscodeFrame(DicomDataset dataset, Int32 frameIndex, DicomTransferSyntax targetSyntax) in /home/vsts/work/1/s/src/Microsoft.Health.Dicom.Core/Features/Retrieve/Transcoder.cs:line 90

2023-03-25T18:17:43.294560271Z: [INFO]           at Microsoft.Health.Dicom.Core.Features.Retrieve.Transcoder.TranscodeFrame(DicomFile dicomFile, Int32 frameIndex, String requestedTransferSyntax) in /home/vsts/work/1/s/src/Microsoft.Health.Dicom.Core/Features/Retrieve/Transcoder.cs:line 64
bcarthic commented 1 year ago

@ashutosh1211, Thanks for reporting this error. Could you provide the sample file to verify from our end.

ashutosh1211 commented 1 year ago

Hi @bcarthic ,

I have installed latest master on Azure app service on Linux host. Built the web application project and deployed its content on app service.

KnicKnic commented 1 year ago

2023-03-25T18:17:43.266404740Z: [INFO] /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/site/wwwroot/runtimes/linux-x64/native/Dicom.Native-linux-x64.so.so)

Seems that you do not have the correct version of glibc installed.

KnicKnic commented 1 year ago

Requirements need to be documented https://github.com/microsoft/dicom-server/blob/main/docs/development/setup.md#requirements for this

ashutosh1211 commented 1 year ago

How to install GLIBC_2.29 on Linux App Service instance?

ashutosh1211 commented 1 year ago

Similar issue while using Windows app service instance.

Viewer not loading images and API returing following error. The specified transcoding is not supported.

image

Following error received on logs.

image

ashutosh1211 commented 1 year ago

@bcarthic @abdullah248 any updates on this issue?

bcarthic commented 1 year ago

@bcarthic @abdullah248 any updates on this issue?

@ashutosh1211 There could be few different issue while transcoding. If you can share the DICOM file, we will able to debug and let you know what is the issue.

ashutosh1211 commented 1 year ago

@bcarthic @abdullah248 any updates on this issue?

@ashutosh1211 There could be few different issue while transcoding. If you can share the DICOM file, we will able to debug and let you know what is the issue.

It works while on the development machine.

In production it is not able to get the native coded libraries, and failing to transcode the frame.

bcarthic commented 1 year ago

@bcarthic @abdullah248 any updates on this issue?

@ashutosh1211 There could be few different issue while transcoding. If you can share the DICOM file, we will able to debug and let you know what is the issue.

It works while on the development machine.

In production it is not able to get the native coded libraries, and failing to transcode the frame.

Interesting, how did you deploy your app? Did you try our Deploy to Azure ?

I recently deployed using the template and I don't find any issues.

ashutosh1211 commented 1 year ago

No I have not deployed using "Deploy to azure " functionality.

I have built the web project using pipeline and released manually.

bcarthic commented 1 year ago

ct using pipeline and rele

Could you try deploying through the template, I am not sure how the build process works at your end.

ashutosh1211 commented 1 year ago

Sure I'll try that and let you know.

ashutosh1211 commented 1 year ago

@bcarthic I tried pulling latest code and buidling web project and deploying it on linux app service intstance. now its working fine. Im able to see the images in viewer.

We can close this issue.