- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我试图通过 docker 容器上的 spring boot 启动 eureka 服务器并收到以下异常“unknownhostexception”。现在,在 eureka config.properties 文件中,我使用主机名作为 localhost,但异常(exception)情况是它以某种方式使用容器的主机名,而不是使用我在 eureka 属性文件中定义的主机名。此外,即使它使用容器定义的主机名,它也可以在容器上很好地解析到正确的 IP,并且在/etc/hosts 中有条目。
注意:
Eureka 配置文件内容:
# Configure this Discovery Server
eureka:
instance:
hostname: localhost
client: # Not a client, don't register with yourself
registerWithEureka: false
fetchRegistry: false
server:
port: 1111 # HTTP (Tomcat) port
异常堆栈跟踪:
2016-01-11 20:04:54 INFO RegistrationServer:47 - Starting RegistrationServer v0.0.1-SNAPSHOT with PID 1 (/Jars/registration-service-0.0.1-SNAPSHOT.jar started by root in /)
2016-01-11 20:04:54 INFO AnnotationConfigApplicationContext:510 - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@70ab4338: startup date [Mon Jan 11 20:04:54 GMT 2016]; root of context hierarchy
2016-01-11 20:04:55 INFO AutowiredAnnotationBeanPostProcessor:153 - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2016-01-11 20:04:55 INFO Version:27 - HV000001: Hibernate Validator 5.1.3.Final
2016-01-11 20:04:55 INFO PostProcessorRegistrationDelegate$BeanPostProcessorChecker:309 - Bean 'encrypt.CONFIGURATION_PROPERTIES' of type [class org.springframework.cloud.bootstrap.encrypt.KeyProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-01-11 20:04:55 INFO PostProcessorRegistrationDelegate$BeanPostProcessorChecker:309 - Bean 'encryptionBootstrapConfiguration' of type [class org.springframework.cloud.bootstrap.encrypt.EncryptionBootstrapConfiguration$$EnhancerBySpringCGLIB$$58540477] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-01-11 20:04:56 INFO RegistrationServer:56 - Started RegistrationServer in 2.695 seconds (JVM running for 7.037)
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
[32m :: Spring Boot :: [39m [2m (v1.2.4.RELEASE)[0;39m
2016-01-11 20:04:57 INFO AnnotationConfigEmbeddedWebApplicationContext:510 - Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@68eefca4: startup date [Mon Jan 11 20:04:57 GMT 2016]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@70ab4338
2016-01-11 20:05:00 WARN PathMatchingResourcePatternResolver:652 - Skipping [/tmp/spring-boot-libs/06f98804e83cf4a94380b46591b976b1d17c36b8-eureka-client-1.1.147.jar] because it does not denote a directory
2016-01-11 20:05:01 WARN PathMatchingResourcePatternResolver:652 - Skipping [/tmp/spring-boot-libs/b8da6470c5c08e33f9ae3737f338b4b81696fa98-eureka-core-1.1.147.jar] because it does not denote a directory
2016-01-11 20:05:04 INFO DefaultListableBeanFactory:822 - Overriding bean definition for bean 'beanNameViewResolver': replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]
2016-01-11 20:05:05 INFO DefaultListableBeanFactory:822 - Overriding bean definition for bean 'infoEndpoint': replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration; factoryMethodName=infoEndpoint; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/actuate/autoconfigure/EndpointAutoConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.cloud.autoconfigure.RefreshAutoConfiguration$InfoEndpointRebinderConfiguration; factoryMethodName=infoEndpoint; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/cloud/autoconfigure/RefreshAutoConfiguration$InfoEndpointRebinderConfiguration.class]]
2016-01-11 20:05:06 INFO GenericScope:230 - BeanFactory id=0e0ed65b-ca3b-3a06-a0e2-4597f85dabe8
2016-01-11 20:05:06 INFO AutowiredAnnotationBeanPostProcessor:153 - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2016-01-11 20:05:07 INFO PostProcessorRegistrationDelegate$BeanPostProcessorChecker:309 - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$9787da3e] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-01-11 20:05:07 INFO PostProcessorRegistrationDelegate$BeanPostProcessorChecker:309 - Bean 'transactionAttributeSource' of type [class org.springframework.transaction.annotation.AnnotationTransactionAttributeSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-01-11 20:05:07 INFO PostProcessorRegistrationDelegate$BeanPostProcessorChecker:309 - Bean 'transactionInterceptor' of type [class org.springframework.transaction.interceptor.TransactionInterceptor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-01-11 20:05:07 INFO PostProcessorRegistrationDelegate$BeanPostProcessorChecker:309 - Bean 'org.springframework.transaction.config.internalTransactionAdvisor' of type [class org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-01-11 20:05:07 INFO PostProcessorRegistrationDelegate$BeanPostProcessorChecker:309 - Bean 'org.springframework.cloud.autoconfigure.RefreshAutoConfiguration$ConfigurationPropertiesRebinderConfiguration' of type [class org.springframework.cloud.autoconfigure.RefreshAutoConfiguration$ConfigurationPropertiesRebinderConfiguration$$EnhancerBySpringCGLIB$$888ac754] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-01-11 20:05:09 INFO TomcatEmbeddedServletContainer:79 - Tomcat initialized with port(s): 1111 (http)
2016-01-11 20:05:10 INFO StandardService:180 - Starting service Tomcat
2016-01-11 20:05:10 INFO StandardEngine:180 - Starting Servlet Engine: Apache Tomcat/8.0.23
2016-01-11 20:05:11 INFO [/]:180 - Initializing Spring embedded WebApplicationContext
2016-01-11 20:05:11 INFO ContextLoader:268 - Root WebApplicationContext: initialization completed in 14097 ms
2016-01-11 20:05:17 INFO FilterRegistrationBean:286 - Mapping filter: 'metricFilter' to: [/*]
2016-01-11 20:05:17 INFO FilterRegistrationBean:286 - Mapping filter: 'characterEncodingFilter' to: [/*]
2016-01-11 20:05:17 INFO FilterRegistrationBean:286 - Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2016-01-11 20:05:17 INFO FilterRegistrationBean:286 - Mapping filter: 'webRequestTraceFilter' to: [/*]
2016-01-11 20:05:17 INFO FilterRegistrationBean:299 - Mapping filter: 'servletContainer' to urls: [/eureka/*]
2016-01-11 20:05:17 INFO FilterRegistrationBean:286 - Mapping filter: 'applicationContextIdFilter' to: [/*]
2016-01-11 20:05:17 INFO ServletRegistrationBean:188 - Mapping servlet: 'dispatcherServlet' to [/]
2016-01-11 20:05:17 INFO WebApplicationImpl:785 - Initiating Jersey application, version 'Jersey: 1.13 06/29/2012 05:14 PM'
2016-01-11 20:05:28 ERROR EurekaInstanceConfigBean:122 - Cannot get host info
java.net.UnknownHostException: ef769e37c05f: ef769e37c05f: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1475)
at org.springframework.cloud.netflix.eureka.EurekaInstanceConfigBean.initHostInfo(EurekaInstanceConfigBean.java:118)
at org.springframework.cloud.netflix.eureka.EurekaInstanceConfigBean.<init>(EurekaInstanceConfigBean.java:50)
at org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration.eurekaInstanceConfigBean(EurekaClientAutoConfiguration.java:81)
at org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$$EnhancerBySpringCGLIB$$2debd82d.CGLIB$eurekaInstanceConfigBean$3(<generated>)
at org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$$EnhancerBySpringCGLIB$$2debd82d$$FastClassBySpringCGLIB$$a2b83124.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309)
at org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$$EnhancerBySpringCGLIB$$2debd82d.eurekaInstanceConfigBean(<generated>)
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:606)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1120)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1044)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
at com.cisco.microservice.registration.RegistrationServer.main(RegistrationServer.java:31)
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:606)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.UnknownHostException: ef769e37c05f: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1295)
at java.net.InetAddress.getLocalHost(InetAddress.java:1471)
... 50 more
2016-01-11 20:05:28 WARN URLConfigurationSource:120 - No URLs will be polled as dynamic configuration sources.
2016-01-11 20:05:28 INFO URLConfigurationSource:121 - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2016-01-11 20:05:28 INFO DynamicPropertyFactory:281 - DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@69f889
2016-01-11 20:05:29 INFO RequestMappingHandlerAdapter:517 - Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@68eefca4: startup date [Mon Jan 11 20:04:57 GMT 2016]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@70ab4338
2016-01-11 20:05:29 INFO RequestMappingHandlerMapping:217 - Mapped "{[//lastn],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String org.springframework.cloud.netflix.eureka.server.EurekaController.lastn(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.Object>)
2016-01-11 20:05:29 INFO RequestMappingHandlerMapping:217 - Mapped "{[/],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String org.springframework.cloud.netflix.eureka.server.EurekaController.status(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.Object>)
2016-01-11 20:05:29 INFO RequestMappingHandlerMapping:217 - Mapped "{[/error],methods=[],params=[],headers=[],consumes=[],produces=[text/html],custom=[]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)
2016-01-11 20:05:29 INFO RequestMappingHandlerMapping:217 - Mapped "{[/error],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2016-01-11 20:05:29 INFO SimpleUrlHandlerMapping:314 - Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-01-11 20:05:29 INFO SimpleUrlHandlerMapping:314 - Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-01-11 20:05:29 INFO SimpleUrlHandlerMapping:314 - Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/metrics/{name:.*}],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/metrics],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/trace],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/health],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(java.security.Principal)
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/configprops],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/refresh],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/pause],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/autoconfig],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/info],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/mappings],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/env],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.cloud.context.environment.EnvironmentManagerMvcEndpoint.value(java.util.Map<java.lang.String, java.lang.String>)
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/env/reset],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.util.Map<java.lang.String, java.lang.Object> org.springframework.cloud.context.environment.EnvironmentManagerMvcEndpoint.reset()
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/restart],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.cloud.context.restart.RestartMvcEndpoint.invoke()
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/archaius],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/dump],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/env/{name:.*}],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String)
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/env],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/beans],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-01-11 20:05:32 INFO EndpointHandlerMapping:217 - Mapped "{[/resume],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
2016-01-11 20:05:32 INFO SpringTemplateLoader:61 - SpringTemplateLoader for FreeMarker: using resource loader [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@68eefca4: startup date [Mon Jan 11 20:04:57 GMT 2016]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@70ab4338] and template loader path [classpath:/templates/]
2016-01-11 20:05:32 INFO FreeMarkerConfigurer:127 - ClassTemplateLoader for Spring macros added to FreeMarker configuration
2016-01-11 20:05:33 WARN URLConfigurationSource:120 - No URLs will be polled as dynamic configuration sources.
2016-01-11 20:05:33 INFO URLConfigurationSource:121 - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2016-01-11 20:05:33 INFO AnnotationMBeanExporter:431 - Registering beans for JMX exposure on startup
2016-01-11 20:05:33 INFO AnnotationMBeanExporter:912 - Bean with name 'refreshEndpoint' has been autodetected for JMX exposure
2016-01-11 20:05:33 INFO AnnotationMBeanExporter:912 - Bean with name 'restartEndpoint' has been autodetected for JMX exposure
2016-01-11 20:05:33 INFO AnnotationMBeanExporter:912 - Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure
2016-01-11 20:05:33 INFO AnnotationMBeanExporter:912 - Bean with name 'refreshScope' has been autodetected for JMX exposure
2016-01-11 20:05:33 INFO AnnotationMBeanExporter:912 - Bean with name 'environmentManager' has been autodetected for JMX exposure
2016-01-11 20:05:33 INFO AnnotationMBeanExporter:674 - Located managed bean 'environmentManager': registering with JMX server as MBean [org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager]
2016-01-11 20:05:33 INFO AnnotationMBeanExporter:674 - Located managed bean 'refreshScope': registering with JMX server as MBean [org.springframework.cloud.context.scope.refresh:name=refreshScope,type=RefreshScope]
2016-01-11 20:05:33 INFO AnnotationMBeanExporter:674 - Located managed bean 'restartEndpoint': registering with JMX server as MBean [org.springframework.cloud.context.restart:name=restartEndpoint,type=RestartEndpoint]
2016-01-11 20:05:33 INFO AnnotationMBeanExporter:674 - Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=68eefca4,type=ConfigurationPropertiesRebinder]
2016-01-11 20:05:33 INFO AnnotationMBeanExporter:674 - Located managed bean 'refreshEndpoint': registering with JMX server as MBean [org.springframework.cloud.bootstrap.config:name=refreshEndpoint,type=RefreshEndpoint]
2016-01-11 20:05:33 INFO EndpointMBeanExporter:431 - Registering beans for JMX exposure on startup
2016-01-11 20:05:33 INFO DefaultLifecycleProcessor:341 - Starting beans in phase 0
2016-01-11 20:05:33 INFO EurekaConfigBasedInstanceInfoProvider:80 - Setting initial instance status as: STARTING
^C^C2016-01-11 20:05:35 INFO AnnotationConfigApplicationContext:862 - Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@70ab4338: startup date [Mon Jan 11 20:04:54 GMT 2016]; root of context hierarchy
^C^C
最佳答案
通过在 docker 文件中添加以下解决方案解决了问题:
# Fix DNS resolution issues when nss is not installed
RUN echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf
# Set DNS cache to 10 seconds (Cache is permanent by default). Network hosts are volatile in Docker clusters.
RUN grep '^networkaddress.cache.ttl=' /opt/${JAVA_PACKAGE}/jre/lib/security/java.security || echo 'networkaddress.cache.ttl=10' >> /opt/${JAVA_PACKAGE}/jre/lib/security/java.security
关于java - docker 容器上的 Eureka : unknown host exception,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34730542/
我正在编写一个具有以下签名的 Java 方法。 void Logger(Method method, Object[] args); 如果一个方法(例如 ABC() )调用此方法 Logger,它应该
我是 Java 新手。 我的问题是我的 Java 程序找不到我试图用作的图像文件一个 JButton。 (目前这段代码什么也没做,因为我只是得到了想要的外观第一的)。这是我的主课 代码: packag
好的,今天我在接受采访,我已经编写 Java 代码多年了。采访中说“Java 垃圾收集是一个棘手的问题,我有几个 friend 一直在努力弄清楚。你在这方面做得怎么样?”。她是想骗我吗?还是我的一生都
我的 friend 给了我一个谜语让我解开。它是这样的: There are 100 people. Each one of them, in his turn, does the following
如果我将使用 Java 5 代码的应用程序编译成字节码,生成的 .class 文件是否能够在 Java 1.4 下运行? 如果后者可以工作并且我正在尝试在我的 Java 1.4 应用程序中使用 Jav
有关于why Java doesn't support unsigned types的问题以及一些关于处理无符号类型的问题。我做了一些搜索,似乎 Scala 也不支持无符号数据类型。限制是Java和S
我只是想知道在一个 java 版本中生成的字节码是否可以在其他 java 版本上运行 最佳答案 通常,字节码无需修改即可在 较新 版本的 Java 上运行。它不会在旧版本上运行,除非您使用特殊参数 (
我有一个关于在命令提示符下执行 java 程序的基本问题。 在某些机器上我们需要指定 -cp 。 (类路径)同时执行java程序 (test为java文件名与.class文件存在于同一目录下) jav
我已经阅读 StackOverflow 有一段时间了,现在我才鼓起勇气提出问题。我今年 20 岁,目前在我的家乡(罗马尼亚克卢日-纳波卡)就读 IT 大学。足以介绍:D。 基本上,我有一家提供簿记应用
我有 public JSONObject parseXML(String xml) { JSONObject jsonObject = XML.toJSONObject(xml); r
我已经在 Java 中实现了带有动态类型的简单解释语言。不幸的是我遇到了以下问题。测试时如下代码: def main() { def ks = Map[[1, 2]].keySet()
一直提示输入 1 到 10 的数字 - 结果应将 st、rd、th 和 nd 添加到数字中。编写一个程序,提示用户输入 1 到 10 之间的任意整数,然后以序数形式显示该整数并附加后缀。 public
我有这个 DownloadFile.java 并按预期下载该文件: import java.io.*; import java.net.URL; public class DownloadFile {
我想在 GUI 上添加延迟。我放置了 2 个 for 循环,然后重新绘制了一个标签,但这 2 个 for 循环一个接一个地执行,并且标签被重新绘制到最后一个。 我能做什么? for(int i=0;
我正在对对象 Student 的列表项进行一些测试,但是我更喜欢在 java 类对象中创建硬编码列表,然后从那里提取数据,而不是连接到数据库并在结果集中选择记录。然而,自从我这样做以来已经很长时间了,
我知道对象创建分为三个部分: 声明 实例化 初始化 classA{} classB extends classA{} classA obj = new classB(1,1); 实例化 它必须使用
我有兴趣使用 GPRS 构建车辆跟踪系统。但是,我有一些问题要问以前做过此操作的人: GPRS 是最好的技术吗?人们意识到任何问题吗? 我计划使用 Java/Java EE - 有更好的技术吗? 如果
我可以通过递归方法反转数组,例如:数组={1,2,3,4,5} 数组结果={5,4,3,2,1}但我的结果是相同的数组,我不知道为什么,请帮助我。 public class Recursion { p
有这样的标准方式吗? 包括 Java源代码-测试代码- Ant 或 Maven联合单元持续集成(可能是巡航控制)ClearCase 版本控制工具部署到应用服务器 最后我希望有一个自动构建和集成环境。
我什至不知道这是否可能,我非常怀疑它是否可能,但如果可以,您能告诉我怎么做吗?我只是想知道如何从打印机打印一些文本。 有什么想法吗? 最佳答案 这里有更简单的事情。 import javax.swin
我是一名优秀的程序员,十分优秀!