4

I use spring boot 1.4 for testing (the new annotation @SpringBootTest ...)

when i run it integration test.i get the following error:

[2016-10-11 11:54:13.762] [tiger-All-Series] [main] [] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean@buildNativeEntityManagerFactory:382 - Initialized JPA EntityManagerFactory for persistence unit 'default'
[2016-10-11 11:54:13.993] [tiger-All-Series] [pool-6-thread-1] [] ERROR o.a.h.i.n.c.InternalHttpAsyncClient@run:66 - I/O reactor terminated abnormally
org.apache.http.nio.reactor.IOReactorException: Failure opening selector
    at org.apache.http.impl.nio.reactor.AbstractIOReactor.<init>(AbstractIOReactor.java:103)
    at org.apache.http.impl.nio.reactor.BaseIOReactor.<init>(BaseIOReactor.java:85)
    at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:318)
    at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192)
    at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Too many open files
    at sun.nio.ch.IOUtil.makePipe(Native Method)
    at sun.nio.ch.EPollSelectorImpl.<init>(EPollSelectorImpl.java:65)
    at sun.nio.ch.EPollSelectorProvider.openSelector(EPollSelectorProvider.java:36)
    at java.nio.channels.Selector.open(Selector.java:227)
    at org.apache.http.impl.nio.reactor.AbstractIOReactor.<init>(AbstractIOReactor.java:101)
    ... 5 common frames omitted

this happened on the second test class. (it seems the problem of the Hibernate EntityManagerFactory) ,i get some information form here stackoverflow but it can`t resolve my problem

Community
  • 1
  • 1
tiger
  • 39
  • 2
  • 9
  • Seems like Ulimit issue. Assuming you are using linux/*nix, you can try to increase the file/pipe open limit. This limit is per user/login. You can create file in /etc/security/limits.d with required numbers. – Sangram Jadhav Oct 12 '16 at 06:41
  • I have tried it. not use for me, my problem seems more about embedded tomcat or hibernate . – tiger Oct 12 '16 at 09:01
  • yes. at last, i find the problem is my httpclient config. i`d set a large number of io thread. which aroused this. – tiger Oct 20 '16 at 08:40

0 Answers0