DCM4CHEE Docker install : type=LOGIN_ERROR

296 views
Skip to first unread message

Jerome

unread,
Oct 21, 2022, 10:18:38 AM10/21/22
to dcm4che

Hello, 

I'm trying to install dcm4chee with it from github. I have this problem which I can't solve. If you have any ideas?

 

Run secured archive services on a single host · dcm4che/dcm4chee-arc-light Wiki · GitHub

 

Error LOG

2022-10-21 09:55:07,462 WARN  [org.dcm4che3.audit.keycloak.Dcm4cheEventListenerProvider] (executor-thread-0) Failed to get audit logger: org.dcm4che3.conf.api.ConfigurationException: javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]

        at org.dcm4che3.conf.ldap.LdapDicomConfiguration.<init>(LdapDicomConfiguration.java:144)

        at org.dcm4che3.audit.keycloak.Dcm4cheEventListenerProvider.findDevice(Dcm4cheEventListenerProvider.java:129)

        at org.dcm4che3.audit.keycloak.Dcm4cheEventListenerProvider.auditLoggers(Dcm4cheEventListenerProvider.java:119)

        at org.dcm4che3.audit.keycloak.Dcm4cheEventListenerProvider.onEvent(Dcm4cheEventListenerProvider.java:97)

        at org.keycloak.events.EventBuilder.send(EventBuilder.java:225)

        at org.keycloak.events.EventBuilder.error(EventBuilder.java:204)

        at org.keycloak.protocol.oidc.endpoints.AuthorizationEndpointChecker.checkRedirectUri(AuthorizationEndpointChecker.java:131)

        at org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint.process(AuthorizationEndpoint.java:143)

        at org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint.buildGet(AuthorizationEndpoint.java:112)

        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.base/java.lang.reflect.Method.invoke(Method.java:566)

        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:170)

        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:130)

        at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:660)

        at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:524)

        at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:474)

        at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)

        at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:476)

        at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:434)

        at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:192)

        at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:152)

        at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:183)

        at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:141)

        at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:32)

        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:492)

        at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261)

        at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)

        at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)

        at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:164)

        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:247)

        at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:73)

        at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:151)

        at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.handle(VertxRequestHandler.java:82)

        at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.handle(VertxRequestHandler.java:42)

        at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1212)

        at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:163)

        at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:141)

        at io.quarkus.vertx.http.runtime.StaticResourcesRecorder$2.handle(StaticResourcesRecorder.java:67)

        at io.quarkus.vertx.http.runtime.StaticResourcesRecorder$2.handle(StaticResourcesRecorder.java:55)

        at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1212)

        at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:163)

        at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:141)

        at io.quarkus.vertx.http.runtime.VertxHttpRecorder$5.handle(VertxHttpRecorder.java:380)

        at io.quarkus.vertx.http.runtime.VertxHttpRecorder$5.handle(VertxHttpRecorder.java:358)

        at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1212)

        at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:163)

        at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:141)

        at org.keycloak.quarkus.runtime.integration.web.QuarkusRequestFilter.lambda$createBlockingHandler$1(QuarkusRequestFilter.java:90)

        at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:159)

        at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:100)

        at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:157)

        at io.quarkus.vertx.core.runtime.VertxCoreRecorder$13.runWith(VertxCoreRecorder.java:545)

        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)

        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)

        at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)

        at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)

        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)

        at java.base/java.lang.Thread.run(Thread.java:829)

Caused by: javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]

        at java.naming/com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3259)

        at java.naming/com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3205)

        at java.naming/com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2991)

        at java.naming/com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2905)

        at java.naming/com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:348)

        at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxFromUrl(LdapCtxFactory.java:262)

        at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:226)

        at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:280)

        at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:185)

        at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:115)

        at java.naming/javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:730)

        at java.naming/javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)

        at java.naming/javax.naming.InitialContext.init(InitialContext.java:236)

        at java.naming/javax.naming.InitialContext.<init>(InitialContext.java:208)

        at java.naming/javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:101)

        at org.dcm4che3.conf.ldap.ReconnectDirContext.<init>(ReconnectDirContext.java:30)

        at org.dcm4che3.conf.ldap.LdapDicomConfiguration.<init>(LdapDicomConfiguration.java:142)

        ... 59 more

 

2022-10-21 09:55:07,465 WARN  [org.keycloak.events] (executor-thread-0) type=LOGIN_ERROR, realmId=dcm4che, clientId=dcm4chee-arc-ui, userId=null, ipAddress=xxx.xxx.xxx.xxx, error=invalid_redirect_uri, redirect_uri= http://xxx.xxx.xxx.xxx:8080/dcm4chee-arc/ui2/study/study

 

Config docker

 

