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

标签: java tomcat application output server jdk
31801人阅读 评论(3) 收藏 举报
分类:
The BASEDIR environment variable is not defined correctly

启动tomcat时报错
The BASEDIR environment variable is not defined correctly
This environment variable is needed to run this program
 这坑爹的中间件,害的我搞了半天 根据提示开始排查环境变量设置
 
 以下是JDK 与tomcat的环境变量
 
[root@localhost 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命了恍然大悟


[root@localhost 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/

[root@localhost bin]# nohup  sh catalina.sh  run & 
[1] 19004
[root@localhost bin]# nohup: appending output to “nohup.out”

[root@localhost 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终于起来了,坑爹啊 下次上传时一定要注意权限!



查看评论

The BASEDIR environment variable is not defined correctly This environment variable is needed to run

The BASEDIR environment variable is not defined correctly This environment variable is needed to run...
  • Sweblish
  • Sweblish
  • 2011-09-19 09:38:58
  • 4984

linux下tomcat启动报错The BASEDIR environment variable is not defined correctly

错误信息: The BASEDIR environment variable is not defined correctly  This environment variable is need...
  • Mchange
  • Mchange
  • 2014-02-20 16:16:22
  • 2353

The BASEDIR environment variable is not defined correctly This environment variable is needed to run this program

今天配一台服务器的时候,启动tomcat莫名其妙的报错说: The BASEDIR environment variable is not defined correctly This environ...
  • loocao
  • loocao
  • 2010-05-31 17:01:00
  • 5132

Linux下启动tomcat 6.x 提示The BASEDIR environment variable is not defined correctly

在新安装TOMCAT 6下,记得BIN下很多SH文件的权限要改下,否则显示 The BASEDIR environment variable is not defined correctly chm...
  • jackyrongvip
  • jackyrongvip
  • 2013-07-01 17:33:44
  • 675

mac下启动tomcat报错:The BASEDIR environment variable is not defined correctly

The BASEDIR environment variable is not defined correctly This environment variable is needed...
  • MyGameZone
  • MyGameZone
  • 2013-04-09 16:49:44
  • 2216

The JRE_HOME environment variable is not defined correctly This environment variable is needed 。。。

安装完jdk1.8,之前装的是1.7,启动tomcat9,怎么也启动不起来,命令行报出:The JRE_HOME environment variable is not defined correct...
  • u012414587
  • u012414587
  • 2017-09-19 17:28:20
  • 591

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

The BASEDIR environment variable is not defined correctly 启动tomcat时报错 The BASEDIR environment varia...
  • Evils798
  • Evils798
  • 2012-02-22 19:51:46
  • 31801

Apatch Tomcat8.0 的配置遇到问题全面总结

首先从官方网站http://tomcat.apache.org/下载
  • liuhaomatou
  • liuhaomatou
  • 2014-10-08 15:41:23
  • 62388

The BASEDIR environment variable is not defined correctly

启动tomcat时报错 The BASEDIR environment variable is not defined correctly This environment variable is n...
  • wxw520zdh
  • wxw520zdh
  • 2017-04-11 18:13:44
  • 192

linux启动tomcat异常:The BASEDIR environment variable is not defined correctly

linux启动tomcat异常:The BASEDIR environment variable is not defined correctly Linux下安装Tomca...
  • zljjava
  • zljjava
  • 2012-12-01 21:34:01
  • 6026
    个人资料
    持之以恒
    等级:
    访问量: 85万+
    积分: 9310
    排名: 2483
    简介
    此博客为笔者的DT工作记录,欢迎一起交流学习工作中的点滴,若博客文章观点存在原理的错误、纰漏,笔者非常欢迎各位不保留地指出
    最新评论