By: Kateryna Shapovalova user 21 Nov 2016 at 12:08 p.m. CST

4 Responses
Kateryna Shapovalova gravatar
Hello I use OxD-server with Oxd-php library. I try to connect to Gluu sever (Register_site command), but I get error response. Could you help me to fix this problem ? Here is Oxd Server Log 2016-11-21 13:07:33,988 DEBUG [org.xdi.oxd.server.service.SocketService] Start new SocketProcessor... 2016-11-21 13:07:33,993 TRACE [org.xdi.oxd.server.SocketProcessor] Socket processor handling... 2016-11-21 13:07:33,993 TRACE [org.xdi.oxd.common.CoreUtils] commandSize: -1, stringStorage: 2016-11-21 13:07:33,993 TRACE [org.xdi.oxd.common.CoreUtils] Parsed sizeString: 0629, commandSize: 629 2016-11-21 13:07:33,993 TRACE [org.xdi.oxd.common.CoreUtils] Read result: ReadResult{m_command='{"command":"register_site","params":{"authorization_redirect_uri":"https://local.vmtl-poc2:3000","op_host":"https://gluu_server_2.4.4","post_logout_redirect_uri":"https://local.vmtl-poc2:3000","application_type":"web","response_types":["code"],"grant_types":["authorization_code"],"scope":["openid","profile","uma_protection","uma_authorization"],"acr_values":["basic"],"client_name":null,"client_jwks_uri":"","client_token_endpoint_auth_method":"","client_request_uris":null,"client_logout_uris":null,"client_sector_identifier_uri":"","contacts":[],"ui_locales":null,"claims_locales":null,"client_id":null,"client_secret":null}}', m_leftString=''} 2016-11-21 13:07:33,994 TRACE [org.xdi.oxd.server.Processor] Command: {"command":"register_site","params":{"authorization_redirect_uri":"https://local.vmtl-poc2:3000","op_host":"https://gluu_server_2.4.4","post_logout_redirect_uri":"https://local.vmtl-poc2:3000","application_type":"web","response_types":["code"],"grant_types":["authorization_code"],"scope":["openid","profile","uma_protection","uma_authorization"],"acr_values":["basic"],"client_name":null,"client_jwks_uri":"","client_token_endpoint_auth_method":"","client_request_uris":null,"client_logout_uris":null,"client_sector_identifier_uri":"","contacts":[],"ui_locales":null,"claims_locales":null,"client_id":null,"client_secret":null}} 2016-11-21 13:07:34,075 INFO [org.xdi.oxd.server.op.RegisterSiteOperation] Creating site configuration ... 2016-11-21 13:07:34,076 TRACE [org.xdi.oxd.server.service.HttpService] Created TRUST_ALL client. 2016-11-21 13:07:34,105 ERROR [org.xdi.oxauth.client.OpenIdConfigurationClient] Host name may not be null java.lang.IllegalArgumentException: Host name may not be null at org.apache.http.util.Args.notBlank(Args.java:65) at org.apache.http.HttpHost.<init>(HttpHost.java:81) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:501) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) at org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor.execute(ApacheHttpClient4Executor.java:182) at org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:39) at org.jboss.resteasy.plugins.interceptors.encoding.AcceptEncodingGZIPInterceptor.execute(AcceptEncodingGZIPInterceptor.java:40) at org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:45) at org.jboss.resteasy.client.ClientRequest.execute(ClientRequest.java:444) at org.jboss.resteasy.client.ClientRequest.httpMethod(ClientRequest.java:688) at org.jboss.resteasy.client.ClientRequest.get(ClientRequest.java:480) at org.jboss.resteasy.client.ClientRequest.get(ClientRequest.java:514) at org.xdi.oxauth.client.OpenIdConfigurationClient._execOpenIdConfiguration(OpenIdConfigurationClient.java:102) at org.xdi.oxauth.client.OpenIdConfigurationClient.execOpenIdConfiguration(OpenIdConfigurationClient.java:78) at org.xdi.oxd.server.service.DiscoveryService.getConnectDiscoveryResponse(DiscoveryService.java:67) at org.xdi.oxd.server.op.RegisterSiteOperation.registerClient(RegisterSiteOperation.java:205) at org.xdi.oxd.server.op.RegisterSiteOperation.persistSiteConfiguration(RegisterSiteOperation.java:184) at org.xdi.oxd.server.op.RegisterSiteOperation.execute(RegisterSiteOperation.java:60) at org.xdi.oxd.server.op.RegisterSiteOperation.execute(RegisterSiteOperation.java:37) at org.xdi.oxd.server.Processor.process(Processor.java:80) at org.xdi.oxd.server.Processor.process(Processor.java:55) at org.xdi.oxd.server.SocketProcessor.run(SocketProcessor.java:60) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 2016-11-21 13:07:34,111 ERROR [org.xdi.oxd.server.service.DiscoveryService] java.lang.NullPointerException at org.xdi.oxd.server.service.DiscoveryService.getConnectDiscoveryResponse(DiscoveryService.java:68) at org.xdi.oxd.server.op.RegisterSiteOperation.registerClient(RegisterSiteOperation.java:205) at org.xdi.oxd.server.op.RegisterSiteOperation.persistSiteConfiguration(RegisterSiteOperation.java:184) at org.xdi.oxd.server.op.RegisterSiteOperation.execute(RegisterSiteOperation.java:60) at org.xdi.oxd.server.op.RegisterSiteOperation.execute(RegisterSiteOperation.java:37) at org.xdi.oxd.server.Processor.process(Processor.java:80) at org.xdi.oxd.server.Processor.process(Processor.java:55) at org.xdi.oxd.server.SocketProcessor.run(SocketProcessor.java:60) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 2016-11-21 13:07:34,111 ERROR [org.xdi.oxd.server.service.DiscoveryService] Unable to fetch discovery information for op_host: https://gluu_server_2.4.4 2016-11-21 13:07:34,112 ERROR [org.xdi.oxd.server.Processor] ErrorResponseException{errorResponseCode=ErrorResponseCode{value='no_connect_discovery_response', description='Unable to fetch Connect discovery response /.well-known/openid-configuration'}} at org.xdi.oxd.server.service.DiscoveryService.getConnectDiscoveryResponse(DiscoveryService.java:79) at org.xdi.oxd.server.op.RegisterSiteOperation.registerClient(RegisterSiteOperation.java:205) at org.xdi.oxd.server.op.RegisterSiteOperation.persistSiteConfiguration(RegisterSiteOperation.java:184) at org.xdi.oxd.server.op.RegisterSiteOperation.execute(RegisterSiteOperation.java:60) at org.xdi.oxd.server.op.RegisterSiteOperation.execute(RegisterSiteOperation.java:37) at org.xdi.oxd.server.Processor.process(Processor.java:80) at org.xdi.oxd.server.Processor.process(Processor.java:55) at org.xdi.oxd.server.SocketProcessor.run(SocketProcessor.java:60) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 2016-11-21 13:07:34,147 TRACE [org.xdi.oxd.server.Processor] Send back response: {"status":"error","data":{"error":"no_connect_discovery_response","error_description":"Unable to fetch Connect discovery response /.well-known/openid-configuration"}} 2016-11-21 13:07:34,147 TRACE [org.xdi.oxd.server.SocketProcessor] Socket processor handling... 2016-11-21 13:07:34,147 TRACE [org.xdi.oxd.common.CoreUtils] commandSize: -1, stringStorage: 2016-11-21 13:07:34,147 TRACE [org.xdi.oxd.common.CoreUtils] End of stream. Quit. 2016-11-21 13:07:34,148 TRACE [org.xdi.oxd.server.SocketProcessor] Quit. Read result is null or command string is blank.

