Not able to start WSO2 ESB 4.0.3 in linux box - wso2

I have started wso2 4.0.3 in my local and tested It is working fine.
But same version I have installed in linux box,server not started it is showing below error. I used this command to start: nohup sh wso2server.sh
ERROR - DatabaseUtil Database Error - Table "UM_DIALECT" not found;
SQL statement:
SELECT COUNT(UM_ID) FROM UM_DIALECT WHERE UM_TENANT_ID=? [42102-140]
org.h2.jdbc.JdbcSQLException: Table "UM_DIALECT" not found; SQL statement:
SELECT COUNT(UM_ID) FROM UM_DIALECT WHERE UM_TENANT_ID=? [42102-140]

It should be working fine if you are using fresh binary pack (zip). Are you using different type of database other than H2? (H2 is the default database shipped with the binary pack)
if you are getting this error again, please start sever with -Dsetup option.
Ex : wso2server.sh -Dsetup
Thanks,
Chamara Silva

It happen because your WSO2 ESB is missing previous data from the previous database.
You can find your carbon database in
$wso2dir\repository\database\WSO2CARBON_DB.h2.db
Maybe there are files that missing or can't be copied to your linux environment (not only your carbon database but also other configuration files). Based on #ChamaraS's answer, i also suggest you to using fresh binary pack or create a backup pack with your custom configuration.
ps: i am just curious if you used Filezilla to transfer those files (face same problem here)

Related

WSO2 APIM 3.1.0 doesn't start and gives JAVA_HOME missing error when installed via installer

I have installed WSO2 APIM 3.1.0 via product installer on my local. As, in the documentation it's written "If you are using the product installer to install the product, by default, WSO2 API-M is installed with OpenJDK, which allows you to run the product as soon as it is installed.", so, i have not set JAVA_HOME explicitly. But when i run the wso2server.bat command, it gives an error as shown below. Need help with this issue.
I tried by setting JAVA_HOME to jdk 11 that comes with the APIM 3.1.0 installer. But when trying to start the server getting the error as seen below:

WSO2 IS - "The system cannot find the path specified" when trying to start server

I set the path "JAVA_HOME" and installed WSO2 IS 5.6.0 x64 on Windows 2016 Server. After the installation, I try to start the server via "wso2server.bat", but I get the message "The system cannot find the path specified. The batch file cannot be found". After doing this operation, when I looked into the folder where the server was installed, I noticed that all files are deleted.
Am I doing something wrong? How to correctly run WSO2 Identity Server?
Thank you for pointing this issue with WSO2 Windows Product Installers. The issue is resolved and updated product installers are now available in WSO2 website.
You can download WSO2 IS 5.6.0 x64 Windows Installer from here. Then install WSO2 IS 5.6.0 on your machine using downloaded '.msi' file. After installation, start the server by clicking on the shortcut that build by the installer. You can find WSO2 IS 5.6.0 shortcut in following location.
Start Menu -> All apps -> WSO2
or you can search "Identity Server 5.6.0" in Windows search and click on the shortcut. This will start the WSO2 Identity Server on your machine.
For new WSO2 Products Installers you do not need to set JAVA_HOME separately. It contain jdk1.8.0_192 and if JAVA_HOME is not set, it will automatically set JAVA_HOME to jdk1.8.0_192 and start the WSO2 Product.
This blog could be a help for you to understand the installation progress.
For me the problem was solved with not downloading the windows x64 installer but rather the binary
wso2is 5.6.0 binary.
After downloading you just open bin directory and run the wso2server.bat file.
If you need to make it windows service use the NSSM

Issue with API Manager migration from 1.8.0 to 2.1.0: IS migration client 5.1.0 does nothing

