Actually I want to setup wso2is 5.3.0 with the postgres schema for production environment, which I have configured as "jdbc:postgresql://localhost:5432/wso2?currentSchema=wso2pgschema" in the masterdatasources.xml file and able to install wso2is in the postgres schema but when I goes to the browser and tries to login its gives me error
[LOG]
[2017-05-14 19:15:59,023] ERROR {org.wso2.carbon.user.core.common.AbstractUserStoreManager} - Error occurred while accessing Java Security Manager Privilege Block
[2017-05-14 19:15:59,026] ERROR {org.wso2.carbon.core.services.authentication.AuthenticationAdmin} - System error while Authenticating/Authorizing User : Error when handling event : PRE_AUTHENTICATION
Is there a way we can install it database schema ?or we have to install it in the database public schema/keep installation with the inbuild h2 database for production.
Please Help.
Thanks
Pankaj
Yes, you can use a schema other than the public schema. Please refer the post here for the steps.
For the second part of the question, the default H2 database is not recommended for production systems.
Related
I am using stream processor 4.3.0 and need to access the H2 Database for it which comes by default in WSO2 SP application.
Can some please help me here to access/browse the database.
Thanks
And need to access the H2 Database for it which comes by default in WSO2 SP application
For WSO2SP DB configuration stored in:
${carbon.home}/conf/worker/deploymment.yaml
${carbon.home}/conf/dashboard/deploymment.yaml
${carbon.home}/conf/..other module../deploymment.yaml
so you can check the database locations
by default check
${carbon.home}/wso2/worker/database
${carbon.home}/wso2/dashboard/database
${carbon.home}/wso2/..other module../database
You can use H2 Shell to access the databases
Please note the embedded H2 databases are not intended to be accessed from multiple processes concurrently, so stop the wso2sp first
please find the answer below.
Open the /repository/conf/carbon.xml file and paste the following configuration.
Do not uncomment the existing element. Just paste the following configuration below it.
<H2DatabaseConfiguration>
<property name="web"/>
<property name="webPort">8082</property>
<property name="webAllowOthers"/>
</H2DatabaseConfiguration>
3.Restart the WSO2 product and access the following URL via your browser: http://localhost:8082
Tip: If you are logged in to the management console, log out before connecting to the database.
4.Enter the following details and click Connect.
JDBC URL : jdbc:h2:[file path to /repository/database/WSO2CARBON_DB]
username : wso2carbon
password : wso2carbon
I have downloaded the WSO2 IS 5.0.0 , when I started running the server .
I am getting the following error, not sure where it is picking the wrong password from :
[2015-12-16 12:46:46,541] WARN {org.wso2.carbon.apimgt.impl.observers.APIStatusObserverList} - Attempt to reinitialize APIStatusObserverList - Skipping
[2015-12-16 12:46:48,709] ERROR {org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO} - Failed to retrieve the API Context
org.h2.jdbc.JdbcSQLException: Wrong user name or password [8004-140]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.message.DbException.get(DbException.java:144)
at org.h2.message.DbException.get(DbException.java:133)
at org.h2.engine.Engine.validateUserAndPassword(Engine.java:277)
at org.h2.engine.Engine.getSession(Engine.java:133)
at org.h2.engine.Session.createSession(Session.java:122)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:111)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:95)
at org.h2.Driver.connect(Driver.java:73)
Additional Info:
I am using the following documentation to configure IS as the keyManager.
https://docs.wso2.com/display/CLUSTER420/Configuring+the+Pre-Packaged+Identity+Server+5.0.0+with+API+Manager+1.9.1
What I found is only if I change the username and password of the newly added datasources to default username and password , then the server is starting.
Created the setup using Pre-Packaged IS 5.0.0 with API Manager 1.9.1 and API Manager 1.9.1 as describe in [1]. while starting the server there is no error get printed on the console. The main reason behind the error is that you are changing the wso2carbondb credential shipped with the the IS.
[1]: https://docs.wso2.com/display/CLUSTER420/Configuring+the+Pre-Packaged+Identity+Server+5.0.0+with+API+Manager+1.9.1
I locally installed WSO2 API manager and create API but API list is not coming at WSO2 dashboard . It displaying an error i.e
[2015-11-03 18:47:29,781] ERROR - AsyncDataPublisher Reconnection failed for for tcp://localhost:7614"
index:jag org.wso2.carbon.apimgt.api.APIManagementException: Error occurred while getting the APIs
Version of API manager is 1.9.1
I can't get any API statistics
This issue can be occurred when you have not configured information according to the Port Offset value. As an example if the port offset value of BAM instance is 3,need to configure as follows in property in the api-manager.xml which is in /repository/conf/ folder.
<ThriftPort>7614</ThriftPort>
<BAMServerURL>{tcp://<IP Address>:7614/}</BAMServerURL>
Also make sure to restart both servers.
I have updated WSO2 default SLL with the custom SSL certificate on my Production Server on which WSO2Api installed.
SSL issues have been fixed, but now I am getting error while re-generating access token
Logs
Caused by: org.wso2.carbon.apimgt.keymgt.APIKeyMgtException: Error in getting new accessToken
at org.wso2.carbon.apimgt.keymgt.service.APIKeyMgtSubscriberService.renewAccessToken(APIKeyMgtSubscriberService.java:281)
... 45 more
Caused by: java.lang.RuntimeException: Failed : HTTP error code : 500
at org.wso2.carbon.apimgt.keymgt.service.APIKeyMgtSubscriberService.renewAccessToken(APIKeyMgtSubscriberService.java:252)
... 45 more
TID: [0] [AM] [2014-08-27 10:57:41,440] ERROR {org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject} - Error in getting new accessToken {org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject}
If APIManager runs with a port offset,you need to do addtional changes.
Change the endpoint ports defined in default APIs shipped with APIManager
Find all default APIs of the API Manager in /repository/deployment/server/synapse-configs/default/api folder. Those are Authorize API, Login API, Token API and Revoke API. Open each of them and change the address endpoint config included port value to match with offset value.The default address endpoint config is
"address uri="https://192.168.1.7:9443/oauth2/token".If the AM standalone pack running with port offset 2 change that config as
address uri="https://192.168.1.7:9445/oauth2/token"
What I did to fix the issue was to 1) add admin user inside ApiKeyValidaor in api-manager.xml also into admin user via management console and into user-mgt.xml; 2) Inside api-manager.xml:
Change the following:
https://${carbon.local.ip}:${mgt.transport.https.port}${carbon.context}/services/
to:
https://[FQDN_OF_HOST}:${mgt.transport.https.port}${carbon.context}/services/
Reason is my server certificate only recorded the domain name, not ip address.
My setup: Product: WSO2 AM 1.10.0 DB: MSSQL Security: SAML2 integrated with PingIdentity OS: Linux
Please also refer to this question:
wso2 am 1.10.0 API Store: "Error occurred while executing the action generateApplicationKey" with " Invalid credentials provided."
The error may be due to one of these two things:
Your admin password is not set for ApiKeyManager in api_manager.xml.
SSL is not set properly.
I want to use a external JDBC store as default store instead of the default LDAP store. Followed the documentation in this link.
http://docs.wso2.org/wiki/display/IS400/Configuring+an+External+JDBC+User+Store
Getting the following exception Appreciate any help.
An unknown exception occurred while starting LDAP server.java.lang.NullPointerException: Name is null
You can configure WSO2 IS 4.0.0 with an external JDBC users store.The problem is due to an issue with the instructions in the documentation(1) as some configuration steps are missing there.I have created the jira [DOCUMENTATION-17] to track this doc issue.
Please follow below steps to connect IS 4.0.0 with external jdbc users-store.
1) Change the UserStoreManager class to JDBCUserStoreManager from user-mgt.xml [IS_Home/repository/conf] and add the related database connection property to it as mentioned in (1)
2) Add 'passwordHashMethod' propert within JDBCUserStoreManager and set the value to 'SHA' or 'PLAIN_TEXT' in {IS_HOME}/repository/conf/user-mgt.xml.
Eg: <Property name="passwordHashMethod">SHA</Property>
3) Set value of the 'MultiTenantRealmConfigBuilder' property to 'org.wso2.carbon.user.core.config.multitenancy.SimpleRealmConfigBuilder' in {IS_HOME}/repository/conf/user-mgt.xml.
Eg: <Property name="MultiTenantRealmConfigBuilder">org.wso2.carbon.user.core.config.multitenancy.SimpleRealmConfigBuilder</Property>
4) Enable JDBCTenantManager in tenant-mgt.xml and comment out the config section for CommonHybridLDAPTenantManager.
Once you did above configurations,you'll able to configure WSO2 Identity Server to an external jdbc user store successfully.
(1) http://docs.wso2.org/wiki/display/IS400/Configuring+an+External+JDBC+User+Store
I was able to resolve this.
Start with a clean install of WSO2 IS 4.0.0 if possible.
Apart from following the directions given in the documentation to setup a JDBC datastore; you need to do the following :
Enable JDBCTenantManager in tenant-mgt.xml and comment out CommonHybridLDAPTenantManager2
Set the enable property to false for EmbeddedLDAP in embedded-ldap.xml