th5460 发表于 2016-4-19 16:29:52

tomcat启动报错 java.net.SocketException: Can't assign requested address

3.6.3版本在tomcat7下启动时保持,谁遇到过这种情况?

ERROR n.s.e.d.MulticastRMICacheManagerPeerProvider - Error starting heartbeat. Error was: Can't assign requested addressjava.net.SocketException: Can't assign requested address        at java.net.PlainDatagramSocketImpl.join(Native Method) ~        at java.net.AbstractPlainDatagramSocketImpl.join(AbstractPlainDatagramSocketImpl.java:179) ~        at java.net.MulticastSocket.joinGroup(MulticastSocket.java:319) ~        at net.sf.ehcache.distribution.MulticastKeepaliveHeartbeatReceiver.init(MulticastKeepaliveHeartbeatReceiver.java:88) ~        at net.sf.ehcache.distribution.MulticastRMICacheManagerPeerProvider.init(MulticastRMICacheManagerPeerProvider.java:95) ~        at net.sf.ehcache.CacheManager.init(CacheManager.java:362)         at net.sf.ehcache.CacheManager.<init>(CacheManager.java:299)         at net.sf.ehcache.CacheManager.create(CacheManager.java:697)         at net.sf.ehcache.CacheManager.getInstance(CacheManager.java:717)         at org.jeecgframework.core.aop.EhcacheAspect.<clinit>(EhcacheAspect.java:33)         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)         at java.lang.reflect.Constructor.newInstance(Constructor.java:526)         at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)         at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1070)         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1022)         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706)         at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)         at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)         at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)         at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5017)         at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5531)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)         at java.util.concurrent.FutureTask.run(FutureTask.java:262)         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)         at java.lang.Thread.run(Thread.java:745)


th5460 发表于 2016-4-19 17:07:20

问题解决:

http://stackoverflow.com/questions/18747134/getting-cant-assign-requested-address-java-net-socketexception-using-ehcache

Start the JVM with -Djava.net.preferIPv4Stack=true. This caused java.net.NetworkInterface.getDefault() to return my vboxnet0 network interface
页: [1]
查看完整版本: tomcat启动报错 java.net.SocketException: Can't assign requested address