LDAP

docker run --network=dcm4chee_network --name ldap  \
           -p 389:389 \

           -e AE_TITLE=AETITLE \

-e LDAP_BASE_DN=dc=ihe,dc=net \

-e LDAP_ROOTPASS=secret \

           -e DICOM_PORT=11112 \

           -e HL7_PORT=12575 \

           -e STORAGE_DIR=/storage/fs1 \

           -v /var/local/dcm4chee-arc/ldap:/var/lib/openldap/openldap-data \
           -v /var/local/dcm4chee-arc/slapd.d:/etc/openldap/slapd.d \
           -d dcm4che/slapd-dcm4chee:2.6.2-28.0

 

 

KEYCLOAK

docker run --network=dcm4chee_network --name keycloak  \
           -p 8843:8843 \
           -e KC_HTTPS_PORT=8843 \
           -e KC_HOSTNAME=DNSVNA \

-e LDAP_BASE_DN=dc=dcm4che,dc=org \

-e LDAP_ROOTPASS=secret \

-e LDAP_CONFIGPASS=secret\

           -e KEYCLOAK_ADMIN=admin \
           -e KEYCLOAK_ADMIN_PASSWORD=secret \
           -e KC_LOG=file \
           -e KC_SPI_LOGIN_PROTOCOL_OPENID_CONNECT_LEGACY_LOGOUT_REDIRECT_URI=true \
           -e ARCHIVE_HOST=DNSVNA\
           -e KEYCLOAK_WAIT_FOR=ldap:389 \
           -v /etc/localtime:/etc/localtime:ro \
           -v /etc/timezone:/etc/timezone:ro \
           -v /var/local/dcm4chee-arc/keycloak:/opt/keycloak/data \
           -d dcm4che/keycloak:19.0.1

 Thx

ChadN

unread,
Oct 21, 2022, 12:21:48 PM10/21/22
to dcm4che
Looks like your  LDAP_BASE_DN differs between the LDAP and Keycloak.

Jerome

unread,
Oct 23, 2022, 11:38:39 AM10/23/22
to dcm4che
Thx ChadN. After modication same error

