Hello!
I have a weird error when I try to delete studies via the rest API. If I try a request like this:
curl --max-time 30 -sk --user “$ORTHANC_ADMIN:$ORTHANC_ADMIN_PASSWORD” -w “%{http_code}” -X DELETE “$ORTHANC_WRITER_FULL_URL/studies/8f5b93d7-5e9f761f-5f17e1f7-617dc1aa-bdd06ec4”
I always receive this error:
I0318 01:13:05.028257 HttpServer.cpp:1244] (http) DELETE /studies/8f5b93d7-5e9f761f-5f17e1f7-617dc1aa-bdd06ec4
E0318 01:13:05.035914 PluginsManager.cpp:153] MySQL error (1044,42000): Access denied for user ‘ccrexame_medico’@‘%’ to database ‘ccrexame_laudos_web_dicom’
I0318 01:13:05.036352 PluginsManager.cpp:161] (plugins) An active MySQL transaction was dismissed
I0318 01:13:05.049132 PluginsManager.cpp:161] (plugins) Cannot rollback a non-existing transaction
I0318 01:13:05.049235 StatelessDatabaseOperations.cpp:543] Cannot rollback transaction: Bad sequence of calls
And I have no idea why. Is anyone facing the same issue when trying to delete studies?
I tried removing my custom Python scripts creating database connections, but the problem persists.
The JSON configuration file for Orthanc:
{
“HttpPort”: 80,
“HttpServerEnabled”: true,
“OrthancExplorerEnabled”: false,
“RemoteAccessAllowed”: true,
“AuthenticationEnabled”: true,
“StoreDicom”: true,
“DefaultEncoding”: “Utf8”,
“StorageDirectory”: “/root/orthanc-storage”,
“IndexDirectory”: “/root/orthanc-index”,
“TemporaryDirectory”: “/root/orthanc-cache”,
“MallocArenaMax” : 5,
“Plugins”: [
“/usr/local/share/orthanc/plugins/”
],
“PythonScript”: “/root/python/script.py”,
“MySQL”: {
“EnableSsl” : false,
“EnableIndex”: true,
“EnableStorage”: false,
“Host”: “###MACHINE_LOCALHOST###”,
“Port”: 3306,
“UnixSocket”: “/var/lib/mysql/mysql.sock”,
“Database”: “###ORTHANC_DATABASE###”,
“Username”: “###ORTHANC_DATABASE_USER###”,
“Password”: “###ORTHANC_DATABASE_USER_PASSWORD###”,
“Lock”: false,
“MaximumConnectionRetries” : 10,
“ConnectionRetryInterval” : 5,
“IndexConnectionsCount”: 5
},
“DatabaseServerIdentifier” : “OrthancWriter”,
“ConcurrentJobs” : 10,
“RegisteredUsers”: {
“###ORTHANC_ADMIN###”: “###ORTHANC_ADMIN_PASSWORD###”,
“###ORTHANC_USER###”: “###ORTHANC_USER_PASSWORD###”
},
“Worklists”: {
“Enable”: true,
“Database”: “/root/worklists”,
“FilterIssuerAet”: false,
“LimitAnswers”: 0
},
“Name”: “Orthanc - Writer Instance”,
“DicomAet”: “###DICOM_AET###”,
“DicomPort”: 4242,
“DicomServerEnabled”: true,
“OverwriteInstances”: false,
“DicomCheckCalledAet”: false,
“DicomAlwaysAllowEcho”: true,
“DicomAlwaysAllowStore”: true,
“DicomCheckModalityHost”: false,
“HttpCompressionEnabled”: false,
“DeflatedTransferSyntaxAccepted”: true,
“JpegTransferSyntaxAccepted”: true,
“Jpeg2000TransferSyntaxAccepted”: true,
“JpegLosslessTransferSyntaxAccepted”: true,
“JpipTransferSyntaxAccepted”: true,
“Mpeg2TransferSyntaxAccepted”: true,
“RleTransferSyntaxAccepted”: true,
“UnknownSopClassAccepted”: false,
“StableAge”: ###STABLE_AGE###,
“StrictAetComparison”: false,
“StoreMD5ForAttachments”: true,
“LogExportedResources”: false,
“DicomAssociationCloseDelay”: 5,
“QueryRetrieveSize”: 10,
“CaseSensitivePN”: false,
“StorageAccessOnFind”: “Never”,
“SaveJobs”: true,
“JobsHistorySize”: 50,
“LimitJobs”: 20,
“MediaArchiveSize”: 20
}
Here is my Dockerfile:
FROM jodogne/orthanc:1.10.0
RUN apt-get -y clean && apt-get -y update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python3.7 libpython3.7 python3-pip &&
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN python3.7 -m pip install pydicom
RUN python3.7 -m pip install requests
RUN python3.7 -m pip install mysql-connector-python
COPY ./download-plugins.sh ./download-plugins.sh
RUN bash ./download-plugins.sh
RUN rm ./download-plugins.sh
RUN mkdir /root/orthanc-index/
RUN mkdir /root/orthanc-cache/
RUN mkdir /root/python/
COPY ./script.py /root/python/
RUN mkdir /root/conf/
COPY ./orthanc-writer.json /root/conf/
ARG SISMED_FULL_URL
ARG SISMED_ADMIN
ARG SISMED_ADMIN_PASSWORD
ARG DICOM_AET
ARG STABLE_AGE
ARG MACHINE_LOCALHOST
ARG ORTHANC_DATABASE
ARG ORTHANC_DATABASE_USER
ARG ORTHANC_DATABASE_USER_PASSWORD
ARG ORTHANC_ADMIN
ARG ORTHANC_ADMIN_PASSWORD
ARG ORTHANC_USER
ARG ORTHANC_USER_PASSWORD
RUN sed -i “s|###ORTHANC_ADMIN###|$ORTHANC_ADMIN|g” /root/python/script.py && sed -i “s|###ORTHANC_ADMIN_PASSWORD###|$ORTHANC_ADMIN_PASSWORD|g” /root/python/script.py && sed -i “s|###ORTHANC_USER###|$ORTHANC_USER|g” /root/python/script.py && sed -i “s|###ORTHANC_USER_PASSWORD###|$ORTHANC_USER_PASSWORD|g” /root/python/script.py && sed -i “s|###SISMED_ADMIN###|$SISMED_ADMIN|g” /root/python/script.py && sed -i “s|###SISMED_ADMIN_PASSWORD###|$SISMED_ADMIN_PASSWORD|g” /root/python/script.py && sed -i “s|###SISMED_FULL_URL###|$SISMED_FULL_URL|g” /root/python/script.py
RUN sed -i “s/###DICOM_AET###/$DICOM_AET/g” /root/conf/orthanc-writer.json && sed -i “s/###STABLE_AGE###/$STABLE_AGE/g” /root/conf/orthanc-writer.json && sed -i “s/###MACHINE_LOCALHOST###/$MACHINE_LOCALHOST/g” /root/conf/orthanc-writer.json && sed -i “s/###ORTHANC_ADMIN###/$ORTHANC_ADMIN/g” /root/conf/orthanc-writer.json && sed -i “s|###ORTHANC_ADMIN_PASSWORD###|$ORTHANC_ADMIN_PASSWORD|g” /root/conf/orthanc-writer.json && sed -i “s/###ORTHANC_USER###/$ORTHANC_USER/g” /root/conf/orthanc-writer.json && sed -i “s/###ORTHANC_USER_PASSWORD###/$ORTHANC_USER_PASSWORD/g” /root/conf/orthanc-writer.json && sed -i “s/###ORTHANC_DATABASE###/$ORTHANC_DATABASE/g” /root/conf/orthanc-writer.json && sed -i “s|###ORTHANC_DATABASE_USER###|$ORTHANC_DATABASE_USER|g” /root/conf/orthanc-writer.json && sed -i “s|###ORTHANC_DATABASE_USER_PASSWORD###|$ORTHANC_DATABASE_USER_PASSWORD|g” /root/conf/orthanc-writer.json
EXPOSE 4242
ENTRYPOINT [ “Orthanc” ]