I am doing a migration from APIM 1.8.0 to APIM 2.1.0 and facing an issue with one of migration tools.
Naturally, I am following the steps described in migration guide: https://docs.wso2.com/display/AM210/Upgrading+from+the+Previous+Release
My OS is Windows 7 Enterprise x64, Java - Oracle JDK 7u67, DB - MySQL 5.7, user store - LDAP.
I downloaded WSO2 Identity Server 5.1.0 Migration Client (org.wso2.carbon.is.migrate.client-5.1.0-migration.zip SHA1: ece8ff9a33167751268d205293cc1404fbe4c567) from docs.wso2.com/download/attachments/50518205/org.wso2.carbon.is.migrate.client-5.1.0-migration.zip?version=2&modificationDate=1470811755000&api=v2 as described in guide metioned above (step 7).
Then I unzipped it and put necessary DB scripts into directory APIM_2.1.0_HOME/dbscripts/ (steps 7-a, 7-b) and JAR file into directory APIM_2.1.0_HOME/repository/components/dropins/ (step 7-c).
After that when I try to migrate Identity and User Store DBs (step 9) using IS migration client starting APIM instance with command
wso2server.bat -Dmigrate -DmigrateIdentityDB -Dcomponent=identity
it looks like nothing happens.
I've even configured a logger for this client in APIM_2.1.0_HOME/repository/conf/log4j.properties as
log4j.logger.org.wso2.carbon.is.migration=DEBUG
but only two DEBUG rows appear in logs telling me that migration component activated successfully:
INFO {org.wso2.carbon.databridge.core.internal.DataBridgeDS} - Successfully deployed Agent Server {org.wso2.carbon.databridge.core.internal.DataBridgeDS}
DEBUG {org.wso2.carbon.is.migration.client.internal.ISMigrationServiceComponent} - Setting RealmService to WSO2 IS Migration component {org.wso2.carbon.is.migration.client.internal.ISMigrationServiceComponent}
DEBUG {org.wso2.carbon.is.migration.client.internal.ISMigrationServiceComponent} - WSO2 IS migration bundle is activated {org.wso2.carbon.is.migration.client.internal.ISMigrationServiceComponent}
INFO {org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService} - Configured Registry in 63ms {org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService}
Moreover, I looked at the source code of the client at github.com/wso2/product-is/tree/v5.1.0/modules/migration/migration-5.0.0_to_5.1.0/wso2-is-migration-client, especially at class org.wso2.carbon.is.migration.client.internal.ISMigrationServiceComponent and its method activate(ComponentContext context), which in fact does nothing in contrast to similar class github.com/wso2/product-apim/blob/v2.1.0/modules/distribution/resources/migration/wso2-api-migration-client/src/main/java/org/wso2/carbon/apimgt/migration/client/internal/APIMMigrationServiceComponent.java from another migration client, also provided in migration guide mentioned above (step 4).
And finally, I noticed that relevant code was removed in one of the commits: "removing the migration from pack and adding script changes" https://github.com/wso2/product-is/pull/362/files#diff-789b1c66c0ca3e073080a2b8e6c27834L49
So, my questions are:
Why were those lines of code removed?
And the main question is how to trigger migration client properly? What did I do wrong?
I would appreciate any kind of help.
It was an issue with the migration document. Documentation is now changed. you will have to do a migration to 2.0.0 from 1.8.0 and then to 2.1.0.
https://docs.wso2.com/display/AM210/Upgrading+from+the+Previous+Release#8910

wso2 BAM hive ExecDriver error

Installed WSO2 BAM and AM today and I'm trying to get the API usage statistics to work. I can submit API requests that get authenticated and passed through correctly, but no statistics.
From API UI when I go to Statistics I get:
"No data found. Check BAM server connectivity ..."
The BAM server is up and running and I can login to it.
However in the BAM logs I see this:
ERROR {org.apache.hadoop.hive.ql.exec.ExecDriver} - Exception: Cannot run program "C:\Program" (in directory "C:\Temp\wso2\wso2bam-2.3.0"): CreateProcess error=2, The system cannot find the file specified {org.apache.hadoop.hive.ql.exec.ExecDriver}
It looks like BAM is trying to launch something in "Program Files" but didn't escape the command properly in windows. (I suspect Java, since JAVA_HOME is pointing to a sub-directory of Program Files.)
I'm using BAM 2.3.0, AM 1.4.0 with JDK 1.7 on Windows 7.
Would this be why there is no data? Is there a workaround to the escaping issue?
Thanks,
Chris
To run BAM in windows you need to install, Cygwin tool. If you have linux OS, run BAM in linux.
I had the same problem, tried double quoting the JAVA_HOME variable however BAM then through out the following on startup
Files\Java\jdk1.6.0_45"" was unexpected at this time.
Only solution I found was to re-install java into a directory without spaces
Note - Am using version 2.0.1 of BAM
Had the same problem with WSO2 BAM 2.4.0.
Also linked with the path to JDK.
For me, no need to reinstall the JDK but just change the JAVA_HOME environment variable to use the short version of the path (C:\Progra~1\Java... instead of C:\Program Files\Java...).
Cygwin is installed for me in a path with no space c:\cygwin. Did not test if this is mandatory. Be also sure to install all the cygwin package required in the WSO2 documentation.
regards,

Unable to start ws02 application server on Windows - error "The system cannot find the batch label specified - commandLifecycle"

I downloaded wso2 application server 5.0.0. I placed it on my windows server and attempted to execute wso2server.bat --run. When I do that, I receive this error:
The system cannot find the batch label specified - commandLifecycle
If I look in the wso2server.bat file, I see that the commandLifecycle label doesn't exist.
Has anyone else run into this same issue?
Edit: I just tried running 4.1.2 and I did not have the same problem.
I just run the shell: wso2server.bat without the parameter [--run] and it start ok.