Liferay安装但localhost:8080返回“没有收到数据”

时间:2013-10-21 12:43:35

标签: java macos tomcat liferay

我已经用tomcat下载了liferay包 我将它解压缩到我的mac Applications/Administrating/liferay....
我已经开始./startup.sh了 在exnd我得到:INFO: Server startup in 47781 ms
但是当我在浏览器中打开localhost:8080时,我会得到"No data received",就像没有安装任何网站一样 这是整个日志:

Using CATALINA_BASE:   /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40
Using CATALINA_HOME:   /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40
Using CATALINA_TMPDIR: /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/temp
Using JRE_HOME:        /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Using CLASSPATH:       /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/bin/bootstrap.jar:/Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/bin/tomcat-juli.jar
STSiMacVVU:bin vladimirvucetic$ tail -f ../logs/catalina.out 
Oct 21, 2013 2:30:04 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Oct 21, 2013 2:30:04 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 665 ms
Oct 21, 2013 2:30:04 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Oct 21, 2013 2:30:04 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.40
Oct 21, 2013 2:30:04 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/conf/Catalina/localhost/ROOT.xml
Loading jar:file:/Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
Loading jar:file:/Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
Oct 21, 2013 2:30:16 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
14:30:21,037 INFO  [localhost-startStop-1][DialectDetector:71] Determine dialect for HSQL Database Engine 2
14:30:21,040 WARN  [localhost-startStop-1][DialectDetector:86] Liferay is configured to use Hypersonic as its database. Do NOT use Hypersonic in production. Hypersonic is an embedded database useful for development and demo'ing purposes. The database settings can be changed in portal-ext.properties.
14:30:21,084 INFO  [localhost-startStop-1][DialectDetector:136] Found dialect org.hibernate.dialect.HSQLDialect
14:30:36,629 WARN  [localhost-startStop-1][PDFProcessorImpl:235] Liferay is not configured to use ImageMagick. For better quality document and image previews, install ImageMagick and enable it in portal-ext.properties or in the Server Administration control panel at: http://<server>/group/control_panel/manage/-/server/external-services
Starting Liferay Portal Community Edition 6.1.2 CE (Paton / Build 6102 / August 2, 2013)
14:30:41,605 INFO  [localhost-startStop-1][BaseDB:478] Database supports case sensitive queries
14:30:42,056 INFO  [localhost-startStop-1][ServerDetector:169] Server supports hot deploy
14:30:42,064 INFO  [localhost-startStop-1][PluginPackageUtil:1046] Reading plugin package for the root context
14:30:44,914 INFO  [localhost-startStop-1][AutoDeployDir:144] Auto deploy scanner started for /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/deploy
Oct 21, 2013 2:30:48 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'Remoting Servlet'
Oct 21, 2013 2:30:49 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/webapps/marketplace-portlet
Oct 21, 2013 2:30:50 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/webapps/portal-compat-hook
Oct 21, 2013 2:30:51 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/webapps/resources-importer-web
Oct 21, 2013 2:30:51 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Applications/Administrating/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/webapps/welcome-theme
Oct 21, 2013 2:30:52 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Oct 21, 2013 2:30:52 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 47781 ms

我在这里缺少什么?

6 个答案:

答案 0 :(得分:1)

看起来Liferay正常启动(但添加更多信息 - catalina.out或其他,正如游戏玩家在评论中所要求的那样)

此外:

  • 检查防火墙设置(8080可能被阻止)
  • 你的lsof输出列出了IPV6(自从我解释lsof以来已经很久了 输出和命令行 - 这可能是正常的,也可能不是。你不说 如果你尝试IPV4连接)
  • 尝试从该服务器连接浏览器。如果它只是一个shell 服务器,在http://localhost:8080/

    上使用w3m或lynx

    #user nobody;     worker_processes 1;

    events {
        worker_connections  1024;
    }
    
    
    http {
        passenger_root /var/lib/gems/1.9.1/gems/passenger-4.0.5;
        passenger_ruby /usr/bin/ruby1.9.1;
        passenger_max_pool_size 10;
        include       mime.types;
        default_type  application/octet-stream;
        sendfile        on;
        keepalive_timeout  65;
    
        gzip  on;
    
        server {
          listen       80;
          server_name  localhost;
          access_log /var/www/access.log;
          error_log  /var/www/error.log;
    
         location / {
            root   /var/www/demo/public;
            passenger_enabled on;
            rails_env production;
         }
    
         error_page   500 502 503 504  /50x.html;
         location = /50x.html {
            root   html;
        }
    }
    

答案 1 :(得分:0)

您尚未配置连接器端口8080,因此您将无法获得响应。您已配置的唯一连接器是端口8009上的AJP,可以从日志中看到。

Oct 21, 2013 2:30:04 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]

答案 2 :(得分:0)

如果您从Eclipse运行服务器,请转到服务器 - &gt;端口并为HTTP / 1.1设置8080 enter image description here

如果您正在运行独立的Tomcat,请转到并编辑tomcat / conf / server.xml并设置

<Connector URIEncoding="UTF-8" connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>

确保允许从服务器端口8080,并且不从其他应用程序使用它 当服务器启动时,您应该能够在日志中读取:

org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]

答案 3 :(得分:0)

我的期望是在日志中找到它:

24.10.2013 13:43:14 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
24.10.2013 13:43:14 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]

这将指示8080的协议处理程序启动。

我建议找到问题的根本原因是:

  • 在启动Liferay之前访问localhost:8080 。这可能会给您相同的结果,表明在端口8080上运行了一些其他软件。
  • 如果这没有帮助:再次下载Liferay tomcat软件包,将其保持解压缩到一个新位置,同时运行那个 - 如果这个工作正常,则比较两个目录,尤其是tomcat的/conf/目录。 / LI>
  • 如果这不起作用,请检查您的环境是否定义了任何变量CATALINA_HOME,CATALINA_BASE,LIFERAY_HOME。
  • 您只需运行./bin/catalina.sh run这样的命令,就能看到更多您发布的日志。这将在前台运行tomcat,从头开始显示日志而不会错过任何内容,因为tail命令来得太晚

答案 4 :(得分:0)

可能还有一些其他进程使用端口8080.使用以下命令检查:

sudo netstat -lnp | grep ':8080'

杀死正在运行的进程

sudo kill -9 {PID}

例如

sudo kill -9 1234

重启Tomcat(如果作为服务安装)

service tomcat7 restart

答案 5 :(得分:0)

一个好的起点是检查tomcat是否在端口8080上接收请求;在命令行类型中:

telnet localhost 8080

如果你得到一个黑/空屏幕,那么tomcat确实正在侦听该端口,否则你会遇到连接失败,那么你需要再次检查你的tomcat配置。