English 中文(简体)
从源头部署 sakai 后Tomcat 将不再开始
原标题:Tomcat will not start after deploying sakai from source

我遵循了这个网址上的指示:http://pmungai.wordpress.com/sakai-developer-guide/sakai-linux-cheatsheets/ ,能够编集和部署sakai,然而,在重新启动Tomcat之后,它将向我展示这一点:

root@ip-10-72-129-39:/opt/sakai# sh /opt/tomcat/bin/startup.sh
Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:        /usr/lib/jvm/java-1.6.0-openjdk-amd64
Using CLASSPATH:       /opt/tomcat/bin/bootstrap.jar

意思是 Tomcat 成功启动, 但是当我试图从浏览器打开 URL 时, 它会永远装载, 等待回应。 如果我试图关闭 Tomcat, 我就会得到 :

root@ip-10-72-129-39:/opt/sakai# sh /opt/tomcat/bin/shutdown.sh
Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:        /usr/lib/jvm/java-1.6.0-openjdk-amd64
Using CLASSPATH:       /opt/tomcat/bin/bootstrap.jar
2012-05-24 15:26:34,357 ERROR main org.apache.catalina.startup.Catalina - Catalina.stop:
java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
        at java.net.Socket.connect(Socket.java:546)
        at java.net.Socket.connect(Socket.java:495)
        at java.net.Socket.<init>(Socket.java:392)
        at java.net.Socket.<init>(Socket.java:206)
        at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)

Which happens when tomcat wasn t running to begin with. I was able to test that tomcat was running exactly before deploying sakai, and right after, it wasn t able to load a web page.

有人知道发生了什么吗?

问题回答

在启动 sakai 开发环境 I d sugges 尝试 sakai 2.8.x 演示之前,它将提供一个内部数据库,并具备大部分标准功能。

You should download the demo project from: https://testdrivesakai.com/portal

在习惯了流动、配置等之后, 您应该用自己的 sakai schema 来建立自己的实例。 但是当您这样做的时候, 还要确保您至少具备一些最起码的硬件设置, 并设置以下的 Tomcat 启动参数 :

-Xms512m
-Xmx1024m
-XX:PermSize=128m
-XX:MaxPermSize=256m
-XX:NewSize=192m
-XX:MaxNewSize=384m
-Djava.awt.headless=true
-Dhttp.agent=Sakai
-Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false
-Dsun.lang.ClassLoader.allowArraySyntax=true

同时确保您加入 sakai-dev 邮件列表, 您通过张贴问题获得更快的支持 。

The link to join the sakai dev-list: http://collab.sakaiproject.org/mailman/listinfo/sakai-dev

在我的经验中,这通常与数据库相关。 您是否在与 Maven 一起编译并部署到您的 Tomcat 启动时, 需要自动创建一堆表格。 在许多情况下, 这可能会因几个原因失败 。

我假设你使用 MySQL 因为hsqldb 有几个问题:

  • 有时初始的 Tomcat 发射可以关闭您的 Mysql 服务, 不允许它再次启动。 通常这是因为它无法在您的 my. cnf 文件指定的位置创建错误日志文件。 尝试评论这些日志被使用的任何实例并重新启动服务。 然后重试启动 。

  • 在 Linux 上使用“ #./ catalina.sh run ” 而不是引用启动的 shell 脚本。 这将生成第二个终端窗口, 并向您展示Tomcat 试图发射时发生的一切( 包括任何错误 ) 。

  • 查看您的数据库中是否有表格。 如果不是的话, 它会有一个数据库连接问题。 如果不是的话, 您应该拥有大约377张左右的表格, 取决于 Sakai 版本 。

  • 如果您在拖拉机日志中发现“ cache is not alive” 错误, 这是已知的种族状况。 您可能需要禁用表格自动生成( 假设表格已经从先前的启动试验中完成), 并应用此处概述的补丁 :

< a href=" "https://jira.sakaiproject.org/browse/KNL-1290" rel="nofollow" >KNL-1290

在没有错误信息可用的情况下, 很难诊断出您的问题 。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签