By: pradeek karuppan user 21 Mar 2017 at 11:38 a.m. CDT

6 Responses
pradeek karuppan gravatar
Hi, > I'm getting an error when calling the oxd-ruby method 'get_tokens_by_code( code, scopes, state )' in my RoR application while trying to retrieve the access_token.I'm using oxd-ruby version 0.1.3. The code is as below. ``` access_token = @oxd_command.get_tokens_by_code( code, scopes, state ) ``` The error I'm getting is. > RuntimeError: OxD Server Error : Unknown internal server error occurs.

By Michael Schwartz Account Admin 21 Mar 2017 at 11:52 a.m. CDT

Michael Schwartz gravatar
Please attach the logs from oxd. Also, which OP are you using?

By pradeek karuppan user 22 Mar 2017 at 4:28 a.m. CDT

pradeek karuppan gravatar
Hi I'm including the oxd-server log here.

By pradeek karuppan user 22 Mar 2017 at 7:29 a.m. CDT

pradeek karuppan gravatar
> 2017-03-22 12:15:05,324 TRACE [org.xdi.oxd.server.Processor] Send back response: {"status":"ok","data":{"authorization_url":"https://gluu.catapultlearning.com/oxauth/seam/resource/restv1/oxauth/authorize?response_type=code&client_id=(intentionally left blank)&redirect_uri=https://localhost/openid_login&scope=email+openid+uma_authorization+uma_protection+profile&state=k3ei3a7qrhsepl4uu8i3gtfu9a&nonce=asgefncll3amn38oju6rlf3cul"}} > 2017-03-22 12:15:05,324 TRACE [org.xdi.oxd.server.SocketProcessor] Socket processor handling... > 2017-03-22 12:15:05,324 TRACE [org.xdi.oxd.common.CoreUtils] commandSize: -1, stringStorage: > 2017-03-22 12:15:05,324 TRACE [org.xdi.oxd.common.CoreUtils] End of stream. Quit. > 2017-03-22 12:15:05,324 TRACE [org.xdi.oxd.server.SocketProcessor] Quit. Read result is null or command string is blank. > 2017-03-22 12:16:22,438 DEBUG [org.xdi.oxd.server.service.SocketService] Start new SocketProcessor... > 2017-03-22 12:16:22,439 TRACE [org.xdi.oxd.server.SocketProcessor] Socket processor handling... > 2017-03-22 12:16:22,439 TRACE [org.xdi.oxd.common.CoreUtils] commandSize: -1, stringStorage: > 2017-03-22 12:16:22,439 TRACE [org.xdi.oxd.common.CoreUtils] Parsed sizeString: 0241, commandSize: 241 > 2017-03-22 12:16:22,439 TRACE [org.xdi.oxd.common.CoreUtils] Read result: ReadResult{m_command='{"command":"get_tokens_by_code","params":{"oxd_id":"","code":"","scopes":["uma_protection email openid uma_authorization profile"],"state":""}}', m_leftString=''} > 2017-03-22 12:16:22,439 TRACE [org.xdi.oxd.server.Processor] Command: {"command":"get_tokens_by_code","params":{"oxd_id":"(intentionally left blank)","code":"(intentionally left blank)","scopes":["uma_protection email openid uma_authorization profile"],"state":"(intentionally left blank)"}} > 2017-03-22 12:16:22,444 TRACE [org.xdi.oxd.server.service.HttpService] Created TRUST_ALL client. > 2017-03-22 12:16:25,971 ERROR [org.xdi.oxauth.model.jws.AbstractJwsSigner] java.lang.SecurityException: JCE cannot authenticate the provider BC > java.security.SignatureException: java.lang.SecurityException: JCE cannot authenticate the provider BC > at org.xdi.oxauth.model.jws.RSASigner.validateSignature(RSASigner.java:166) > at org.xdi.oxauth.model.jws.AbstractJwsSigner.validate(AbstractJwsSigner.java:54) > at org.xdi.oxd.server.op.CheckIdTokenOperation.isValid(CheckIdTokenOperation.java:106) > at org.xdi.oxd.server.op.GetTokensByCodeOperation.execute(GetTokensByCodeOperation.java:89) > at org.xdi.oxd.server.op.GetTokensByCodeOperation.execute(GetTokensByCodeOperation.java:32) > 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) > Caused by: java.lang.SecurityException: JCE cannot authenticate the provider BC > at javax.crypto.Cipher.getInstance(Cipher.java:657) > at javax.crypto.Cipher.getInstance(Cipher.java:596) > at org.xdi.oxauth.model.jws.RSASigner.validateSignature(RSASigner.java:136) > ... 10 more > Caused by: java.util.jar.JarException: file:/opt/oxd-server/lib/oxd-server-jar-with-dependencies.jar has unsigned entries - Log4j-config.xsd > at javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:500) > at javax.crypto.JarVerifier.verifyJars(JarVerifier.java:361) > at javax.crypto.JarVerifier.verify(JarVerifier.java:289) > at javax.crypto.JceSecurity.verifyProviderJar(JceSecurity.java:159) > at javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:185) > at javax.crypto.Cipher.getInstance(Cipher.java:653) > ... 12 more > 2017-03-22 12:16:25,986 ERROR [org.xdi.oxd.server.op.CheckIdTokenOperation] ID Token signature is invalid. > 2017-03-22 12:16:25,986 ERROR [org.xdi.oxd.server.op.GetTokensByCodeOperation] ID Token is not valid, token: "intenionally left blank" > 2017-03-22 12:16:25,986 ERROR [org.xdi.oxd.server.Processor] No response from operation. Command: Command{command=GET_TOKENS_BY_CODE, params={"oxd_id":"intenionally left blank","code":"intenionally left blank","scopes":["uma_protection email openid uma_authorization profile"],"state":""intenionally left blank"}} > 2017-03-22 12:16:25,986 TRACE [org.xdi.oxd.server.Processor] Send back response: {"status":"error","data":{"error":"internal_error","error_description":"Unknown internal server error occurs."}} > 2017-03-22 12:16:25,986 ERROR [org.xdi.oxd.server.SocketProcessor] Quit. Enable to process command. > 2017-03-22 13:13:03,644 TRACE [org.xdi.oxd.server.license.LicenseService] Validating license ... > 2017-03-22 13:13:03,644 DEBUG [org.xdi.oxd.server.license.LicenseFile] License file location: /.oxd-license > 2017-03-22 13:13:03,644 TRACE [org.xdi.oxd.server.license.LicenseFile] MAC ADDRESS set to : D8-CB-8A-91-54-8B > 2017-03-22 13:13:03,644 TRACE [org.xdi.oxd.server.service.HttpService] Created TRUST_ALL client. > 2017-03-22 13:13:04,864 TRACE [org.xdi.oxd.server.license.LicenseService] License is validated successfully. > 2017-03-22 13:13:04,864 TRACE [org.xdi.oxd.server.license.LicenseService] License data: LicenseMetadata{creationDate=Thu Dec 29 19:57:17 IST 2016, licenseId=null, autoupdate=true, active=true, product=oxd, licenseName='Catapult Learning Inc.', expirationDate=Fri Dec 29 19:57:17 IST 2017, licenseCountLimit=9999, customerName=Catapult Learning Inc., emails=[]}

By pradeek karuppan user 22 Mar 2017 at 11:31 a.m. CDT

pradeek karuppan gravatar
please hold on looking at this issue for the next couple of hours until I come back on this. We are doubting the current local environment and thus we are rebuilding to see whether the issue can be resolved.

By pradeek karuppan user 22 Mar 2017 at 2:48 p.m. CDT

pradeek karuppan gravatar
Thanks for the support guys. We have installed 2.4.4 oxd-server in the new environment and the issue has fixed.

By William Lowe user 23 Mar 2017 at 9 a.m. CDT

William Lowe gravatar
Great. Thanks for the update.