OpenIdentityPlatform / OpenAM

OpenAM is an open access management solution that includes Authentication, SSO, Authorization, Federation, Entitlements and Web Services Security.
https://www.openidentityplatform.org/openam
Other
777 stars 152 forks source link

Using docker buildx causes 500 level error #680

Closed rkolp closed 11 months ago

rkolp commented 11 months ago

Describe the bug On a Mac M2 I'm trying to cross compile to a linux/amd64 platform using docker buildx ... I am encountering this error:

#9 127.1 11/30/2023 06:40:44:525 PM UTC: Loading Schema opendj_pushdevices.ldif
#9 127.1 11/30/2023 06:40:44:631 PM UTC: ...Success.
#9 127.1 AMSetupServlet.processRequest: errororg.opends.server.types.InitializationException: An error occurred while trying to initialize a connection handler loaded from class org.opends.server.protocols.jmx.JmxConnectionHandler with the information in configuration entry cn=JMX Connection Handler,cn=Connection Handlers,cn=config: InitializationException: The JMX connection handler defined in configuration entry cn=JMX Connection Handler,cn=Connection Handlers,cn=config was unable to bind to 0.0.0.0:1689: IOException(Address already in use) (JmxConnectionHandler.java:295 JmxConnectionHandler.java:56 ConnectionHandlerConfigManager.java:311 ConnectionHandlerConfigManager.java:244 DirectoryServer.java:1756 DirectoryServer.java:1486 EmbeddedUtils.java:85 EmbeddedOpenDS.java:467 EmbeddedOpenDS.java:1355 AMSetupServlet.java:1479 AMSetupServlet.java:792 AMSetupServlet.java:830 AMSetupServlet.java:503 AMSetupServlet.java:443 HttpServlet.java:555 HttpServlet.java:623 ApplicationFilterChain.java:209 ApplicationFilterChain.java:153 WsFilter.java:51 ApplicationFilterChain.java:178 ApplicationFilterChain.java:153 ...). This connection handler will be disabled

To Reproduce Steps to reproduce the behavior:

  1. Go to github.com/rkolp/openam and clone the repository
  2. Run: BUILDKIT_PROGRESS=plain docker buildx build --load --platform linux/amd64 --add-host openam-01.domain.com:127.0.0.2 -t openam .
  3. See error - though build continue as set -e has been commented out in configure.sh

Expected behavior openam to complete the configuration via (in configure.sh):

java -jar /usr/openam/ssoconfiguratortools/openam-configurator-tool-14.8.1.jar -f /config/config.cfg --acceptLicense

Screenshots image

Desktop (please complete the following information):

Additional context docker build does seem to work fine though, just not buildx

vharseko commented 11 months ago

please check https://github.com/OpenIdentityPlatform/OpenAM/actions/runs/6944176878/job/18890752649 "Build image" step

vharseko commented 11 months ago

https://hub.docker.com/layers/openidentityplatform/openam/latest/images/sha256-79c0942e771e13b5e925095463042d4e153058c33ea8e18284b39bd94138e26a?context=explore

rkolp commented 11 months ago

I see this was closed, but I am looking at the buildx and don't see anything in particular that would cause the:

 java -jar /usr/openam/ssoconfiguratortools/openam-configurator-tool-14.8.1.jar

command to succeed

As the error I am encountering is:

 The JMX connection handler defined in configuration entry cn=JMX Connection Handler,cn=Connection Handlers,cn=config was unable to bind to 0.0.0.0:1689: IOException(Address already in use)
rkolp commented 11 months ago

Looks like I found the root issue and it's related to: https://github.com/docker/buildx/issues/678

Here's the docker documentation: https://docs.docker.com/build/buildkit/configure/#cni-networking

You can keep it closed.