由于权限问题软件包安装失败

由于权限问题软件包安装失败

我正忙着在 Ubuntu 16.04 LTS 服务器版本上安装 WS02,现在我遇到了一些与权限有关的问题,我猜下面是我的终端日志。我使用 $JAVA_HOME 和 JAVA -Version 检查了目录,我还能验证或排除哪些故障?我还使用 sudo 和不使用 sudo 检查了 whoami。

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

希望得到一些帮助,以便我可以继续安装,是权限问题吗? PATH 问题? 用户权限问题? 由于这个问题,我唯一能做的就是在服务器上安装 Ubuntu GUI。

干杯

下面是关于我想要安装的软件及其先决条件的更多信息。

- https://docs.wso2.com/display/EMM100/Installing+on+Linux+or+OS+X
- https://docs.wso2.com/display/EMM100/Prerequisites

答案1

你不需要明确启动 sh (当脚本包含哈希邦),这将不会重用当前设置的环境变量。因此尝试

./wso2server.sh

或者

sudo ./wso2server.sh

相关内容