liferay启动时的故障

今天将开发服务器的liferay迁移到公司新买的服务器上,在启动liferay的过程中,报错如下:

查看liferay的log时报错如下:

09:41:32,171 INFO  [localhost-startStop-1][DialectDetector:71] Determine dialect for MySQL 5

09:41:32,195 INFO  [localhost-startStop-1][DialectDetector:136] Found dialect org.hibernate.dialect.MySQLDialect

09:41:32,585 ERROR [localhost-startStop-1][Cache:120] Unable to set localhost. This prevents creation of a GUID. Cause was: tomcat-03: tomcat-03: unknown error

java.net.UnknownHostException: tomcat-03: tomcat-03: unknown error

at java.net.InetAddress.getLocalHost(InetAddress.java:1484)

at net.sf.ehcache.Cache.<clinit>(Cache.java:200)

at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:302)

at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:218)

at net.sf.ehcache.CacheManager.configure(CacheManager.java:618)

at net.sf.ehcache.CacheManager.init(CacheManager.java:361)

at net.sf.ehcache.CacheManager.<init>(CacheManager.java:230)

at com.liferay.portal.dao.orm.hibernate.region.LiferayEhcacheRegionFactory.start(LiferayEhcacheRegionFactory.java:182)

at com.liferay.portal.dao.orm.hibernate.region.SingletonLiferayEhcacheRegionFactory.start(SingletonLiferayEhcacheRegionFactory.java:106)

at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:238)

at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872)

at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:860)

at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:779)

at com.liferay.portal.spring.hibernate.PortalHibernateConfiguration.buildSessionFactory(PortalHibernateConfiguration.java:65)

at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1479)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1419)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)

at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:630)

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:441)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:982)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:878)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:484)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1327)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1085)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1327)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1085)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)

at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:710)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:410)

at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)

at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:186)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)

at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1636)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

Caused by: java.net.UnknownHostException: tomcat-03: unknown error

at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)

at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:907)

at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1302)

at java.net.InetAddress.getLocalHost(InetAddress.java:1479)

... 73 more

解决方法:在/etc/hosts文件里添加一条记录

本机的ip地址  主机名

重新启动liferay,查看log,一切正常,启动完成后前台界面也可以正常访问。

时间: 2024-10-24 02:10:59

liferay启动时的故障的相关文章

SpringBoot-技术专区-详细打印启动时异常堆栈信息

SpringBoot在项目启动时如果遇到异常并不能友好的打印出具体的堆栈错误信息,我们只能查看到简单的错误消息,以致于并不能及时解决发生的问题,针对这个问题SpringBoot提供了故障分析仪的概念(failure-analyzer),内部根据不同类型的异常提供了一些实现,我们如果想自定义该怎么去做? FailureAnalyzer SpringBoot提供了启动异常分析接口FailureAnalyzer,该接口位于org.springframework.boot.diagnosticspack

学习dubbo(四): 启动时检查

说明 Dubbo缺省会在启动时检查依赖的服务是否可用不可用时会抛出异常阻止Spring初始化完成以便上线时能及早发现问 题默认check=true. 注意 如果你的Spring容器是懒加载的或者通过API编程延迟引用服务请关闭check否则服务临时不可用时会抛出异常拿到 null引用如果check=false总是会返回引用当服务恢复时能自动连上.

Servlet中的init()方法如何才会在服务器启动时执行

如果要想让 servlet 的 init () 方法在服务器启动 时就被执行,则需要在 web.xml 中相应的 servlet 下配置 1 <?xml version="1.0" encoding="UTF-8"?> 2 <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" 3 xmlns:xsi="http://www.

web项目启动时,自动执行代码

tomcat启动时自动执行,以下两种方法的执行时长,会计算在tomcat的启动时长里. 1.ServletContextListener web.xml配置<listener> <listener-class>com.yuan.framework.GreyClientInitListener</listener-class> </listener> 1 public class GreyClientInitListener implements Servle

如何在android studio 1.0 启动时设置代理【解决WARN - ateSettings.impl.UpdateChecker - Connection failed.】

今天第一次用android studio,下了个比较新的1.0.1 linux版本,结果启动时老是出现以下错误: [ 6987] WARN - ateSettings.impl.UpdateChecker - Connection failed. Please check your network connection and try again. 百度了以下,都没找到可行方案,最后在google里找到了解决方案,在此记录下来,供大家参考. 方法1: 到android studio安装目录,打开

Tomcat启动时项目重复加载,导致资源初始化两次的问题

最近在项目开发测试的时候,发现Tomcat启动时项目重复加载,导致资源初始化两次的问题 导致该问题的原因: 如下图:在Eclipse中将Server Locations设置为"Use Tomcat installation(takes control of Tomcat installation)"时, 就会导致该问题! 根本原因: 解决方法一: 把server.xml中的context删除掉 但这会导致一个问题: 在Web Modules中你将看不到我们的项目 解决方法二: 在Tom

服务器启动时Webapp的web.xml中配置的加载顺序

一 1.启动一个WEB项目的时候,WEB容器会去读取它的配置文件web.xml,读取<listener>和<context-param>两个结点. 2.紧急着,容创建一个ServletContext(servlet上下文),这个web项目的所有部分都将共享这个上下文. 3.容器将<context-param>转换为键值对,并交给servletContext. 4.容器创建<listener>中的类实例,创建监听器. 二  Load-on-startup Lo

VMware ESXi 启动时提示引导错误:不是VMware引导槽。找不到管理程序(bank6 not a vmware boot bank no hypervisor found)

VMware ESXi 启动时提示引导错误: bank6 not a vmware boot bank no hypervisor found 大概中文意思是:不是VMware引导槽.找不到管理程序. 网上看到https://communities.vmware.com/thread/429698 有网友解答说,删除分区的字符会导致GPT修改(大意) 才想起重启前,在PE下转移硬盘数据,因为ESXi的分区比较多,看着碍眼手贱删掉了2个分局的字符.... 再看https://kb.vmware.c

xampp启动时显示的错误

xampp启动时显示的错误为: 9:52:41  [Apache]  Attempting to start Apache app... 9:52:41  [Apache]  Status change detected: running9:52:42  [Apache] Status change detected: stopped9:52:42  [Apache] Error: Apache shutdown unexpectedly.9:52:42  [Apache] This may b