URGENT Successful install, config, and deploy but getting invalid_redirect_uri

385 views
Skip to first unread message

Colby Scott

unread,
Jan 9, 2020, 9:46:08 PM1/9/20
to dcm...@googlegroups.com
Hello, all.

Sorry for making this URGENT. I'm new to this company and was left with a half-finished project that is due next week, the core of which is this DCM4CHE install.

Installing DCM4CHE Secure sure has been an adventure! I've started from a bare server about 10 times, getting a different unresolvable problem each time. The good news is that this has allowed me to learn a ton!

Anyway, I finally have it installed (per https://github.com/dcm4che/dcm4chee-arc-light/wiki/Secure-Archive-UI-and-RESTful-Services-using-Keycloak) and everything is set up as instructed. However, when I go to hostname:8880/dcm4che-arc/ui2, Firefox kicks "Invalid parameter: redirect_uri.

I am setting this up so that any user in my office can access it from any computer. Therefore, every place in the install steps where it says <host>, I substituted in the server's hostname. This install has both Keycloak and Wildfly on the same server. I can access the Keycloak admin console just fine, and configured the Root URL, Valid Redirect URIs, Admin URL, and Web Origins as such, with the applicable hostname.

I started Keycloak standalone with
standalone.sh -b dir-edo-ulpacs

...and Wildfly standalone with
standalone.sh -c dcm4chee-arc.xml -b dir-edo-ulpacs

Here is the Keycloak server log event that corresponds....

2020-01-10 02:02:42, 760 WARN  [org.keycloak.events] (default task-1) type=LOGIN_ERROR, realmId=dcm4che, clientId=dcm4chee-arc-ui, userId=null, ipAddress=127.0.0.1, error=invalid_redirect_uri, redirect_uri=http://dir-edo-ulpacs:8080/dcm4chee-arc/ui2

See also attached images.

I suspect there is a config file somewhere within Keycloak that needs a parameter changed from 127.0.0.1 to dir-edo-ulpacs, or something similar but I don't know where to do that.

I'm on.....
DCM4CHE 5.20.0
Keycloak and Adapter 8.0.1
Wildfly 18.0.1
mySQL 8.0.18
OpenLDAP: slapd from Aug 8, 2019
Apache Directory Studio 2.0.0.v20180908-M14

Many thanks in advance for the help! (



FF Error.JPG
KC Client Config.JPG

Gunter Zeilinger

unread,
Jan 10, 2020, 3:09:18 AM1/10/20
to dcm...@googlegroups.com
Check if http://dir-edo-ulpacs:8080/dcm4chee-arc/ui2 matches one of the configured Valid Redirect URI Patterns of the of the Keycloak client dcm4chee-arc-ui. E.g.:
Screenshot from 2020-01-10 08-59-46.png


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, January 10, 2020 3:46 AM, Colby Scott <lofi...@gmail.com> wrote:

Hello, all.

Sorry for making this URGENT. I'm new to this company and was left with a half-finished project that is due next week, the core of which is this DCM4CHE install.

Installing DCM4CHE Secure sure has been an adventure! I've started from a bare server about 10 times, getting a different unresolvable problem each time. The good news is that this has allowed me to learn a ton!

Anyway, I finally have it installed (per https://github.com/dcm4che/dcm4chee-arc-light/wiki/Secure-Archive-UI-and-RESTful-Services-using-Keycloak) and everything is set up as instructed. However, when I go to hostname:8880/dcm4che-arc/ui2, Firefox kicks "Invalid parameter: redirect_uri.

I am setting this up so that any user in my office can access it from any computer. Therefore, every place in the install steps where it says <host>, I substituted in the server's hostname. This install has both Keycloak and Wildfly on the same server. I can access the Keycloak admin console just fine, and configured the Root URL, Valid Redirect URIs, Admin URL, and Web Origins as such, with the applicable hostname.

Here is the Keycloak server log event that corresponds....

2020-01-10 02:02:42, 760 WARN  [org.keycloak.events] (default task-1) type=LOGIN_ERROR, realmId=dcm4che, clientId=dcm4chee-arc-ui, userId=null, ipAddress=127.0.0.1, error=invalid_redirect_uri, redirect_uri=http://dir-edo-ulpacs:8080/dcm4chee-arc/ui2

See also attached images.

I suspect there is a config file somewhere within Keycloak that needs a parameter changed from 127.0.0.1 to dir-edo-ulpacs, or something similar but I don't know where to do that.

I'm on.....
DCM4CHE 5.20.0
Keycloak and Adapter 8.0.1
Wildfly 18.0.1
mySQL 8.0.18
OpenLDAP: slapd from Aug 8, 2019
Apache Directory Studio 2.0.0.v20180908-M14

Many thanks in advance for the help! (




--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.

Colby Scott

unread,
Jan 10, 2020, 9:01:34 AM1/10/20
to dcm...@googlegroups.com

OMG! I was just sitting here thinking that I already said that I configured the redirect URI's appropriately and silently judging you. BUT, before I commented I decided to double check my entries and (I can't believe I did this) I realized that I matched HTTPS with 8080 on one of the entries. I changed it to HTTP and now it works! Sometimes I can be such an idiot. lol

Thanks Gunter! ...and sorry for silently judging you. 

Salifu Njidda

unread,
Mar 11, 2024, 5:39:46 PMMar 11
to dcm4che
Hello everyone, I am trying to setup dcm4che and at the level of choosing an ldap, i first choosed apacheds installed it and apache directory studio evrything was working find at the level of creating a connection from the apache directory studio, few days after i can not still use as each time i start the server it stops, so i decided to go with openldap i installed it and also the client ui(lam). I can access the lam at localhost/lam. 
From there i wnet to the ldap configuration and updated the default password, comming back to the login screen i get the error credentials dont match i am unsure where i am getting things wrong as i am new to ldap and dcm4chee as well. I will appreciate if someone can help me out. 
I have attarched the screenshot

A follow up question is. 
after succeeding from here, i want to get the code of the arch -light runing on my local machine where i can make some chnages and then build it to deploy. 
How do i go about it. I found alot of documentation arround but the installation or i call it deployment procedures are not still begginer friendly setting up the ldap and widly before deploying.
Screenshot from 2024-03-11 22-36-53.png
Reply all
Reply to author
Forward
0 new messages