This post will discuss some basic and prevalent errors that occurs when working with JOSSO.
Most of the time, when we deploy and start the appliance, we start to face errors. We will now discuss how to come over those server errors.
Checklist:
This checklist is to ensure that all paths are set right so that your web server will compile pages smoothly.
I have given examples based on what version i have used in my JOSSO posts.
JAVA - Server JRE 8 Update 221
TOMCAT - Tomcat Version 7.0.94
In environment variables, make sure you set the following variables in user variables / system variables. See to that, values should not differ between user variables and system variables if set in both.
(i) JAVA_HOME (Eg., C:\Java\jdk-1.8.0_221)
(ii) PATH (Eg., C:\Java\jdk-1.8.0_221\bin; )
See to that if you have any other java path, kindly remove them and make this as first entry
Once this is done, you have restart command prompt if you were already working in it.
If you were working with atricore console, kindly close it and start josso server with a new command prompt.
Handling warnings / exceptions / errors:
Now, we will discuss the ways to avoid errors:
A. Before starting atricore-console: To get over JAVA_OPTS warning:
Inside command prompt, execute the following:
set JAVA_OPTS=-Xms256M -Xmx1024M
and then execute the atricore command to start josso.
B. After deploying and starting appliance:
You may see HTTP ERROR 404 & 500 when you start the appliance and access the partnerapp.
(Example: http://localhost:8080/partnerapp)
Make note you see the reason of your error from tomcat logs.
Location: <Tomcat-Installation-Directory>\logs\catalina.<date_of_execution>
Based on the error, solution is given below:
(1) 404 Error:
Encountered Server and version: Tomcat 6.0.32 / Tomcat 7.0.94 / Tomcat 8.5.43
Error: 404 - Not found when partnerapp is accessed
Reason: Parternapp folder not installed / not installated in correct location
Fix:
1. Go to <Tomcat-Installation-Directory>/webapps location in system.
2. You should find partnerapp folder inside webapps.
404 occurs when this partnerapp folder is not found in webapps folder.
3. Go the JOSSO console in browser.
4. Inside appliance modeller, click the execution environment.
5. Check the Install Home path. This path should be where tomcat is installed.
Example: C:\Apache\Tomcat70
6. If the path is correct / corrected, save the appliance
7. Click Activate tab
8. Check the following in the order below:
Install Demo
9. Once reactivated, partnerapp folder will be present in <Tomcat-Installation-Directory>/webapps location.
10. Rebuild, deploy and start the appliance. Access partnerapp via browser.
(2) Compilation Error:
(a) Encountered Server and version: Tomcat 6.0.32
Error:
org.apache.jasper.compiler.JDTCompiler$1 findType
SEVERE: Compilation error
org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
Reason: Bug found in ecj-3.31 located in <Tomcat-Installation-Directory>\lib folder
Fix:
a. Stop Tomcat server
b. Download ecj4.2.2 from http://www.java2s.com/Code/Jar/e/Downloadecj422jar.htm
c. Extract jar file from zip
d. Go to <Tomcat-Installation-Directory>/lib
e. Rename exisitng ecj-3.3.1 to old-ecj-3.31
f. Copy the extracted ecj-4.2.2.jar to this location
g. Rename it to ecj-4.2.2 to ecj-3.3.1
h. Start Tomcat server
(b) Encountered Server and version: Tomcat 7.0.94 / Tomcat 8.5.43
Error: SSOAgent resolves to be a package / anything related to index.jsp
Reason: JAVA_HOME and PATH environment variables are not set properly
Fix: Make sure your JAVA_HOME and PATH variables are set properly.
Execute the following in command prompt:
1. echo %JAVA_HOME% and echo %PATH%
This should show your variable values set in environment variables.
2. java -version and javac -version
This should show the version of java installed and the appropriate path is set
(3) Login Exception Error:
Encountered Server and version: Tomcat 6.0.32 / Tomcat 7.0.94 / Tomcat 8.5.43
Error:
org.apache.catalina.realm.JAASRealm authenticate
SEVERE: Unexpected error
javax.security.auth.login.LoginException: No LoginModules configured for josso
Reason: jaas.conf file is not seen by tomcat server
Most of the time, when we deploy and start the appliance, we start to face errors. We will now discuss how to come over those server errors.
Checklist:
This checklist is to ensure that all paths are set right so that your web server will compile pages smoothly.
I have given examples based on what version i have used in my JOSSO posts.
JAVA - Server JRE 8 Update 221
TOMCAT - Tomcat Version 7.0.94
In environment variables, make sure you set the following variables in user variables / system variables. See to that, values should not differ between user variables and system variables if set in both.
(i) JAVA_HOME (Eg., C:\Java\jdk-1.8.0_221)
(ii) PATH (Eg., C:\Java\jdk-1.8.0_221\bin; )
See to that if you have any other java path, kindly remove them and make this as first entry
Once this is done, you have restart command prompt if you were already working in it.
If you were working with atricore console, kindly close it and start josso server with a new command prompt.
Handling warnings / exceptions / errors:
Now, we will discuss the ways to avoid errors:
A. Before starting atricore-console: To get over JAVA_OPTS warning:
Inside command prompt, execute the following:
set JAVA_OPTS=-Xms256M -Xmx1024M
and then execute the atricore command to start josso.
B. After deploying and starting appliance:
You may see HTTP ERROR 404 & 500 when you start the appliance and access the partnerapp.
(Example: http://localhost:8080/partnerapp)
Make note you see the reason of your error from tomcat logs.
Location: <Tomcat-Installation-Directory>\logs\catalina.<date_of_execution>
Based on the error, solution is given below:
(1) 404 Error:
Encountered Server and version: Tomcat 6.0.32 / Tomcat 7.0.94 / Tomcat 8.5.43
Error: 404 - Not found when partnerapp is accessed
Reason: Parternapp folder not installed / not installated in correct location
Fix:
1. Go to <Tomcat-Installation-Directory>/webapps location in system.
2. You should find partnerapp folder inside webapps.
404 occurs when this partnerapp folder is not found in webapps folder.
3. Go the JOSSO console in browser.
4. Inside appliance modeller, click the execution environment.
5. Check the Install Home path. This path should be where tomcat is installed.
Example: C:\Apache\Tomcat70
6. If the path is correct / corrected, save the appliance
7. Click Activate tab
8. Check the following in the order below:
Install Demo
Overwrite
Reactivate9. Once reactivated, partnerapp folder will be present in <Tomcat-Installation-Directory>/webapps location.
10. Rebuild, deploy and start the appliance. Access partnerapp via browser.
(2) Compilation Error:
(a) Encountered Server and version: Tomcat 6.0.32
Error:
org.apache.jasper.compiler.JDTCompiler$1 findType
SEVERE: Compilation error
org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
Reason: Bug found in ecj-3.31 located in <Tomcat-Installation-Directory>\lib folder
Fix:
a. Stop Tomcat server
b. Download ecj4.2.2 from http://www.java2s.com/Code/Jar/e/Downloadecj422jar.htm
c. Extract jar file from zip
d. Go to <Tomcat-Installation-Directory>/lib
e. Rename exisitng ecj-3.3.1 to old-ecj-3.31
f. Copy the extracted ecj-4.2.2.jar to this location
g. Rename it to ecj-4.2.2 to ecj-3.3.1
h. Start Tomcat server
(b) Encountered Server and version: Tomcat 7.0.94 / Tomcat 8.5.43
Error: SSOAgent resolves to be a package / anything related to index.jsp
Reason: JAVA_HOME and PATH environment variables are not set properly
Fix: Make sure your JAVA_HOME and PATH variables are set properly.
Execute the following in command prompt:
1. echo %JAVA_HOME% and echo %PATH%
This should show your variable values set in environment variables.
2. java -version and javac -version
This should show the version of java installed and the appropriate path is set
(3) Login Exception Error:
Encountered Server and version: Tomcat 6.0.32 / Tomcat 7.0.94 / Tomcat 8.5.43
Error:
org.apache.catalina.realm.JAASRealm authenticate
SEVERE: Unexpected error
javax.security.auth.login.LoginException: No LoginModules configured for josso
Reason: jaas.conf file is not seen by tomcat server
Fix:
a. Stop Tomcat server
b. Open Configure Tomcat
Click <Tomcat-Installation-Directory>\bin\tomcat6w.exe for tomcat 6.0.32
Click<Tomcat-Installation-Directory>\bin\tomcat7w.exe for tomcat 7.0.94
Click <Tomcat-Installation-Directory>\bin\tomcat8w.exe for tomcat 8.5.43
Click <Tomcat-Installation-Directory>\bin\tomcat8w.exe for tomcat 8.5.43
c. Go to JAVA tab
d. In Java Options, append this line:
-Djava.security.auth.login.config=<Tomcat-Installation-Directory>\conf\jaas.conf
Replace <Tomcat-Installation-Directory> with the exact path like:
-Djava.security.auth.login.config=C:\Apache\Tomcat70\conf\jaas.conf (for tomcat 7.0.94)
e. Click Apply and OK
f. Start Tomcat server
Now your appliance should be working fine.
If there are any other errors encountered, kindly comment below with fixes if any.
Hi,
ReplyDeleteI get error "Invalid Authentication Information" when I sign in to the JOSSO2 login page.
My identity appliance setup is similar to the one you have explained in this blog "Modelling the Appliance". However, the only difference is that the Identity Source that connects to the IdP is an "RDBMS Identity Source" and not the default Embedded Identity Vault. On the other hand, the Identity Source that I have linked to the Service Provider is the default one (Embedded Identity Vault). Not sure if this is the correct way to setup? Please advise.
Also to explain further on the "Invalid Authentication Information". I am able to successfully create users in the "Account and Entitlement Management" tab. But when I key in their credentials in the JOSSO2 login page, I get the error. Same goes to when I key in the credentials from the external DB.
This is the error from atricore.log :
2020-04-15 17:22:07,477 | WARN | tp-347993098-116 | AbstractMediationHttpBinding | ing.AbstractMediationHttpBinding 477 | 196 - org.atricore.idbus.kernel.main - 1.4.4.SNAPSHOT | Denying cross origin for registered URL http://192.168.121.72:8081
2020-04-15 17:22:07,481 | WARN | tp-347993098-116 | IDBusHttpBinding | .component.http.IDBusHttpBinding 211 | 196 - org.atricore.idbus.kernel.main - 1.4.4.SNAPSHOT | Denying cross origin for registered URL http://192.168.121.72:8081
2020-04-15 17:22:15,483 | INFO | tp-347993098-117 | acmeidp | ng.builtin.LoggerAuditingHandler 33 | 117 - org.atricore.idbus.kernel.auditing.builtin - 1.4.4.SNAPSHOT | principal=UNKNOWN action=SSO outcome=FAILURE attempt=1 httpSession=id-3b59d08d-9916-428c-9a31-991175afb77c.idbus-web-001 federatedProvider=http://192.168.121.72:8081/IDBUS/MYFIRSTIA/SP1/SAML2/MD provider=acmeidp authnCtx=urn:oasis:names:tc:SAML:2.0:ac:classes:Password remoteAddress=192.168.113.96
2020-04-15 17:23:38,505 | INFO | tp-347993098-118 | acmeidp | ng.builtin.LoggerAuditingHandler 33 | 117 - org.atricore.idbus.kernel.auditing.builtin - 1.4.4.SNAPSHOT | principal=surentran action=SSO outcome=FAILURE attempt=2 httpSession=id-15782593-aeb7-4360-90f5-6a4f1fc282d7.idbus-web-001 federatedProvider=http://192.168.121.72:8081/IDBUS/MYFIRSTIA/SP1/SAML2/MD provider=acmeidp authnCtx=urn:oasis:names:tc:SAML:2.0:ac:classes:Password remoteAddress=192.168.113.96
(END)
This is the error from atricore-err.log :
2020-04-15 17:20:57,838 | WARN | tp-347993098-114 | AbstractCamelMediator | actCamelMediator$LoggerProcessor 528 | 196 - org.atricore.idbus.kernel.main - 1.4.4.SNAPSHOT | No Mediation Logger configured, either configure one or disable logging
2020-04-15 17:21:10,873 | WARN | tp-347993098-114 | AbstractCamelMediator | actCamelMediator$LoggerProcessor 528 | 196 - org.atricore.idbus.kernel.main - 1.4.4.SNAPSHOT | No Mediation Logger configured, either configure one or disable logging
2020-04-15 17:21:10,890 | WARN | tp-347993098-114 | AbstractCamelMediator | actCamelMediator$LoggerProcessor 528 | 196 - org.atricore.idbus.kernel.main - 1.4.4.SNAPSHOT | No Mediation Logger configured, either configure one or disable logging
2020-04-15 17:21:11,594 | WARN | tp-347993098-114 | AbstractCamelMediator | actCamelMediator$LoggerProcessor 528 | 196 - org.atricore.idbus.kernel.main - 1.4.4.SNAPSHOT | No Mediation Logger configured, either configure one or disable logging
2020-04-15 17:22:07,477 | WARN | tp-347993098-116 | AbstractMediationHttpBinding | ing.AbstractMediationHttpBinding 477 | 196 - org.atricore.idbus.kernel.main - 1.4.4.SNAPSHOT | Denying cross origin for registered URL http://192.168.121.72:8081
2020-04-15 17:22:07,481 | WARN | tp-347993098-116 | IDBusHttpBinding | .component.http.IDBusHttpBinding 211 | 196 - org.atricore.idbus.kernel.main - 1.4.4.SNAPSHOT | Denying cross origin for registered URL http://192.168.121.72:8081
(END)
Pls help resolve this.
I was not notified about this comment in any way, I missed it!
DeleteI know this must be a very late reply! And I don't know whether you will need it anymore.
I have not worked with RDBMS Identity Source, when I posted, I was just a beginner.
Hope this link will help you, if you are still in need:
https://docs.atricore.com/josso2/2.2.2/en-US/html/Identity_Source_Setup.html#Setup_an_RDBMS_Identity_Source
If the connection test was successful, there must be no problem with RDBMS connection. Based on your error, there must be something wrong with linking of files! It is just a guess!