Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcsoV-0006Ez-QP for pgsql-jdbc@arkaria.postgresql.org; Thu, 25 Aug 2016 11:27:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bcsoU-0000K3-Op for pgsql-jdbc@arkaria.postgresql.org; Thu, 25 Aug 2016 11:27:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bcsjs-0000Cg-G3 for pgsql-jdbc@postgresql.org; Thu, 25 Aug 2016 11:22:28 +0000 Received: from gw-srv.wit-software.com ([88.157.194.235] helo=mbx-mailscanner-1.wit-software.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bcsjh-0006BK-NU for pgsql-jdbc@postgresql.org; Thu, 25 Aug 2016 11:22:27 +0000 X-Spam-Status: No X-witsoftware-MailScanner-EFA-Watermark: 1472728922.17321@1/KjokqoZB6lTn/cC9Dsrw X-witsoftware-MailScanner-EFA-From: alexandre.brito@wit-software.com X-witsoftware-MailScanner-EFA: Found to be clean X-witsoftware-MailScanner-EFA-ID: 036C7100060.A5335 X-witsoftware-MailScanner-EFA-Information: Please contact itteam@wit-software.com for more information Received: from AlexHP (unknown [172.30.35.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mbx-mailscanner-1.wit-software.com (Postfix) with ESMTPSA id 036C7100060 for ; Thu, 25 Aug 2016 12:21:59 +0100 (WEST) From: "Alexandre Brito" To: Subject: SocketTimeout and ConnectionTimeout Date: Thu, 25 Aug 2016 12:22:00 +0100 Message-ID: <006c01d1fec2$e6152130$b23f6390$@wit-software.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_006D_01D1FECB.47DBFA30" X-Mailer: Microsoft Outlook 15.0 Thread-Index: AdH+wnx8V8ubRRhUSwSJgXfx2Wj+5A== Content-Language: en-gb X-Pg-Spam-Score: -2.2 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org This is a multipart message in MIME format. ------=_NextPart_000_006D_01D1FECB.47DBFA30 Content-Type: multipart/alternative; boundary="----=_NextPart_001_006E_01D1FECB.47DBFA30" ------=_NextPart_001_006E_01D1FECB.47DBFA30 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, We are facing a problem with the JBDC connection being drop silently and the driver is not throwing a SQL Exception in a timely manner. Going through the mailing-list and the internet, it seems the problem is not so rare however the solution is still out of my reach. What is happening is simple: 1. JDBC connection is open and then stays idle 2. A network component (Fortinet) beyond our control seems to be dropping idle TCP connections. 3. Our webapp places a query and it takes 1min and 12 seconds (more or less) for the SQL Exception to be caught. We've reproduced the issue behaviour (on our environment ) by setting an iptables rule blocking port 5432 after the DB connection was successfully established. On the logs I can see the socket read (I think) timeout is around 12 seconds and then there are 6 retries 10 secs apart. (see the extracted log file from tomcat attached with EL log to finest) I would like to have control over the number of retries and timeout. Basically, I would like the receive an SQL Connection Timeout Exception within 5-10 seconds. We are using tomcat 8 and latest JDCB driver (9.4.1209 JDBC42) and JPA. Our schema is tiny and the data in it very very small. This is my tomcat's context.xml (for troubleshooting proposes) . This is my apps's persistence.xml org.eclipse.persistence.jpa.PersistenceProvider java:comp/env/jdbc/postgresqlconnection com.all.onbbp.database.entities.BpUser com. all.onbbp.database.entities.BusinessPartner com. all.onbbp.database.entities.Enterprise com. all.onbbp.database.entities.Property com. all.onbbp.database.entities.LokiCookie com. all.onbbp.database.entities.Report com. all.onbbp.database.entities.Languages com. all.onbbp.database.entities.EmailTemplates com. all.onbbp.database.entities.BpMutex com. all.onbbp.database.entities.UserSession NONE Btw the, this is how the EntityManager is initialized public class StartupListener implements ServletContextListener { . private static EntityManagerFactory entityManagerFactory; @Override public void contextInitialized(ServletContextEvent sce) { try { try { entityManagerFactory = Persistence.createEntityManagerFactory("bp-persistence"); } catch (Throwable ex) { throw new BPException(BPErrorCode.INTERNAL_SERVER_ERROR_DB_ERROR); } Does anyone has an idea? Why does the connectionTimeout to the database take so long to return (more than 12 seconds)? Many thanks in advance for any reply Alexandre ------=_NextPart_001_006E_01D1FECB.47DBFA30 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,=

 

We= are facing a problem with the JBDC connection being drop silently and the = driver is not throwing a SQL Exception in a timely manner.

<= p class=3DMsoNormal>Going through the mailing-list and the internet, it see= ms the problem is not so rare however the solution is still out of my reach= .

 

What is happening is simple:

1.       <= ![endif]>JDBC connection is open and then stays idle

2.     &n= bsp; A network component (Fortinet)  beyond ou= r control seems to be dropping idle TCP connections.

3.     &n= bsp; Our webapp places a query and it takes 1min an= d 12 seconds (more or less) for the SQL Exception to be caught. =

 

We’ve reproduced the issue behaviour (on = our environment ) by setting an iptables rule blocking port 5432 after the = DB connection was successfully established. On the logs I can see the socke= t read (I think) timeout is around 12 seconds and then there are = 6 retries 10 secs apart.  (see the extracted log file from = tomcat attached with EL log to finest)

 

I wo= uld like to have control over the number of retries and timeout. Basically,= I would like the receive an SQL Connection Timeout Exception within 5-10 s= econds.

 

We are using tomcat 8 and latest JD= CB driver (9.4.1209 JDBC42) and JPA.

 

Our sch= ema is tiny and the data in it very very small.

 

This is my tomcat’= s context.xml (for troubleshooting proposes) .

 

<Resource auth=3D"Container"

   driverClassName=3D"= ;org.postgresql.Driver"

   maxTotal=3D"1"

   maxIdle=3D"1"<= /span>

   maxWaitMillis=3D&q= uot;3000"

 = ;  name=3D"jdbc/postgresqlconnection"

<= p class=3DMsoNormal style=3D'text-indent:36.0pt'>   type=3D"javax.sql.DataSo= urce"

 &nb= sp; url=3D"jdbc:postgresql://127.0.0.1:5432/onbbp? connectionTimeout= =3D2&amp;socketTimeout=3D2"

   factory=3D"org.apache.tomcat.dbcp.dbcp2.= BasicDataSourceFactory"

   username=3D"user"

   password=3D"pass"=

/> =

 

This is = my apps’s persistence.xml

 

<persistence xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instanc= e"

  =            xsi:schemaLoca= tion=3D"http://java.sun.com/xml/ns/persistence http://java.sun.com/xml= /ns/persistence/persistence_2_0.xsd"

         = ;    version=3D"2.0" xmlns=3D"http://java.sun= .com/xml/ns/persistence">

    <persistence-unit name=3D"bp-persi= stence" transaction-type=3D"RESOURCE_LOCAL">

     &n= bsp;  <provider>org.eclipse.persistence.jpa.PersistenceProvider&= lt;/provider>

&nb= sp;       <non-jta-data-source>java:com= p/env/jdbc/postgresqlconnection</non-jta-data-source>

      = ;  <class>com.all.onbbp.database.entities.BpUser</class>

   &nb= sp;    <class>com. all.onbbp.database.entities.Busines= sPartner</class>

        <class&= gt;com. all.onbbp.database.entities.Property</class>

      =   <class>com. all.onbbp.database.entities.LokiCookie</class&g= t;

<= span style=3D'font-size:10.0pt;font-family:"Courier New"'>   = ;     <class>com. all.onbbp.database.entities.Rep= ort</class>

&n= bsp;       <class>com. all.onbbp.databa= se.entities.Languages</class>

        <class>com= . all.onbbp.database.entities.EmailTemplates</class>

      =   <class>com. all.onbbp.database.entities.BpMutex</class><= o:p>

   &n= bsp;    <class>com. all.onbbp.database.entities.UserSe= ssion</class>

=         <shared-cache-mode>NONE<= ;/shared-cache-mode>

        <properties>

    &nb= sp;           <propert= y name=3D"javax.persistence.validation.mode" value=3D"AUTO&q= uot; />

 &nb= sp;            =   <property name=3D"eclipselink.logging.level" value=3D&q= uot;FINEST"/>

    </persis= tence-unit>

</= persistence>

   = ;             <= o:p>

Btw the, this is how the EntityManager i= s initialized

 

= public class StartupListener implements ServletContextListener {=

 

    …=

    private static EntityManagerF= actory entityManagerFactory;

 

    @Override

 &= nbsp;  public void contextInitialized(ServletContextEvent sce) {<= /o:p>

        try {<= /o:p>

         =    try {

     =            entityManagerF= actory =3D Persistence.createEntityManagerFactory("bp-persistence"= ;);

       &nb= sp;    } catch (Throwable ex) {

&n= bsp;            = ;   throw new BPException(BPErrorCode.INTERNAL_SERVER_ERROR_DB_ER= ROR);

       &= nbsp;    }

&n= bsp;

Does anyone has an idea? Why does the co= nnectionTimeout to the database take so long to return (more than 12 second= s)?

 

Many thanks in advance for any reply

Alexandre =

 

= ------=_NextPart_001_006E_01D1FECB.47DBFA30-- ------=_NextPart_000_006D_01D1FECB.47DBFA30 Content-Type: text/plain; name="connectioTimeout_takes_too_long.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="connectioTimeout_takes_too_long.txt" #... IPTABLES FLUSH .... EL Fine]: connection: 2016-08-25 12:04:38.689--Thread(Thread[localhost-star= tStop-1,5,main])--Detected database platform: org.eclipse.persistence.platf= orm.database.PostgreSQLPlatform [EL Config]: connection: 2016-08-25 12:04:38.709--ServerSession(914063279)-= -Connection(618694891)--Thread(Thread[localhost-startStop-1,5,main])--conne= cting(DatabaseLogin( platform=3D>PostgreSQLPlatform user name=3D> "" connector=3D>JNDIConnector datasource name=3D>java:comp/env/jdbc/po= stgresqlconnection )) [EL Config]: connection: 2016-08-25 12:04:38.711--ServerSession(914063279)-= -Connection(1752457075)--Thread(Thread[localhost-startStop-1,5,main])--Conn= ected: jdbc:postgresql://127.0.0.1:5432/onbbp?connectionTimeout=3D2&socketT= imeout=3D3 User: onbbp Database: PostgreSQL Version: 9.2.14 Driver: PostgreSQL Native Driver Version: PostgreSQL 9.4.1209 [EL Finest]: connection: 2016-08-25 12:04:38.711--ServerSession(914063279)-= -Connection(592395403)--Thread(Thread[localhost-startStop-1,5,main])--Conne= ction acquired from connection pool [read]. [EL Finest]: connection: 2016-08-25 12:04:38.711--ServerSession(914063279)-= -Connection(592395403)--Thread(Thread[localhost-startStop-1,5,main])--Conne= ction released to connection pool [read]. [EL Config]: connection: 2016-08-25 12:04:38.712--ServerSession(914063279)-= -Connection(1339180815)--Thread(Thread[localhost-startStop-1,5,main])--conn= ecting(DatabaseLogin( platform=3D>PostgreSQLPlatform user name=3D> "" connector=3D>JNDIConnector datasource name=3D>java:comp/env/jdbc/po= stgresqlconnection )) [EL Config]: connection: 2016-08-25 12:04:38.724--ServerSession(914063279)-= -Connection(1876240846)--Thread(Thread[localhost-startStop-1,5,main])--Conn= ected: jdbc:postgresql://127.0.0.1:5432/onbbp?connectionTimeout=3D2&socketT= imeout=3D3 User: onbbp Database: PostgreSQL Version: 9.2.14 Driver: PostgreSQL Native Driver Version: PostgreSQL 9.4.1209 [EL Finest]: sequencing: 2016-08-25 12:04:38.728--ServerSession(914063279)-= -Thread(Thread[localhost-startStop-1,5,main])--sequencing connected, state = is Preallocation_NoTransaction_State [EL Finest]: sequencing: 2016-08-25 12:04:38.728--ServerSession(914063279)-= -Thread(Thread[localhost-startStop-1,5,main])--sequence report_id_seq: prea= llocation size 1 ... ... #... IPTABLES RULE ADDED BLOCKING 5432 PORT 25-Aug-2016 12:06:25.631 INFO [http-nio-8081-exec-1] org.apache.tomcat.util= .http.LegacyCookieProcessor.processCookieHeader Cookies: Invalid cookie. Va= lue not a token or quoted value Note: further occurrences of Cookie errors will be logged at DEBUG level. [EL Finer]: connection: 2016-08-25 12:06:26.447--ServerSession(914063279)--= Thread(Thread[http-nio-8081-exec-1,5,main])--client acquired: 1265055413 [EL Finer]: transaction: 2016-08-25 12:06:26.447--ClientSession(1265055413)= --Thread(Thread[http-nio-8081-exec-1,5,main])--acquire unit of work: 145909= 1163 [EL Finest]: query: 2016-08-25 12:06:26.449--UnitOfWork(1459091163)--Thread= (Thread[http-nio-8081-exec-1,5,main])--Execute query ReadObjectQuery(name= =3D"readBpUser" referenceClass=3DBpUser sql=3D"SELECT email, admin, failed_= login_attempts, first_name, last_name, last_passwords, login_unlock_time, p= assword, password_creation, pw_reset_link, pw_reset_link_creation, register= _link, register_link_creation, status, bp_dealer_code FROM bp_user WHERE (e= mail =3D ?)") [EL Finest]: connection: 2016-08-25 12:06:26.449--ServerSession(914063279)-= -Connection(1113910109)--Thread(Thread[http-nio-8081-exec-1,5,main])--Conne= ction acquired from connection pool [read]. [EL Finest]: connection: 2016-08-25 12:06:26.449--ServerSession(914063279)-= -Thread(Thread[http-nio-8081-exec-1,5,main])--reconnecting to external conn= ection pool [EL Finest]: connection: 2016-08-25 12:06:39.461--ServerSession(914063279)-= -Connection(1113910109)--Thread(Thread[http-nio-8081-exec-1,5,main])--Conne= ction released to connection pool [read]. [EL Info]: 2016-08-25 12:06:39.461--UnitOfWork(1459091163)--Thread(Thread[h= ttp-nio-8081-exec-1,5,main])--Communication failure detected when attemptin= g to perform read query outside of a transaction. Attempting to retry query= . Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2= .5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseExcepti= on Internal Exception: org.postgresql.util.PSQLException: The connection attem= pt failed. Error Code: 0 Call: SELECT email, admin, failed_login_attempts, first_name, last_name, la= st_passwords, login_unlock_time, password, password_creation, pw_reset_link= , pw_reset_link_creation, register_link, register_link_creation, status, bp= _dealer_code FROM bp_user WHERE (email =3D ?) bind =3D> [user] Query: ReadObjectQuery(name=3D"readBpUser" referenceClass=3DBpUser sql=3D"S= ELECT email, admin, failed_login_attempts, first_name, last_name, last_pass= words, login_unlock_time, password, password_creation, pw_reset_link, pw_re= set_link_creation, register_link, register_link_creation, status, bp_dealer= _code FROM bp_user WHERE (email =3D ?)"). [EL Finest]: connection: 2016-08-25 12:06:39.466--ServerSession(914063279)-= -Connection(871128930)--Thread(Thread[http-nio-8081-exec-1,5,main])--Connec= tion acquired from connection pool [read]. [EL Finest]: connection: 2016-08-25 12:06:39.466--ServerSession(914063279)-= -Thread(Thread[http-nio-8081-exec-1,5,main])--reconnecting to external conn= ection pool [EL Finest]: connection: 2016-08-25 12:06:49.478--ServerSession(914063279)-= -Connection(871128930)--Thread(Thread[http-nio-8081-exec-1,5,main])--Connec= tion released to connection pool [read]. [EL Info]: 2016-08-25 12:06:49.478--UnitOfWork(1459091163)--Thread(Thread[h= ttp-nio-8081-exec-1,5,main])--Communication failure detected when attemptin= g to perform read query outside of a transaction. Attempting to retry query= . Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2= .5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseExcepti= on Internal Exception: org.postgresql.util.PSQLException: The connection attem= pt failed. Error Code: 0 Call: SELECT email, admin, failed_login_attempts, first_name, last_name, la= st_passwords, login_unlock_time, password, password_creation, pw_reset_link= , pw_reset_link_creation, register_link, register_link_creation, status, bp= _dealer_code FROM bp_user WHERE (email =3D ?) bind =3D> [user] Query: ReadObjectQuery(name=3D"readBpUser" referenceClass=3DBpUser sql=3D"S= ELECT email, admin, failed_login_attempts, first_name, last_name, last_pass= words, login_unlock_time, password, password_creation, pw_reset_link, pw_re= set_link_creation, register_link, register_link_creation, status, bp_dealer= _code FROM bp_user WHERE (email =3D ?)"). [EL Finest]: connection: 2016-08-25 12:06:54.479--ServerSession(914063279)-= -Connection(1018598475)--Thread(Thread[http-nio-8081-exec-1,5,main])--Conne= ction acquired from connection pool [read]. [EL Finest]: connection: 2016-08-25 12:06:54.479--ServerSession(914063279)-= -Thread(Thread[http-nio-8081-exec-1,5,main])--reconnecting to external conn= ection pool [EL Finest]: connection: 2016-08-25 12:07:04.49--ServerSession(914063279)--= Connection(1018598475)--Thread(Thread[http-nio-8081-exec-1,5,main])--Connec= tion released to connection pool [read]. [EL Info]: 2016-08-25 12:07:04.49--UnitOfWork(1459091163)--Thread(Thread[ht= tp-nio-8081-exec-1,5,main])--Communication failure detected when attempting= to perform read query outside of a transaction. Attempting to retry query.= Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.= 5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.postgresql.util.PSQLException: The connection attem= pt failed. Error Code: 0 Call: SELECT email, admin, failed_login_attempts, first_name, last_name, la= st_passwords, login_unlock_time, password, password_creation, pw_reset_link= , pw_reset_link_creation, register_link, register_link_creation, status, bp= _dealer_code FROM bp_user WHERE (email =3D ?) bind =3D> [user] Query: ReadObjectQuery(name=3D"readBpUser" referenceClass=3DBpUser sql=3D"S= ELECT email, admin, failed_login_attempts, first_name, last_name, last_pass= words, login_unlock_time, password, password_creation, pw_reset_link, pw_re= set_link_creation, register_link, register_link_creation, status, bp_dealer= _code FROM bp_user WHERE (email =3D ?)"). [EL Finest]: connection: 2016-08-25 12:07:09.491--ServerSession(914063279)-= -Connection(1798979254)--Thread(Thread[http-nio-8081-exec-1,5,main])--Conne= ction acquired from connection pool [read]. [EL Finest]: connection: 2016-08-25 12:07:09.491--ServerSession(914063279)-= -Thread(Thread[http-nio-8081-exec-1,5,main])--reconnecting to external conn= ection pool [EL Finest]: connection: 2016-08-25 12:07:19.501--ServerSession(914063279)-= -Connection(1798979254)--Thread(Thread[http-nio-8081-exec-1,5,main])--Conne= ction released to connection pool [read]. [EL Info]: 2016-08-25 12:07:19.502--UnitOfWork(1459091163)--Thread(Thread[h= ttp-nio-8081-exec-1,5,main])--Communication failure detected when attemptin= g to perform read query outside of a transaction. Attempting to retry query= . Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2= .5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseExcepti= on Internal Exception: org.postgresql.util.PSQLException: The connection attem= pt failed. Error Code: 0 Call: SELECT email, admin, failed_login_attempts, first_name, last_name, la= st_passwords, login_unlock_time, password, password_creation, pw_reset_link= , pw_reset_link_creation, register_link, register_link_creation, status, bp= _dealer_code FROM bp_user WHERE (email =3D ?) bind =3D> [user] Query: ReadObjectQuery(name=3D"readBpUser" referenceClass=3DBpUser sql=3D"S= ELECT email, admin, failed_login_attempts, first_name, last_name, last_pass= words, login_unlock_time, password, password_creation, pw_reset_link, pw_re= set_link_creation, register_link, register_link_creation, status, bp_dealer= _code FROM bp_user WHERE (email =3D ?)"). [EL Finest]: connection: 2016-08-25 12:07:24.502--ServerSession(914063279)-= -Connection(241140994)--Thread(Thread[http-nio-8081-exec-1,5,main])--Connec= tion acquired from connection pool [read]. [EL Finest]: connection: 2016-08-25 12:07:24.503--ServerSession(914063279)-= -Thread(Thread[http-nio-8081-exec-1,5,main])--reconnecting to external conn= ection pool [EL Finest]: connection: 2016-08-25 12:07:34.514--ServerSession(914063279)-= -Connection(241140994)--Thread(Thread[http-nio-8081-exec-1,5,main])--Connec= tion released to connection pool [read]. [EL Info]: 2016-08-25 12:07:34.514--UnitOfWork(1459091163)--Thread(Thread[h= ttp-nio-8081-exec-1,5,main])--Communication failure detected when attemptin= g to perform read query outside of a transaction. Attempting to retry query= . Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2= .5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseExcepti= on Internal Exception: org.postgresql.util.PSQLException: The connection attem= pt failed. Error Code: 0 Call: SELECT email, admin, failed_login_attempts, first_name, last_name, la= st_passwords, login_unlock_time, password, password_creation, pw_reset_link= , pw_reset_link_creation, register_link, register_link_creation, status, bp= _dealer_code FROM bp_user WHERE (email =3D ?) bind =3D> [user] Query: ReadObjectQuery(name=3D"readBpUser" referenceClass=3DBpUser sql=3D"S= ELECT email, admin, failed_login_attempts, first_name, last_name, last_pass= words, login_unlock_time, password, password_creation, pw_reset_link, pw_re= set_link_creation, register_link, register_link_creation, status, bp_dealer= _code FROM bp_user WHERE (email =3D ?)"). [EL Warning]: 2016-08-25 12:07:34.514--UnitOfWork(1459091163)--Thread(Threa= d[http-nio-8081-exec-1,5,main])--Local Exception Stack: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v2013050= 7-3faac2b): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.postgresql.util.PSQLException: The connection attem= pt failed. Error Code: 0 Call: SELECT email, admin, failed_login_attempts, first_name, last_name, la= st_passwords, login_unlock_time, password, password_creation, pw_reset_link= , pw_reset_link_creation, register_link, register_link_creation, status, bp= _dealer_code FROM bp_user WHERE (email =3D ?) bind =3D> [user] Query: ReadObjectQuery(name=3D"readBpUser" referenceClass=3DBpUser sql=3D"S= ELECT email, admin, failed_login_attempts, first_name, last_name, last_pass= words, login_unlock_time, password, password_creation, pw_reset_link, pw_re= set_link_creation, register_link, register_link_creation, status, bp_dealer= _code FROM bp_user WHERE (email =3D ?)") at org.eclipse.persistence.exceptions.DatabaseException.sqlExceptio= n(DatabaseException.java:316) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConne= ctor.java:135) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDataso= urce(DatasourceLogin.java:162) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccess= or.connectInternal(DatasourceAccessor.java:330) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor= .connectInternal(DatabaseAccessor.java:307) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccess= or.reconnect(DatasourceAccessor.java:565) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor= .reconnect(DatabaseAccessor.java:1619) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccess= or.incrementCallCount(DatasourceAccessor.java:305) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor= .basicExecuteCall(DatabaseAccessor.java:613) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor= .executeCall(DatabaseAccessor.java:558) at org.eclipse.persistence.internal.sessions.AbstractSession.basicE= xecuteCall(AbstractSession.java:1995) at org.eclipse.persistence.sessions.server.ServerSession.executeCal= l(ServerSession.java:570) at org.eclipse.persistence.sessions.server.ClientSession.executeCal= l(ClientSession.java:248) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMech= anism.executeCall(DatasourceCallQueryMechanism.java:242) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMech= anism.executeCall(DatasourceCallQueryMechanism.java:228) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMech= anism.selectOneRow(DatasourceCallQueryMechanism.java:714) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanis= m.selectOneRowFromTable(ExpressionQueryMechanism.java:2777) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanis= m.selectOneRow(ExpressionQueryMechanism.java:2730) at org.eclipse.persistence.queries.ReadObjectQuery.executeObjectLev= elReadQuery(ReadObjectQuery.java:526) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeData= baseQuery(ObjectLevelReadQuery.java:1155) at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQu= ery.java:899) at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(Obj= ectLevelReadQuery.java:1114) at org.eclipse.persistence.queries.ReadObjectQuery.execute(ReadObje= ctQuery.java:429) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUn= itOfWork(ObjectLevelReadQuery.java:1202) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.interna= lExecuteQuery(UnitOfWorkImpl.java:2894) at org.eclipse.persistence.internal.sessions.AbstractSession.execut= eQuery(AbstractSession.java:1797) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQ= uery(AbstractSession.java:1867) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery= (ClientSession.java:685) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQu= ery(UnitOfWorkImpl.java:5532) at org.eclipse.persistence.internal.sessions.AbstractSession.execut= eQuery(AbstractSession.java:1833) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQ= uery(AbstractSession.java:1867) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery= (ClientSession.java:685) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQu= ery(UnitOfWorkImpl.java:5532) at org.eclipse.persistence.internal.sessions.AbstractSession.execut= eQuery(AbstractSession.java:1833) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQ= uery(AbstractSession.java:1867) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery= (ClientSession.java:685) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQu= ery(UnitOfWorkImpl.java:5532) at org.eclipse.persistence.internal.sessions.AbstractSession.execut= eQuery(AbstractSession.java:1833) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQ= uery(AbstractSession.java:1867) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery= (ClientSession.java:685) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQu= ery(UnitOfWorkImpl.java:5532) at org.eclipse.persistence.internal.sessions.AbstractSession.execut= eQuery(AbstractSession.java:1833) at org.eclipse.persistence.internal.sessions.AbstractSession.execut= eQuery(AbstractSession.java:1779) at org.eclipse.persistence.internal.sessions.AbstractSession.execut= eQuery(AbstractSession.java:1730) at org.eclipse.persistence.internal.jpa.EntityManagerImpl.executeQu= ery(EntityManagerImpl.java:883) at org.eclipse.persistence.internal.jpa.EntityManagerImpl.findInter= nal(EntityManagerImpl.java:826) at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(Enti= tyManagerImpl.java:719) at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(Enti= tyManagerImpl.java:588) at com.vodafone.onbbp.database.dao.impl.BpUserDaoImpl.getById(BpUse= rDaoImpl.java:114) at com.vodafone.onbbp.rest.resources.LoginResource.loginBpUser(Logi= nResource.java:121) at com.vodafone.onbbp.rest.resources.LoginResource.loginUser(LoginR= esource.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessor= Impl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod= AccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.glassfish.jersey.server.model.internal.ResourceMethodInvocat= ionHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceM= ethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceM= ethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) at org.glassfish.jersey.server.model.internal.JavaResourceMethodDis= patcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherP= rovider.java:160) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceM= ethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(R= esourceMethodInvoker.java:389) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(Re= sourceMethodInvoker.java:347) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(Re= sourceMethodInvoker.java:102) at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.ja= va:326) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) at org.glassfish.jersey.internal.Errors.process(Errors.java:315) at org.glassfish.jersey.internal.Errors.process(Errors.java:297) at org.glassfish.jersey.internal.Errors.process(Errors.java:267) at org.glassfish.jersey.process.internal.RequestScope.runInScope(Re= questScope.java:317) at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.= java:305) at org.glassfish.jersey.server.ApplicationHandler.handle(Applicatio= nHandler.java:1154) at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebCompone= nt.java:471) at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.j= ava:425) at org.glassfish.jersey.servlet.ServletContainer.service(ServletCon= tainer.java:383) at org.glassfish.jersey.servlet.ServletContainer.service(ServletCon= tainer.java:336) at org.glassfish.jersey.servlet.ServletContainer.service(ServletCon= tainer.java:223) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter= (ApplicationFilterChain.java:291) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applica= tionFilterChain.java:206) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.ja= va:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter= (ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applica= tionFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWra= pperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardCon= textValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authe= nticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostVa= lve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportVa= lve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(Abstrac= tAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngi= neValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapte= r.java:521) at org.apache.coyote.http11.AbstractHttp11Processor.process(Abstrac= tHttp11Processor.java:1096) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.pro= cess(AbstractProtocol.java:674) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(Nio= Endpoint.java:1500) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEn= dpoint.java:1456) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExec= utor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExe= cutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(T= askThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: org.postgresql.util.PSQLException: The connection attempt failed. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(= ConnectionFactoryImpl.java:280) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionF= actory.java:67) at org.postgresql.jdbc.PgConnection.(PgConnection.java:212) at org.postgresql.Driver.makeConnection(Driver.java:407) at org.postgresql.Driver.connect(Driver.java:275) at org.apache.tomcat.dbcp.dbcp2.DriverConnectionFactory.createConne= ction(DriverConnectionFactory.java:38) at org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.makeObjec= t(PoolableConnectionFactory.java:255) at org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.create(Gener= icObjectPool.java:867) at org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.borrowObject= (GenericObjectPool.java:432) at org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.borrowObject= (GenericObjectPool.java:360) at org.apache.tomcat.dbcp.dbcp2.PoolingDataSource.getConnection(Poo= lingDataSource.java:133) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(Basic= DataSource.java:1532) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConne= ctor.java:123) ... 96 more Caused by: java.net.SocketTimeoutException: connect timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketIm= pl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainS= ocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl= .java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at org.postgresql.core.PGStream.(PGStream.java:64) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(= ConnectionFactoryImpl.java:150) ... 108 more [EL Finer]: transaction: 2016-08-25 12:07:34.534--UnitOfWork(1459091163)--T= hread(Thread[http-nio-8081-exec-1,5,main])--release unit of work [EL Finer]: connection: 2016-08-25 12:07:34.534--ClientSession(1265055413)-= -Thread(Thread[http-nio-8081-exec-1,5,main])--client released ------=_NextPart_000_006D_01D1FECB.47DBFA30 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc ------=_NextPart_000_006D_01D1FECB.47DBFA30--