[英]can't run tomcat java: Permission denied
When I type sh startup.sh
in terminal ubuntu
I find below log and my tomcat server doesn't start. 当我在终端
ubuntu
键入sh startup.sh
,我在下面的日志中找到了我的tomcat服务器未启动。 I can run server
from eclipse ide
but I can't run it from terminal.sudo sh startup.sh worked. 我可以从
eclipse ide
运行server
,但不能从terminal.sudo运行start.sh。 Thanks to all of you to provide me answer previously It is worked fine. 感谢大家以前向我提供的答复一切正常。 Now another problem is that mvn clean install is not worked previously it is also worked now it told The program 'mvn' can be found in the following packages: * maven * maven2 This also work fine in eclipse ?
现在,另一个问题是mvn clean install以前无法运行,现在它也可以正常运行,它告诉程序“ mvn”程序可以在以下软件包中找到:* maven * maven2在eclipse中也可以正常工作吗?
INFO: Server startup in 5732 ms
20 Jan, 2014 7:39:54 PM org.apache.coyote.http11.AbstractHttp11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
20 Jan, 2014 7:39:54 PM org.apache.coyote.ajp.AjpProtocol pause
INFO: Pausing Coyote AJP/1.3 on ajp-8009
20 Jan, 2014 7:39:55 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
./catalina.sh: 1: eval: /opt/jdk1.6.0_23/bin/java: Permission denied
./catalina.sh: 1: eval: /opt/jdk1.6.0_23/bin/java: Permission denied
The catalina.sh
script starts the tomcat instance by running something like this: catalina.sh
脚本通过运行以下命令来启动tomcat实例:
eval "\"$_RUNJAVA\"" <lots of options> ...
org.apache.catalina.startup.Bootstrap "$@" start \
>> "$CATALINA_OUT" 2>&1 "&"
where $_RUNJAVA
has previously been set to the pathname to a Java executable. 其中
$_RUNJAVA
先前已设置为Java可执行文件的路径名。
Now this is apparently failing, saying "/opt/jdk1.6.0_23/bin/java: Permission denied" 现在,这显然失败了,并说“ /opt/jdk1.6.0_23/bin/java:权限被拒绝”
This can mean a few things: 这可能意味着几件事:
/opt/jdk1.6.0_23/bin/java
file does not exist with that pathname. /opt/jdk1.6.0_23/bin/java
文件。 (This could possibly be due to a broken symlink ...) /opt/jdk1.6.0_23/bin/java
file does exist, but it is not executable by the current (effective) user. /opt/jdk1.6.0_23/bin/java
文件确实存在,但是当前(有效)用户无法执行。 /opt/jdk1.6.0_23/bin/java
file does exist, but the current user is barred from accessing it because of permissions on some directory in the pathname. /opt/jdk1.6.0_23/bin/java
文件确实存在,但是由于路径名中某些目录的权限,当前用户被禁止访问它。 So ...: 所以...:
If the problem is that you are using the wrong Java installation, then the "fix" will depend on how you are running catalina.sh
. 如果问题是您使用了错误的Java安装,则“修复”将取决于您如何运行
catalina.sh
。 If you are running it by hand from a shell, make sure that JAVA_HOME
is set and exported correctly in your shell. 如果从外壳手动运行它,请确保已设置
JAVA_HOME
并将其正确导出到外壳中。 If you are running catalina.sh
from an "init" script, check what the script is doing ... 如果您通过“ init”脚本运行
catalina.sh
,请检查该脚本在做什么...
(It is unlikely that this is anything to do with permissions on catalina.sh
itself.) (这不太可能与
catalina.sh
本身的权限有关。)
sudo sh startup.sh worked. 须藤sh startup.sh工作。 Thanks to all of you to provide me answer previously It is worked fine with only sh startup.sh.
谢谢大家以前给我的答复只有sh startup.sh可以正常工作。 It is java permision problem i find now i set full permission on java it is work with sh startup.sh as well.
我发现这是java渗透问题,现在我对java设置了完全权限,它也可以与sh startup.sh一起使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.