phax / phoss-smp

phoss SMP - a Peppol and OASIS BDXR SMP Server, CEF eDelivery compliant
128 stars 37 forks source link

Docker Failing to Start #213

Closed Kristieb closed 2 years ago

Kristieb commented 2 years ago

I'm trying start the Docker image phelger/phoss-smp-xml:5.6.2 in Docker version 20.10.13-2. I'm getting the error message when docker-compose tries to start up:

/usr/local/lib/python3.7/site-packages/paramiko/transport.py:236:

CryptographyDeprecationWarning: Blowfish has been deprecated "class": algorithms.Blowfish,

phax commented 2 years ago

Very good question - I have no idea. I am not even specifying specific algorithms somewhere.... Eventually this is an issue with your installed Python version only and has nothing to do with the Docker image?

Kristieb commented 2 years ago

I'm actually trying to upgrade the SMP version and deploy it to the latest elastic beanstalk image for docker. The image configuration is below.

image

I already have a test/production version of the smp deployed in an older image. From what I can see the only difference between the two images in the version of Docker (20.10.4 vs 20.10.13-2).

I did reach out to AWS to see if it was an issue with the image itself. Their response below suggests it's related to the application.

This appears to be an application side error that should not be related to the platform version - so I will proceed to help you on a best effort basis as this is not an Elastic Beanstalk side issue. I believe the error message is related to the deprecation of Blowfish by Cryptography - which is most likely linked to this third-party Github thread 1. You can try this workaround in your dockerfile as mentioned in the thread:

————————————————————————— pip install fabric pip uninstall -y cryptography # uninstall 37.0.0 pip install cryptography==36.0.2 —————————————————————————

Documentation:

phax commented 2 years ago

I am familiarizing myself with PIP and trying to come up with a clean 5.6.2 release.

To my understanding, this is "only" a deprecation warning, and the SMP should start up any, doesn't it?

phax commented 2 years ago

@Kristieb I just released version 5.7.0 and hope, that I had the dependencies right. Please check if the release works for you.

Kristieb commented 2 years ago

Looks like it still doesn't start up usingg phelger/phoss-smp-xml:5.7.0

Docker error log: Attaching to current_web_1 "class": algorithms.Blowfish, current_web_1 exited with code 1 /usr/local/lib/python3.7/site-packages/paramiko/transport.py:236: CryptographyDeprecationWarning: Blowfish has been deprecated web_1 | standard_init_linux.go:228: exec user process caused: exec format error

phax commented 2 years ago

Okay, have you tried the following on your side:

pip install fabric
pip uninstall -y cryptography # uninstall 37.0.0
pip install cryptography==36.0.2

??? That seems to be a client side error....

Kristieb commented 2 years ago

Doesn't seem to help.

The error is shown within the docker container error log: /var/log/db-docker/containers/eb-current-app/eb-stdouterr.log

phax commented 2 years ago

I am on vacation now. Maybe you can build the Docker image yourself? In the /docker folder of this repository is a shell script "build-all.sh" that creates the latest release images. hth

Kristieb commented 2 years ago

@phax Been able to spend a little more time digging into this today. One important thing I forgot to mention was that I was trying to move these from an x86 architecture to arm64. Which looks to be the actual issue that I'm encountering as your image is for the platform 'linux/amd64'.

I understand I can build the image myself with my desired platform. Is there any plan to support linux/arm64/v8 in the future?

Apologies for sending you on wild goose chase.

phax commented 2 years ago

@Kristieb okay, this is a tricky one for me. I once made the error by pushing an ARM64 Docker image over an AMD64 image and it caused issues for some organizations. Therefore I am confident, that I cannot push AMD64 and ARM64 images next to each other.

So would I need to do is what is described in https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/ - what do you say about this?

phax commented 2 years ago

I created https://hub.docker.com/repository/docker/phelger/phoss-smp-xml-arm64 and equivalent for the ARM64 platform. Hope it helps. Pushing is currently in progress

Kristieb commented 2 years ago

@phax Thank you that works!

phax commented 2 years ago

Super - good to hear. I will push both images by default for future versions.