By Yuriy Zabrovarnyy staff 22 Nov 2016 at 1:52 a.m. CST

Yuriy Zabrovarnyy gravatar
Kateryna, For op_host you put ``` "op_host":"https://gluu_server_2.4.4" ``` But it seems you don't have Gluu Server installed for this address. Please provide valid Gluu Server url. You should be able to check it also manually if hit in browser this discovery url: ``` https://gluu_server_2.4.4/.well-known/openid-configuration ``` Then in browser you should see somethink like this: ``` { "issuer": "https://gluu_server_2.4.4.com", "authorization_endpoint": "https://gluu_server_2.4.4.com/connect/authorize", "token_endpoint": "https://gluu_server_2.4.4/connect/token", "token_endpoint_auth_methods_supported": ["client_secret_basic", "private_key_jwt"], "token_endpoint_auth_signing_alg_values_supported": ["RS256", "ES256"], "userinfo_endpoint": "https://gluu_server_2.4.4.com/connect/userinfo", "check_session_iframe": "https://gluu_server_2.4.4.com/connect/check_session", "end_session_endpoint": "https://gluu_server_2.4.4.com/connect/end_session", "jwks_uri": "https://gluu_server_2.4.4.com/jwks.json", "registration_endpoint": "https://gluu_server_2.4.4.com/connect/register", "scopes_supported": ["openid", "profile", "email", "address", "phone", "offline_access"], "response_types_supported": ["code", "code id_token", "id_token", "token id_token"], "acr_values_supported": ["urn:mace:incommon:iap:silver", "urn:mace:incommon:iap:bronze"], "subject_types_supported": ["public", "pairwise"], "userinfo_signing_alg_values_supported": ["RS256", "ES256", "HS256"], "userinfo_encryption_alg_values_supported": ["RSA1_5", "A128KW"], "userinfo_encryption_enc_values_supported": ["A128CBC-HS256", "A128GCM"], "id_token_signing_alg_values_supported": ["RS256", "ES256", "HS256"], "id_token_encryption_alg_values_supported": ["RSA1_5", "A128KW"], ... } ```

By Kateryna Shapovalova user 22 Nov 2016 at 6:59 a.m. CST

Kateryna Shapovalova gravatar
Thank's The URL https://gluu_server_2.4.4/.well-known/openid-configuration works fine in browser in our local network (with IP alias in hosts file), but doesn't with OXD-PHP

By Yuriy Zabrovarnyy staff 22 Nov 2016 at 7:47 a.m. CST

Yuriy Zabrovarnyy gravatar
In log I don't see commit version. In addition it seems it sees null for your host instead of gluu_server_2.4.4. To narrow the problem would you please: 1) try it with this latest 2.4.4 oxd server http://ox.gluu.org/maven/org/xdi/oxd-server/2.4.4/oxd-server-2.4.4-distribution.zip 2) attach full oxd-server.log file to the ticket for investigation. 3) attach oxd-conf.json 4) attach oxd-default-site-config.json Thanks, Yuriy

By Kateryna Shapovalova user 23 Nov 2016 at 7:13 a.m. CST

Kateryna Shapovalova gravatar
Thanks for your help We've found a problem. It was the host name (gluu_server_2.4.4.com). Too many points in the name! We change the name and it works