异常信息如下:

INFO: Failed to get local InetAddress for VMID. This is unlikely to matter. At all. We'll add some extra randomness
java.net.UnknownHostException: ran-oam: ran-oam: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:)
at com.mchange.v2.uid.UidUtils.generateVmId(UidUtils.java:)
at com.mchange.v2.uid.UidUtils.<clinit>(UidUtils.java:)
at com.mchange.v2.c3p0.impl.C3P0ImplUtils.<clinit>(C3P0ImplUtils.java:)
at com.mchange.v2.c3p0.impl.PoolBackedDataSourceBase.<init>(PoolBackedDataSourceBase.java:)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.<init>(AbstractPoolBackedDataSource.java:)
at com.mchange.v2.c3p0.AbstractComboPooledDataSource.<init>(AbstractComboPooledDataSource.java:)
at com.mchange.v2.c3p0.AbstractComboPooledDataSource.<init>(AbstractComboPooledDataSource.java:)
at com.mchange.v2.c3p0.ComboPooledDataSource.<init>(ComboPooledDataSource.java:)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:)
at java.lang.reflect.Constructor.newInstance(Constructor.java:)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractBeanFactory$.getObject(AbstractBeanFactory.java:)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:)
at java.util.concurrent.FutureTask.run(FutureTask.java:)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:)
at java.lang.Thread.run(Thread.java:)
Caused by: java.net.UnknownHostException: ran-oam: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$.lookupAllHostAddr(InetAddress.java:)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:)
at java.net.InetAddress.getLocalHost(InetAddress.java:)
... more

解决办法,配置主机名。

查看主机名:

echo `hostname`

执行上述命令后,会打印出主机名,将此记下,后面要用。比如我的主机名为“ran-oam”

修改文件:

vi /etc/hosts

将主机名写入,如下图

完成如上修改后,重新启动Tomcat,发现问题解决。

Tomcat启动时报错:java.net.UnknownHostException的更多相关文章

  1. Eclipse启动时报错Java was started but returned exit code=13

    Eclipse启动时报错Java was started but returned exit code=13 如图所示 原因是通过第三方更新JRE时,第三方安装的是32位的JRE,与64位的eclip ...

  2. Tomcat启动时报错:java.net.BindException: Permission denied <null>:80 【转载】

    本文转载自: http://blog.sina.com.cn/s/blog_4550f3ca0101g37l.html   问题起因:做负载均衡时需要将Web工程与Wap工程同时部署在一台Suse服务 ...

  3. tomcat启动报错 java.lang.ClassNotFoundException: org.apache.jsp.index_jsp

    项目运行一直很平稳,但是换了tomcat之后打开jsp网页时就报错,描述如下: 1. 错误描述 打开jsp网页时报错 java.lang.NullPointerException     org.ap ...

  4. Tomcat启动报错java.net.AbstractPlainSocketImpl(java/net/AbstractPlainSocketImpl.java:178:-1)Struts在网络复杂情况下启动报错解决办法

    SSH项目 在网络复杂的情况(具体规律未知)下,Tomcat启动时,报如下错误: [ERROR] 2014-08-12 14:52:58,484 [org.apache.struts2.dispatc ...

  5. Tomcat启动时报错:“ Error starting static Resources”问题解决

    部署测试环境的时候,需要用到Tomcat.故在Linux上部署了Tomcat,并将开发提供的工程包部署到Tomcat的webapps目录下,启动Tomcat,部署成功.第二天修改工程配置文件时,发现w ...

  6. TOMCAT启动时报错:the CATALINA_HOME environment variable is not defined correctly

    运行tomcat/bin目录下的startup.bat时报错:the CATALINA_HOME environment variable is not defined correctly 碰到这个问 ...

  7. Tomcat启动报错java.lang.UnsatisfiedLinkError

    之前tomcat启动老是报错,虽然不影响项目的启动运行,但是有强迫症的程序员会心里不爽: 问题是由于本机安装的jdk版本与tomcat中使用的jdk版本不一致导致的. 后面我把原先tomcat启动环境 ...

  8. tomcat启动报错java.lang.OutOfMemoryError:PermGen space解决办法

    tomcat启动错误提示: 严重: Error waiting for multi-thread deployment of WAR files to completejava.util.concur ...

  9. tomcat在linux服务器启动时报错Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000794500000, 576716800, 0) failed; error='Cannot allocate memory' (errno=12)

    原因是内存不足了 解决办法:1.top命令查看后台进程,看哪些可以关闭 2.ps -ef |grep tomcat看哪些不用的tomcat起着,也可以从这里关 3.加大这个tomcat的内存, 在ca ...

随机推荐

  1. Mysql个人语句笔记

    --一些简单语句记录: /*mysql*/SHOW DATABASES CREATE DATABASE guoDROP DATABASE guo /*查看创建的数据库*/SHOW CREATE DAT ...

  2. myeclipse搭建svn插件

    在网上查了一下,安装的方法有几种,这里给大家推荐一种快速安装的方法. //第一步 : 下载 site-1.6.5.zip //===================================== ...

  3. 史上最全的Matlab资源电子书教程和视频下载合集【超级推荐】

    收藏吧,网上搜集的,费了老大劲了,推荐给有需要的人,^_^.   MATLAB课件2007北京交通大学.zip 4.87 MB   A Guide to MATLAB for Beginners an ...

  4. iOS基础 - iOS程序启动原理

    一.UIApplicationMain 在main.m的main函数中执行了UIApplicationMain这个方法,这是ios程序的入口点 int UIApplicationMain(int ar ...

  5. 监控系统Opserver

    监控系统Opserver的配置调试   Stack Exchange开源其监控系统Opserver有一段时间了.之前在项目中用过他们的MiniProfile来分析页面执行效率和帮助新人了解项目,当他们 ...

  6. UVA 568 (13.07.28)

     Just the Facts  The expression N!, read as `` N factorial," denotes the product of the first N ...

  7. Asp.net MVC集成Google Calendar API(附Demo源码)

    Asp.net MVC集成Google Calendar API(附Demo源码) Google Calendar是非常方便的日程管理应用,很多人都非常熟悉.Google的应用在国内不稳定,但是在国外 ...

  8. DevExpress 学习使用之 SplitContainerControl

    无论是 .net framework 自带还是第三方组件,使用 Split 类控件时通常其 Panel 中都会包含多个子控件,在运行时不可避免遇到因改变 splitter 位置或改变窗体大小引起的界面 ...

  9. 企业架构研究总结(38)——TOGAF架构能力框架之架构能力建设和架构治理

    为了确保架构功能在企业中能够被成功地运用,企业需要通过建立适当的组织结构.流程.角色.责任和技能来实现其自身的企业架构能力,而这也正是TOGAF的架构能力框架(Architecture Capabil ...

  10. SoapUI调用Web服务

    msg = string.Empty; //string sendAddr, string destAddr, string smContent, int IsNeedreport, DateTime ...