无法启动新的WSO2-IS安装,权限错误

时间:2017-11-22 22:28:16

标签: wso2 wso2is

我在启动WSO2-IS 5.3.0时遇到了困难。

环境: Ubuntu 16.04主机上的Ubuntu 16.04 VM(Virtualbox)。

我没有太多额外信息,这是在新VM上的全新安装。我没有更改任何设置,除了https://docs.wso2.com/display/IS530/Installing+on+Linux+or+OS+X

中描述的内容
JAVA_HOME environment variable is set to /usr/java/jdk1.8.0_151
CARBON_HOME environment variable is set to /usr/local/bin/wso2is-5.3.0
rm: cannot remove '/usr/local/bin/wso2is-5.3.0/tmp/work': Permission denied
Using Java memory options: -Xms256m -Xmx1024m
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /usr/local/bin/wso2is-5.3.0/repository/logs/wso2carbon.log (Permission denied)
    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/local/bin/wso2is-5.3.0/repository/logs/patches.log (Permission denied)
    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/local/bin/wso2is-5.3.0/repository/logs/wso2carbon-trace-messages.log (Permission denied)
    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].
[2017-11-22 17:16:33,708]  WARN {org.wso2.carbon.server.Main} -  Cannot write wso2carbon.pid file
[2017-11-22 17:16:33,713] 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/local/bin/wso2is-5.3.0/tmp/jarsToBundles
    at org.wso2.carbon.server.util.Utils.copyFileToDir(Utils.java:494)
    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)
[2017-11-22 17:16:33,732] ERROR {org.wso2.carbon.server.extensions.DropinsBundleDeployer} -  Failed to create the directory: /usr/local/bin/wso2is-5.3.0/tmp/bundles_info_bcd7eb77-3295-4fac-8942-a5cde9d32434/bundles.info
java.io.IOException: Failed to create the directory: /usr/local/bin/wso2is-5.3.0/tmp/bundles_info_bcd7eb77-3295-4fac-8942-a5cde9d32434/bundles.info
    at org.wso2.carbon.server.extensions.DropinsBundleDeployer.updateBundlesInfoFile(DropinsBundleDeployer.java:323)
    at org.wso2.carbon.server.extensions.DropinsBundleDeployer.perform(DropinsBundleDeployer.java:87)
    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)
[2017-11-22 17:16:33,732] 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:345)
    at org.wso2.carbon.server.extensions.DropinsBundleDeployer.perform(DropinsBundleDeployer.java:87)
    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/local/bin/wso2is-5.3.0/tmp/bundles_info_bcd7eb77-3295-4fac-8942-a5cde9d32434/bundles.info
    at org.wso2.carbon.server.extensions.DropinsBundleDeployer.updateBundlesInfoFile(DropinsBundleDeployer.java:323)
    ... 9 more
[2017-11-22 17:16:33,735] ERROR {org.wso2.carbon.server.extensions.PatchInstaller} -  Error occurred while applying patches
java.io.IOException: No such file or directory
    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:218)
    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)
[2017-11-22 17:16:33,736] ERROR {org.wso2.carbon.server.extensions.EclipseIniRewriter} -  Error while writing to file null.ini
java.io.FileNotFoundException: /usr/local/bin/wso2is-5.3.0/repository/components/default/null.ini (Permission denied)
    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:73)
    at org.wso2.carbon.server.extensions.EclipseIniRewriter.perform(EclipseIniRewriter.java:55)
    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)
!SESSION 2017-11-22 17:16:33.950 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_151
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US

!ENTRY org.eclipse.osgi 4 0 2017-11-22 17:16:33.950
!MESSAGE Error reading configuration: Unable to create lock manager.
!STACK 0
java.io.IOException: Unable to create lock manager.
    at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:699)
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initFileManager(BaseStorage.java:226)
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initialize(BaseStorage.java:160)
    at org.eclipse.osgi.baseadaptor.BaseAdaptor.initializeStorage(BaseAdaptor.java:123)
    at org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:192)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:263)
    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.server.CarbonLauncher.launch(CarbonLauncher.java:108)
    at org.wso2.carbon.server.Main.launchCarbon(Main.java:160)
    at org.wso2.carbon.server.Main.main(Main.java:94)
    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)

3 个答案:

答案 0 :(得分:0)

尝试启动Identity Server的用户对/usr/local/bin/wso2is-5.3.0路径没有写入权限。

授予写入权限并启动包。如果您选择其他位置(例如/opt/wso2is-5.3.0

)会更好

答案 1 :(得分:0)

之前的答案(来自Abimaran)基本上是正确的。该进程需要根据正在运行的进程的用户写入其自己的文件系统/usr/local/bin/wso2is-5.3.0的权限。日志声称应用程序无法创建多个文件。

我有点担心您为产品安装选择的位置。 /usr/local/bin/通常用于二进制文件,具有非root权限的用户应该没有对该位置的写访问权。主要是如果启用了SELinux,尽管进程所有者是root用户,但您可能会受到来自公共进程的限制写访问。

我强烈建议你不要以root身份运行任何应用程序,如果它真的没必要的话。

我通常为第三方产品选择/ opt或/ srv等位置(因此您将拥有/opt/wso2is-5.3.0)。您可以创建一个专用用户(或者任何非root用户都可以),将安装目录的所有权授予用户并且您可以继续(比从/ usr / local / bin更好并以root身份运行)

答案 2 :(得分:0)

顺便说一句,你使用了错误版本的JDK(jdk1.8.0_151),这个版本与wso2iot有几个兼容性问题(去找_144)。

  

由于已知问题,请勿使用JDK1.8.0_151。此问题已在JDK 1.8.0_162-ea中修复。但是,使用JDK 1.8.0_144直到后面提到的版本发布