WSO2 ESB won't start and won't say why - wso2

I'm stuck on a problem with WSO2 ESB that I can't figure out and believe...
I've installed localy an ESB for testing my implementation. I added in my installation dir in the component library a custom mediator. I restarted the esb everything was fine but I had an error in my mediator. I stopped the ESB and wanted to start it again. No errors, no logs nothing just those informations in the logs:
C:\Tools\esb\wso2esb-5.0.0\bin>wso2server.bat
JAVA_HOME environment variable is set to C:\Program Files\Java\jre8
CARBON_HOME environment variable is set to C:\Tools\WSO2ES~1.0\bin\..
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support
log4j:WARN No appenders could be found for logger (org.wso2.securevault.commons.MiscellaneousUtil).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
After a while searching what could have happend I removed the jar. Same behavior. I created a brand new installation and started it -> same behavior.
I feel kind of lost as there's no logs, no errors, no timeout, nothing just those 5 lines of logs... Please help me!
ESB Version 5.0.0
Thanks and cheers,
Frédéric

I've found a part of an answer. Or at least I've a theory:
I setted in the lib directory my jar-with-dependencies => we should add only the compilated jar file without dependency and add external dependencies manually aswell in the lib folder! I had a Junit library in my jar-with-dependency therefore I became this log4j error probably.
For the problem with the new installation, somehow when you have started your esb inside a console in windows and you don't close it and switch to a new installation folder it still start the old installation instead of the new one. Therefore I though that the errors where still coming or something like this, probably because the JVM wasn't shutdown correctly. or at least it's what I expect!

I think that your CARBON_HOME should be C:\Tools\WSO2ES~1.0\ (without bin in the path).
Not sure if this can be the only reason.

Related

WSO2 APIM 4.1.0 installation issue - CARBON_HOME is set incorrectly or CARBON could not be located. Please set CARBON_HOME

I am trying to install WSO2 APIM 4.1.0 in Windows 11 Enterprise Edition.
Downloaded zip Achieve from wso2 site
JAVA_HOME already set as C:\Program Files\Java\jdk1.8.0_291
Started WSO2 API-M by navigating to the C:\Development_Avecto\WSO2APImServer\ORG\org_wso2am\wso2am-4.1.0\bin and executed api-manager.bat --run
after executing above command below ERROR shown
CARBON_HOME is set incorrectly or CARBON could not be located. Please set CARBON_HOME.
ERROR:
Even after setting up CARBON_HOME in Environment Variable value as C:\Development_Avecto\WSO2APImServer\ORG\org_wso2am\wso2am-4.1.0 getting same ERROR.
Already checked this related question
Update:
As per below suggestion, i have shorten directory of apim which is mentioned below and updated the same in Environment variable too.
C:\Development_Avecto\WSO2APIm\wso2apim-4.1.0\wso2am-4.1.0
Any help to resolve this installation issue?
These a few things you can try:
Try to run the product from a shorter directory path and long directory pats have issues in Windows OS
Check whether JAVA_HOME set properly
Run the command prompt with Admin privileges
Please try the above and share your feedback.
Can you check whether you have version.txt file in the <APIM_HOM>/bin directory?
If it is not there, add the file with the content WSO2 API Manager v4.1.0.
As per suggestion given by #Joy Rathnayake, I have shorten APIm directory and set CARBON_HOME in Environment Variable section which resolves my issue.
APIM Directory: C:\Development_Avecto\WSO2APIm\wso2am-4.1.0\bin
CARBON_HOME: C:\Development_Avecto\WSO2APIm\wso2am-4.1.0
JAVA_HOME: C:\Program Files\Java\jdk1.8.0_291
Now APIm started to run.
Special Thanks to #Joy Rathnayake

where are dependencies installed in the production server?

I am using Grails 2.2 and the plugins are really old. For some reason the dependencies are not resolving. I think it used to work because the plugins and files were in my local cache. From the documentation grails stores the dependencies locally in home/.grails/ivy-cache
With all these declarative dependencies, you may wonder where all the
JARs end up. They have to go somewhere after all. By default Grails
puts them into a directory, called the dependency cache, that resides
on your local file system at user.home/.grails/ivy-cache. You can
change this either via the settings.groovy file:
So the only option i can think of is to go to my remote server and find this directory to copy the dependencies to my local system. So where is this ivy-cache directory in production server? I dont seem to find it. Thanks for any help.
The same issue also I was working in the last week, from 15th January maven had decommissioned the http protocol where the URL "http://repo1.maven.org/maven2/" has changed to"https://repo1.maven.org/maven2/". Also need to check the grails maven to secured.
In BuilConfig.groovy, you can add the dependencies and the changed maven repo else in the _Events.groovy need to change the repo address to secure protocol.
If still you have protocol issue because of JDK8 try this -Dhttps.protocols=TLSv1.2 -Djdk.tls.client.protocols=TLSv1.2 in the path or bat file.

Error while installing WSO2 EMM on windows for Android

When I use the command wso2server.bat --run, the error is as follows
The filename, directory name, or volume label syntax is incorrect.
JAVA_HOME environment variable is set to C:\Program Files\java\jdk1.8.0_131
CARBON_HOME environment variable is set to C:\Users\MCCHEE~1\DOWNLO~1\WSO2EM~1.0\bin..
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Error: Could not find or load main class org.wso2.carbon.bootstrap.Bootstrap
I have read previous questions on stackoverflow regarding the issue. But no luck with finding any solution. Please help me resolve this. Thank you!
I dont know if this is an actual thing that could be done, but this is what I did.
Downloaded Wso2 IoT pacakge from WSO2 IoT downloads
replaced the bin folder of Wso2EMM with bin folder from Wso2Iot/core.
This helped me. No errors clean run.

IBM Message Broker 6.1 configuration manager doesn't start

After I installed fix pack 6.1.0-WS-MB-WinIA32-FP0011 the configuration manager throws a verification error at start.
It complains the java level:
Verification failed. The required Java level ''1.5.0'' was not found.
The MQSI_JREPATH is set in mqsiprofile and in the PATH.
Thank you.
EDIT:
javaw.exe -Xshareclasses:destroy in the Message Broker Toolkit Directory /jdk/jre/bin
The CVP process checks for a supported level of java before loading the copmonents. If you are sure that your java level is supported then you can disable this checking using the environment variable:
MQSI_DISABLE_CVP=1
Remember on windows you ened to set this in your mqsiprofile.cmd script and then start a new command window and restart the config manager.
On unix platforms you simply need to export the value in the shell before you start the config manager.
I would also advise doing a little problem determination, you can use the command "which java" on unix to determine the java installation being used. This should return a jre within the MQSI_FILEPATH folder
You can also do java -version to list the jre that the shell is picking up prior to launching the broker.
If after checking these you think that CVP is incorrectly identifying your java level as an unsupported version then I would suggest raising a PMR (but you can keep the env var set to diable CVP just to get you going.)

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,