春季通告引用疯狂

我有一个5个微服务的生态系统,每个部署在一个docker集装箱中。 通常主机(VPS)有这个规格

  • RAM 4GB
  • 1个虚拟CPU
  • 高清80GB
  • SO Ubuntu 16.04.2 LTS

从4个月开始,所有的5个实例都运行正常。 现在我需要创build一个新的实例,并遵循标准的步骤来创build这个新的环境,但是我只有一个容器的问题。

在这个容器里有一个弹簧启动web应用程序,只给我一个错误在这个环境。 错误是:

2017-07-20 09:50:20.125 INFO 22037 --- [ost-startStop-1] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2017-07-20 09:50:20.878 INFO 22037 --- [ost-startStop-1] ohhiQueryTranslatorFactoryInitiator : HHH000397: Using ASTQueryTranslatorFactory 2017-07-20 09:50:23.119 INFO 22037 --- [ost-startStop-1] osbwservlet.FilterRegistrationBean : Mapping filter: 'CORSFilter' to: [/*] 2017-07-20 09:50:23.126 INFO 22037 --- [ost-startStop-1] osbwservlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*] 2017-07-20 09:50:23.134 INFO 22037 --- [ost-startStop-1] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*] 2017-07-20 09:50:23.146 INFO 22037 --- [ost-startStop-1] osbwservlet.FilterRegistrationBean : Mapping filter: 'authenticationTokenFilterBean' to: [/*] 2017-07-20 09:50:23.146 INFO 22037 --- [ost-startStop-1] osbwservlet.FilterRegistrationBean : Mapping filter: 'authenticationExtApiFilterBean' to: [/*] 2017-07-20 09:50:23.147 INFO 22037 --- [ost-startStop-1] osbwservlet.FilterRegistrationBean : Mapping filter: 'switchUserFilter' to: [/*] 2017-07-20 09:50:23.147 INFO 22037 --- [ost-startStop-1] osbwservlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/] 2017-07-20 09:50:26.409 INFO 22037 --- [ main] oswsvvelocity.VelocityConfigurer : ClasspathResourceLoader with name 'springMacro' added to configured VelocityEngine 2017-07-20 09:50:26.453 INFO 22037 --- [ main] osui.velocity.SpringResourceLoader : SpringResourceLoader for Velocity: using resource loader [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@2328c243: startup date [Thu Jul 20 09:49:56 UTC 2017]; root of context hierarchy] and resource loader paths [classpath:/templates/] 2017-07-20 09:50:27.547 WARN 22037 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'CollectService': Bean with name 'CollectService' has been injected into other beans [TemplateService] in its raw version as part of a circular reference, but has eventually been wrapped. This means that said other beans do not use the final version of the bean. This is often the result of over-eager type matching - consider using 'getBeanNamesOfType' with the 'allowEagerInit' flag turned off, for example. 2017-07-20 09:50:27.552 INFO 22037 --- [ main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2017-07-20 09:50:27.586 INFO 22037 --- [ main] o.apache.catalina.core.StandardService : Stopping service Tomcat 2017-07-20 09:50:27.600 WARN 22037 --- [ost-startStop-1] oacloader.WebappClassLoaderBase : The web application [ROOT] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.lang.Object.wait(Native Method) java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143) com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43) 2017-07-20 09:50:27.672 INFO 22037 --- [ main] utoConfigurationReportLoggingInitializer : Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 2017-07-20 09:50:27.682 ERROR 22037 --- [ main] osbdLoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: The dependencies of some of the beans in the application context form a cycle: | CollectService └─────┘ 

这很奇怪,因为在我的本地机器上工作正常,在我的IDE这个应用程序启动没有任何麻烦,在其他VPS工作正常:现在在所有新的VPS实例,我试过我得到这个错误。 我不明白道理!

有什么build议么??

– – – – -编辑 – – – –

这是我的CollectServiceImpl的一部分

 @Transactional @Service("CollectService") public class CollectServiceImpl implements CollectService { private static Logger logger = LoggerFactory.getLogger(CampaignServiceImpl.class); private static String logPattern = "[Coupon Service]"; @Autowired private CollectRepository collectRepository; @Autowired private ContactService contactService; @Autowired private CouponService couponService; @Autowired private CampaignService campaignService; @Value(value = "${application.exported.path}") private String ROOT; ......