【问题标题】:Unable to integrate Tomcat with solr无法将 Tomcat 与 solr 集成
【发布时间】:2013-09-17 18:54:15
【问题描述】:

我正在尝试将 Tomcat-7 与 solr-4-4-0 集成。

我遵循了here 的所有指示。但是当导航到给定的 url 时,即“localhost:8080/manager/html”,连接就会超时。我的 solr 工作正常。我重新启动了 solr,但它没有帮助。

在运行 tomcat 时出现以下错误:

nish@styx:/usr/share/tomcat7/bin$ ./startup.sh
Using CATALINA_BASE:   /usr/share/tomcat7
Using CATALINA_HOME:   /usr/share/tomcat7
Using CATALINA_TMPDIR: /usr/share/tomcat7/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
touch: cannot touch `/usr/share/tomcat7/logs/catalina.out': No such file or directory
./catalina.sh: 389: ./catalina.sh: cannot create /usr/share/tomcat7/logs/catalina.out: Directory nonexistent

以下是我的 /var/log/tomcat/ 的内容

COMMAND   PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
apache2  1977     root    3u  IPv4  13706      0t0  TCP *:http-alt (LISTEN)
apache2 11743 www-data    3u  IPv4  13706      0t0  TCP *:http-alt (LISTEN)
apache2 11744 www-data    3u  IPv4  13706      0t0  TCP *:http-alt (LISTEN)
apache2 11745 www-data    3u  IPv4  13706      0t0  TCP *:http-alt (LISTEN)
apache2 11746 www-data    3u  IPv4  13706      0t0  TCP *:http-alt (LISTEN)
apache2 11747 www-data    3u  IPv4  13706      0t0  TCP *:http-alt (LISTEN)
apache2 19483 www-data    3u  IPv4  13706      0t0  TCP *:http-alt (LISTEN)
firefox 20476     nish   66u  IPv4 875088      0t0  TCP styx.local:54982->93.184.216.119:http-alt (SYN_SENT)
firefox 20476     nish   87u  IPv4 878854      0t0  TCP styx.local:54983->93.184.216.119:http-alt (SYN_SENT)
apache2 26468 www-data    3u  IPv4  13706      0t0  TCP *:http-alt (LISTEN)

有人可以帮我解决这个问题吗?谢谢

此外,localhost:8080 正在工作,但 lsof -i:8080 显示多个进程,我不确定 tomcat 是否是其中之一。

【问题讨论】:

    标签: java mysql apache tomcat solr


    【解决方案1】:

    您正在以 nish 用户身份运行启动脚本,并且您的 nish 用户无权访问 /usr/share/tomcat7 下面的错误日志中提到的目录,因此未启动 tomcat,因此出现超时错误

    要么以root身份运行tomcat,要么将tomcat放在可以创建所需目录的目录中

    【讨论】:

    • root@styx:/usr/share/tomcat7/bin# ./startup.sh 使用 CATALINA_BASE: /usr/share/tomcat7 使用 CATALINA_HOME: /usr/share/tomcat7 使用 CATALINA_TMPDIR: /usr/ share/tomcat7/temp 使用 JRE_HOME: /usr 使用 CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar touch: cannot touch `/usr/share/ tomcat7/logs/catalina.out':没有这样的文件或目录./catalina.sh:389:./catalina.sh:无法创建/usr/share/tomcat7/logs/catalina.out:目录不存在root@styx:/ usr/share/tomcat7/bin#
    猜你喜欢
    • 1970-01-01
    • 2012-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-04
    • 1970-01-01
    相关资源
    最近更新 更多