-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running mongodb plugin inside docker container #25
Comments
Thats possible, we're a bit behind with Orthanc usage currently. We're using 1.5.8, we're gonna switch to 1.7.4 till the end of October. So at that point this plugin is tested based on 1.7 Orthanc. Maybe end of November we're switch to 1.8 Orthanc. A bit patience is needed ;-) |
Hi, |
Maybe MongoDB version, we're still using 3.6. |
I use MongoDB database which I previously succesfully connected to Orhanc when it wasn't containerized, so i think it can't be the problem |
@MateuszSkalka could you tell me you env versions (mongo, orthanc, os). |
The mongoDB version we're using: v4.0.20 I tested and installed the plugins using four different versions of jodogne/orthanc-plugins image from dockerhub, 1.8.0, 1.7.4 , 1.5.8 and 1.5.7, each one gave me similar error, segmentation fault on older versions and invalid pointer on versions 1.8 and 1.7.4 I'm pulling source code from master branch of orthanc-mongodb repository and install rest of the plugins with -DAUTO_INSTALL_DEPENDENCIES=ON |
OK I see. |
I'm able to reproduce this with jodogne base image, however the 1.5.8 version prduces different seg fault that relates to open ssl initialization, the 1.8.0 version segfaults when trying to parse the Orthanc configuration. I'm not sure I'll be able to figure this out. If I find anything I'll post here. |
New branch orthanc-1.8.0 has been created. The parsing issue was fixed. I don't know exactly what it was. It looks like the deprecated jsoncpp methods causes some issues with the newer g++ v8. Please try this Docker file. It works for me good. FROM jodogne/orthanc-plugins:1.8.0 RUN curl -L --output orthanc.tar.gz https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-1.5.7.tar.gz RUN git clone -b orthanc-1.8.0 https://github.com/Doc-Cirrus/orthanc-mongodb.git RUN rm /etc/orthanc/orthanc.json EXPOSE 4242 ENTRYPOINT ["Orthanc", "/etc/orthanc/"] |
Hello everyone,
I succesfully compiled a docker image with orthanc-mongodb installed inside, when I try to run the container with a custom configuration I encountered an error (from the bash inside docker container):
W1016 20:29:34.006603 main.cpp:821] Loading plugin(s) from: /root/orthanc-mongodb/build/libOrthancMongoDBIndex.so
W1016 20:29:34.065896 PluginsManager.cpp:269] Registering plugin 'MongoDBIndex' (version 1.5.7)
free(): invalid pointer
Aborted (core dumped)
rest of the plugins register properly.
My Dockerfile:
FROM jodogne/orthanc-plugins:1.8.0
RUN apt-get update
RUN apt -y install build-essential unzip cmake make libsasl2-dev uuid-dev libssl-dev zlib1g-dev git curl
RUN apt -y install python
RUN curl -L --output orthanc.tar.gz https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-1.5.7.tar.gz
RUN tar -xzf orthanc.tar.gz
RUN git clone https://github.com/Doc-Cirrus/orthanc-mongodb.git
RUN mkdir orthanc-mongodb/build
&& cd orthanc-mongodb/build
&& cmake -DCMAKE_CXX_FLAGS='-fPIC' -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DORTHANC_ROOT=/root/Orthanc-1.5.7 -DAUTO_INSTALL_DEPENDENCIES=ON ..
&& make
RUN rm /etc/orthanc/orthanc.json
COPY "./orthanc-conf.json" "/etc/orthanc/orthanc-conf.json"
EXPOSE 4242
EXPOSE 8042
ENTRYPOINT ["Orthanc", "/etc/orthanc/orthanc-conf.json"]
part of the json configuration file that cousing the problem:
"Plugins" : [
"/usr/local/share/orthanc/plugins/",
"/root/orthanc-mongodb/build/libOrthancMongoDBIndex.so",
"/root/orthanc-mongodb/build/libOrthancMongoDBStorage.so"
],
"MongoDB" : {
"EnableIndex" : true, // false to use default SQLite
"EnableStorage" : true, // false to use default SQLite
"ConnectionUri" : "mongodb://localhost:27017/orthanc_db",
"ChunkSize" : 261120
},
the error occures no matter witch version of orthanc-plugins image i compile with.
Thanks,
Mateusz Skalka
The text was updated successfully, but these errors were encountered: