TOMCAT-报错The BASEDIR environment variable is not defined correctly
Posted 大数据从业者
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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终于起来了,坑爹啊 下次上传时一定要注意权限!
以上是关于TOMCAT-报错The BASEDIR environment variable is not defined correctly的主要内容,如果未能解决你的问题,请参考以下文章
Tomcat 报错:The origin server did not find a current representation for the target resource
tomcat启动项目报错:The specified JRE installation does not exist
tomcat server 报错之 More than the maximum allowed number of cookies
ubuntu下IDEA配置tomcat报错Warning the selected directory is not a valid tomcat home
Tomcat报错:The valid characters are defined in RFC 7230 and RFC 3986