TOMCAT-报错The BASEDIR environment variable is not defined correctly

<span style="font-size:18px;">The BASEDIR environment variable is not defined correctly</span>  

启动tomcat时报错
<strong>The BASEDIR environment variable is not defined correctly
This environment variable is needed to run this program</strong>
 这坑爹的中间件,害的我搞了半天 根据提示开始排查环境变量设置  

 以下是JDK 与tomcat的环境变量  

[[email protected] bin]# more /etc/profile  

JAVA_HOME=/usr/local/src/jdk1.6.0_32
JRE_HOME=$JAVA_HOME/jre
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar
export JAVA_HOME CLASSPATH  

CATALINA_1_BASE=/apache-tomcat-6.0.35/
CATALINA_1_HOME=/apache-tomcat-6.0.35/
export CATALINA_1_BASE  CATALINA_1_HOME  

没啥错误,这害得我狠被动啊,无意中打了一个ls命了恍然大悟  

[[email protected] bin]# ls -al
总计 688
d-w------- 2 root root   4096 02-22 14:53 .
drwxr-xr-x 9 root root   4096 02-22 14:53 ..
--w------- 1 root root  22705 11-28 18:20 bootstrap.jar
--w------- 1 root root  11830 11-28 18:20 catalina.bat
--w------- 1 root root  17708 11-28 18:20 catalina.sh
--w------- 1 root root   2374 11-28 18:20 catalina-tasks.xml
--w------- 1 root root  24172 11-28 18:20 commons-daemon.jar
--w------- 1 root root 199623 11-28 18:20 commons-daemon-native.tar.gz
--w------- 1 root root   1342 11-28 18:20 cpappend.bat
--w------- 1 root root   2108 11-28 18:20 digest.bat
--w------- 1 root root   1689 11-28 18:20 digest.sh
--w------- 1 root root  55828 02-22 16:13 nohup.out
--w------- 1 root root   3150 11-28 18:20 setclasspath.bat
--w------- 1 root root   4114 11-28 18:20 setclasspath.sh
--w------- 1 root root   2108 11-28 18:20 shutdown.bat
--w------- 1 root root   1628 11-28 18:20 shutdown.sh
--w------- 1 root root   2109 11-28 18:20 startup.bat
--w------- 1 root root   2023 11-28 18:20 startup.sh
--w------- 1 root root  32277 11-28 18:20 tomcat-juli.jar
--w------- 1 root root 249259 11-28 18:20 tomcat-native.tar.gz
--w------- 1 root root   3479 11-28 18:20 tool-wrapper.bat
--w------- 1 root root   3472 11-28 18:20 tool-wrapper.sh
--w------- 1 root root   2113 11-28 18:20 version.bat
--w------- 1 root root   1632 11-28 18:20 version.sh  

全部没有执行权限,赶紧赋权限
# chmod  777 -R bin/  

[[email protected] bin]# nohup  sh catalina.sh  run &
[1] 19004
[[email protected] bin]# nohup: appending output to “nohup.out”  

[[email protected] bin]# tail -f nohup.out
2012-2-22 16:26:47 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory examples
2012-2-22 16:26:47 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2012-2-22 16:26:47 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2012-2-22 16:26:47 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/15  config=null
2012-2-22 16:26:47 org.apache.catalina.startup.Catalina start
信息: Server startup in 466 m  

OK了 tomcat终于起来了,坑爹啊 下次上传时一定要注意权限!

  

时间: 2024-12-28 16:51:09

TOMCAT-报错The BASEDIR environment variable is not defined correctly的相关文章

The BASEDIR environment variable is not defined correctly

今天在虚拟机的linux系统中部署一个tomcat,运行sh startup.sh,提示如下信息: This environment variable is needed to run this program. 从字面意思,貌似是关于环境变量的设置问题,一开始是以为是jdk环境变量没有设置好,于是就去检查,并运行java -version也显示正常,于是排除这个可能性,接着去检查tomcat的环境变量,检查也无异常.这个tomcat程序包以前是用过,是正常的,按道理在其它环境也应该无问题,后来

在idea启动tomcat出现The JAVA_HOME environment variable is not defined correctly的解决

情况:某套代码是用jdk 1.6编译,然后电脑的JAVA_HOME系统变量配的是jdk1.7的,在tomcat启动时报错 The JAVA_HOME environment variable is not defined correctly,中文意思是JAVA_HOME定义不正确,去系统变量看指向的是jdk 1.7,当然不正确了,那如何为这个tomcat单独指定一个JAVA_HOME? 方法: Tomcat的jre配置,原来是 改成jdk路径(也就是去掉jre) PS:在myeclipse里to

windows tomcat 启动报错TOMCAT JAVA_HOME or JRE_HOME environment variable is not defined correctly

问题描述: TOMCAT JAVA_HOME or JRE_HOME environment variable is not defined correctly 报错信息如下:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program;提示找不到java_home各jre

2个问题,解决tomcat启动一闪而过和运行tomcat/bin目录下的startup.bat时报错(the CATALINA_HOME environment variable is not defined correctly)

1.除手动使用开始菜单自启动或者程序启动TOMCAT时TOMCAT一闪而过,这时候是发生了错误,这时候我们打开BIN目录下的“startup.bat”文件,编辑,在结尾添加pause命名,这样在CMD下执行startup.bat时就会出错停止,这时候我们就知道是什么错误了. 2.运行tomcat/bin目录下的startup.bat时报错:the CATALINA_HOME environment variable is not defined correctly 碰到这个问题时的第一反应是添加

Tomcat the java_home environment variable is not defined correctly

今天打开idea运行Tomcat出现了报错,如下: the java_home environment variable is not defined correctly This environment variable is needed to run this program NB: java_home should point to a jdk not a jre 1.检查你的jdk 在cmd(本人使用Windows8)下输入 javac -version 和 java -version

JRE_HOME environment variable is not defined correctly This environment variableis needed to run this program

已经安装了JDK1.7 和对应JRE 安装了tomcat8 都是解压版 并设置了JAVA_HOME.JRE_HOME 但Tomcat在启动过程中找不到 错误: the JRE_HOME environment variable is not defined correctly This environment variableis needed to run this program 原因: startup.ba脚本调用了catalina.bat 所以需要更改catalina.bat中这部分值为

The JAVA_HOME environment variable is not defined correctly的错误

The JAVA_HOME environment variable is not defined correctlyThis environment variable is needed to run this programNB: JAVA_HOME should point to a JDK not a JRE centos 7 安装maven 执行mvn -v  的时候报这个错误  发现是 java_home 的路径不对 which java  找到java 的执行目录 修改下 /etc

TOMCAT闪退。cmd执行startup.bat保错:the CATALINA_HOME environment variable is not defined correctly

从上图可以看出 是我们没有设置CATALINA_HOME变量 于是我设置了这个变量之后 ,再次重启,ok了

Idea报错Check $M2_HOME environment variable and mvn script match.

-Dmaven.multiModuleProjectDirectory=$M2_HOME