2022-10-23 17:34:28,658 WARN  [org.keycloak.protocol.oidc.OIDCLoginProtocolFactory] (main) Deprecated switch 'legacy-logout-redirect-uri' is enabled. Please try to disable it and update your clients to use OpenID Connect compliant way for RP-initiated logout.
2022-10-23 17:34:28,672 INFO  [org.keycloak.quarkus.runtime.hostname.DefaultHostnameProvider] (main) Hostname settings: FrontEnd: VNA-IMG-001, Strict HTTPS: true, Path: <request>, Strict BackChannel: false, Admin: <request>, Port: -1, Proxied: false
2022-10-23 17:34:30,085 INFO  [org.keycloak.common.crypto.CryptoIntegration] (main) Detected crypto provider: org.keycloak.crypto.def.DefaultCryptoProvider
2022-10-23 17:34:31,639 WARN  [org.infinispan.CONFIG] (keycloak-cache-init) ISPN000569: Unable to persist Infinispan internal caches as no global state enabled
2022-10-23 17:34:31,649 WARN  [org.infinispan.PERSISTENCE] (keycloak-cache-init) ISPN000554: jboss-marshalling is deprecated and planned for removal
2022-10-23 17:34:31,692 INFO  [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000556: Starting user marshaller 'org.infinispan.jboss.marshalling.core.JBossUserMarshaller'
2022-10-23 17:34:31,921 INFO  [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000128: Infinispan version: Infinispan 'Triskaidekaphobia' 13.0.9.Final
2022-10-23 17:34:32,017 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000078: Starting JGroups channel `ISPN`
2022-10-23 17:34:32,017 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000088: Unable to use any JGroups configuration mechanisms provided in properties {}. Using default JGroups configuration!
2022-10-23 17:34:32,086 WARN  [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the send buffer of socket MulticastSocket was set to 1.00MB, but the OS only allocated 212.99KB
2022-10-23 17:34:32,086 WARN  [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the receive buffer of socket MulticastSocket was set to 20.00MB, but the OS only allocated 212.99KB
2022-10-23 17:34:32,087 WARN  [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the send buffer of socket MulticastSocket was set to 1.00MB, but the OS only allocated 212.99KB
2022-10-23 17:34:32,089 WARN  [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the receive buffer of socket MulticastSocket was set to 25.00MB, but the OS only allocated 212.99KB
2022-10-23 17:34:34,096 INFO  [org.jgroups.protocols.pbcast.GMS] (keycloak-cache-init) 919ccefa5e90-48993: no members discovered after 2001 ms: creating cluster as coordinator
2022-10-23 17:34:34,103 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000094: Received new cluster view for channel ISPN: [919ccefa5e90-48993|0] (1) [919ccefa5e90-48993]
2022-10-23 17:34:34,106 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000079: Channel `ISPN` local address is `919ccefa5e90-48993`, physical addresses are `[172.18.0.3:35990]`
2022-10-23 17:34:34,462 INFO  [org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory] (main) Node name: 919ccefa5e90-48993, Site name: null
2022-10-23 17:34:35,740 INFO  [org.keycloak.quarkus.runtime.storage.legacy.liquibase.QuarkusJpaUpdaterProvider] (main) Initializing database schema. Using changelog META-INF/jpa-changelog-master.xml
2022-10-23 17:34:38,233 INFO  [org.keycloak.services] (main) KC-SERVICES0050: Initializing master realm
2022-10-23 17:34:42,015 INFO  [org.keycloak.services] (main) KC-SERVICES0004: Imported realm dcm4che from file /opt/keycloak/bin/../data/import/dcm4che-realm.json.
2022-10-23 17:34:42,491 INFO  [io.quarkus] (main) Keycloak 19.0.1 on JVM (powered by Quarkus 2.7.6.Final) started in 16.483s. Listening on: https://0.0.0.0:8843
2022-10-23 17:34:42,491 INFO  [io.quarkus] (main) Profile prod activated.
2022-10-23 17:34:42,492 INFO  [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, jdbc-h2, jdbc-mariadb, jdbc-mssql, jdbc-mysql, jdbc-oracle, jdbc-postgresql, keycloak, logging-gelf, narayana-jta, reactive-routes, resteasy, resteasy-jackson, smallrye-context-propagation, smallrye-health, smallrye-metrics, vault, vertx]
2022-10-23 17:34:42,726 INFO  [org.keycloak.services] (main) KC-SERVICES0009: Added user 'admin' to realm 'master'
2022-10-23 17:35:19,695 INFO  [org.keycloak.storage.ldap.LDAPIdentityStoreRegistry] (executor-thread-0) Creating new LDAP Store for the LDAP storage provider: 'ldap', LDAP Configuration: {fullSyncPeriod=[-1], pagination=[true], usersDn=[ou=users,dc=dcm4che,dc=org], connectionPooling=[true], cachePolicy=[DEFAULT], useKerberosForPasswordAuthentication=[false], importEnabled=[true], enabled=[true], changedSyncPeriod=[-1], bindDn=[cn=admin,dc=dcm4che,dc=org], usernameLDAPAttribute=[uid], vendor=[other], uuidLDAPAttribute=[entryUUID], allowKerberosAuthentication=[false], connectionUrl=[ldap://ldap:389], syncRegistrations=[true], authType=[simple], debug=[false], searchScope=[1], useTruststoreSpi=[ldapsOnly], priority=[0], trustEmail=[false], userObjectClasses=[inetOrgPerson, organizationalPerson], rdnLDAPAttribute=[uid], editMode=[WRITABLE], validatePasswordPolicy=[false], batchSizeForSync=[1000]}, binaryAttributes: []
2022-10-23 17:35:19,810 INFO  [org.dcm4che3.net.audit.AuditLogger] (executor-thread-0) Send audit message to /127.0.0.1:514
2022-10-23 17:35:20,056 WARN  [org.keycloak.events] (executor-thread-0) type=LOGIN_ERROR, realmId=dcm4che, clientId=wildfly-console, userId=null, ipAddress=XXX.XXX.XXX.XXX, error=invalid_redirect_uri, redirect_uri=https://vna-img-001:9993/console/index.html

ChadN

unread,
Oct 24, 2022, 9:13:14 AM10/24/22
to dcm4che
I'm not as familiar with the Docker install, but

> error=invalid_redirect_uri, redirect_uri=https://vna-img-001:9993/console/index.html

indicates that the address isn't valid. You may have mistyped a port number or need to open that port now (looks like the keycloak version may have been updated recently, and/or additional features added - the instruction page may be dated).

Jerome

unread,
Oct 24, 2022, 11:29:19 AM10/24/22
to dcm4che
Hi Tchad. Thx for help and remarks.

Port 9993 is listening

I have 2 logs that make me think of an authentication problem

ERROR [org.keycloak.services] (main) KC-SERVICES0010: Failed to add user 'admin' to realm 'master': user with username exists
and
WARN  [org.keycloak.events] (executor-thread-0) type=LOGIN_ERROR, realmId=dcm4che, clientId=wildfly-console, userId=null, ipAddress=XXX.XXX.XXX.XXX, error=invalid_redirect_uri, redirect_uri=https://hostname:9993/console/index.html

Regards
Reply all
Reply to author
Forward
0 new messages