você não precisa começar explicitamente sh (quando o script inclui um hashbang ), que não reutilize as variáveis de ambiente atualmente definidas. Então tente
./wso2server.sh
ou
sudo ./wso2server.sh
Estou ocupada instalando o WS02 na edição do servidor LTS do Ubuntu 16.04, neste momento estou enfrentando alguns problemas com relação às permissões. Acho que abaixo está o meu log de terminal. Eu verifiquei o diretório com $ JAVA_HOME e JAVA -Version o que mais posso verificar ou solucionar problemas? Eu também chequei whoami com sudo e sem.
ws02@ws02:~$ $JAVA_HOME
bash: /usr/java/jdk1.8.0_91/: Is een map
ws02@ws02:~$ java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
ws02@ws02:~$ cd /usr/bin/wso2/wso2emm-2.0.1/bin
ws02@ws02:/usr/bin/wso2/wso2emm-2.0.1/bin$ sh wso2server.sh
JAVA_HOME environment variable is set to /usr/java/jdk1.8.0_91/
CARBON_HOME environment variable is set to /usr/bin/wso2/wso2emm-2.0.1
rm: kan '/usr/bin/wso2/wso2emm-2.0.1/tmp/work' niet verwijderen: Toegang geweigerd
Using Java memory options: -Xms256m -Xmx1024m
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /usr/bin/wso2/wso2emm-2.0.1/repository/logs/wso2carbon.log (Toegang geweigerd)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:262)
at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:108)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1025)
at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:844)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:541)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:292)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:269)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:655)
at org.wso2.carbon.server.Main.<clinit>(Main.java:34)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:60)
at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:45)
log4j:ERROR Either File or DatePattern options are not set for appender [CARBON_LOGFILE].
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /usr/bin/wso2/wso2emm-2.0.1/repository/logs/patches.log (Toegang geweigerd)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:672)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:516)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:262)
at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:108)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1025)
at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:844)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:541)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:292)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:269)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:655)
at org.wso2.carbon.server.Main.<clinit>(Main.java:34)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:60)
at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:45)
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /usr/bin/wso2/wso2emm-2.0.1/repository/logs/wso2carbon-trace-messages.log (Toegang geweigerd)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:672)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:516)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:262)
at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:108)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1025)
at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:844)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:541)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:292)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:269)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:655)
at org.wso2.carbon.server.Main.<clinit>(Main.java:34)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:60)
at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:45)
log4j:ERROR Either File or DatePattern options are not set for appender [CARBON_TRACE_LOGFILE].
[2016-05-06 11:50:30,113] WARN {org.wso2.carbon.server.Main} - Cannot write wso2carbon.pid file
[2016-05-06 11:50:30,121] ERROR {org.wso2.carbon.server.extensions.FragmentBundleCreator} - Error occured while creating the log4j prop fragment bundle.
java.io.IOException: Fail to create the directory: /usr/bin/wso2/wso2emm-2.0.1/tmp/jarsToBundles
at org.wso2.carbon.server.util.Utils.copyFileToDir(Utils.java:492)
at org.wso2.carbon.server.extensions.FragmentBundleCreator.perform(FragmentBundleCreator.java:70)
at org.wso2.carbon.server.Main.invokeExtensions(Main.java:142)
at org.wso2.carbon.server.Main.main(Main.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:63)
at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:45)
[2016-05-06 11:50:30,132] ERROR {org.wso2.carbon.server.extensions.DropinsBundleDeployer} - Failed to create the directory: /usr/bin/wso2/wso2emm-2.0.1/tmp/bundles_info_e05b517c-df68-4d71-9158-99d271db6dea/bundles.info
java.io.IOException: Failed to create the directory: /usr/bin/wso2/wso2emm-2.0.1/tmp/bundles_info_e05b517c-df68-4d71-9158-99d271db6dea/bundles.info
at org.wso2.carbon.server.extensions.DropinsBundleDeployer.updateBundlesInfoFile(DropinsBundleDeployer.java:312)
at org.wso2.carbon.server.extensions.DropinsBundleDeployer.perform(DropinsBundleDeployer.java:78)
at org.wso2.carbon.server.Main.invokeExtensions(Main.java:146)
at org.wso2.carbon.server.Main.main(Main.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:63)
at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:45)
[2016-05-06 11:50:30,132] ERROR {org.wso2.carbon.server.extensions.DropinsBundleDeployer} - Error occured while deploying bundles in the dropins directory
java.lang.Exception: Error occurred while updating the bundles.info file.
at org.wso2.carbon.server.extensions.DropinsBundleDeployer.updateBundlesInfoFile(DropinsBundleDeployer.java:334)
at org.wso2.carbon.server.extensions.DropinsBundleDeployer.perform(DropinsBundleDeployer.java:78)
at org.wso2.carbon.server.Main.invokeExtensions(Main.java:146)
at org.wso2.carbon.server.Main.main(Main.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:63)
at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:45)
Caused by: java.io.IOException: Failed to create the directory: /usr/bin/wso2/wso2emm-2.0.1/tmp/bundles_info_e05b517c-df68-4d71-9158-99d271db6dea/bundles.info
at org.wso2.carbon.server.extensions.DropinsBundleDeployer.updateBundlesInfoFile(DropinsBundleDeployer.java:312)
... 9 more
[2016-05-06 11:50:30,136] ERROR {org.wso2.carbon.server.extensions.PatchInstaller} - Error occurred while applying patches
java.io.IOException: Bestand of map bestaat niet
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1012)
at org.wso2.carbon.server.util.PatchUtils.processPatches(PatchUtils.java:204)
at org.wso2.carbon.server.extensions.PatchInstaller.perform(PatchInstaller.java:49)
at org.wso2.carbon.server.Main.invokeExtensions(Main.java:149)
at org.wso2.carbon.server.Main.main(Main.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:63)
at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:45)
[2016-05-06 11:50:30,136] ERROR {org.wso2.carbon.server.extensions.EclipseIniRewriter} - Error while writing to file null.ini
java.io.FileNotFoundException: /usr/bin/wso2/wso2emm-2.0.1/repository/components/default/null.ini (Toegang geweigerd)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at java.io.FileWriter.<init>(FileWriter.java:90)
at org.wso2.carbon.server.extensions.EclipseIniRewriter.rewriteFile(EclipseIniRewriter.java:77)
at org.wso2.carbon.server.extensions.EclipseIniRewriter.perform(EclipseIniRewriter.java:57)
at org.wso2.carbon.server.Main.invokeExtensions(Main.java:152)
at org.wso2.carbon.server.Main.main(Main.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:63)
at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:45)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:63)
at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:45)
Caused by: java.lang.NullPointerException
at org.wso2.carbon.server.extensions.EclipseIniRewriter.rewriteFile(EclipseIniRewriter.java:84)
at org.wso2.carbon.server.extensions.EclipseIniRewriter.perform(EclipseIniRewriter.java:57)
at org.wso2.carbon.server.Main.invokeExtensions(Main.java:152)
at org.wso2.carbon.server.Main.main(Main.java:92)
... 6 more
ws02@ws02:/usr/bin/wso2/wso2emm-2.0.1/bin$ sudo sh wso2server.sh
[sudo] wachtwoord voor ws02:
Error: JAVA_HOME is not defined correctly.
CARBON cannot execute java
Espero conseguir ajuda para continuar a instalação, É um problema de permissão? Problema de caminho? Problema certo do usuário? A única coisa que fiz foi instalar o Ubuntu GUI no servidor por causa deste problema.
Felicidades
PS abaixo é mais informações sobre o software que eu quero instalar e o pré-requisito sobre isso.
- https://docs.wso2.com/display/EMM100/Installing+on+Linux+or+OS+X
- https://docs.wso2.com/display/EMM100/Prerequisites