Re: Thread stucked at (java.net.SocketInputStream.socketRead0(Native Method))
Jaiswal, This issue is of connection between your host and postgresql server, you are trying to connect and has nothing to do with Tomcat per say. To debug the issue, you will have to answer few more question: Is your postgresql server responsive? Have you ever been able to get a valid connection during the lifetime of the application? Was it working for sometime, and then you suddenly start getting this issue...? Assuming you have isolated this thread correctly as one which is stuck(by taking multiple thread dump...) for how long it has been stuck? Is it ever coming out of that stuck state? Look into the state of tcp connection using netstat. Regards, Ameer Mawia On Sat, Nov 22, 2014 at 10:44 AM, Dhaval Jaiswal dhaval.jais...@via.com wrote: yes. the thread is stucked and started increasing load of the server. My configuration is as below. Query is fetching one row only. Resource name=jdbc auth=Container type=javax.sql.DataSource driverClassName=org.postgresql.Driver url=jdbc:postgresql maxActive=100 maxIdle=20 maxWait=3 validationQuery=select 1 testOnBorrow=true removeAbandoned=true removeAbandonedTimeout=120 logAbandoned=true / On Sat, Nov 22, 2014 at 1:29 AM, Ameer Mawia ameer.ma...@gmail.com wrote: Jaiswal, what your exact question is? Obviously in your application, you need a DB connection and if this is thread which is stuck, stack trace tells that tomcat dbcp, is trying to get you a connection, but stuck while reading the result of validate query which it had run before returning you a valid connection. Probably you can take a look at validation query, for now? Ideally it should be a very simple query, returning just one row and column. Regards, Ameer Mawia On Sat, Nov 22, 2014 at 12:30 AM, Dhaval Jaiswal dhaval.jais...@via.com wrote: Following thread stuck and increased the load. java.net.SocketInputStream.read(SocketInputStream.java:129) org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:145) org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:114) org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:73) org.postgresql.core.PGStream.ReceiveChar(PGStream.java:274) org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1660) org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500) org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374) org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254) org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208) org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:332) org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312) org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:991) org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84) org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96) org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) com.eos.accounts.util.AccountsDatabaseManager.getConnection(Unknown Source) com.eos.accounts.util.AccountsDatabaseManager.getConnection(Unknown Source) com.eos.accounts.policies.PolicyManager.getAllPoliciesForUser(PolicyManager.java:62) com.eos.accounts.policies.Policies.loadAllPoliciesForUser(Policies.java:25) com.eos.accounts.data.User.createFromDataSet(User.java:3165) com.eos.accounts.data.User.getUserById(User.java:2878) com.eos.b2c.beans.GenericProductBean.setDeliveryDetails(GenericProductBean.java:320) com.eos.b2c.ui.ResellerNavigation.doGet(ResellerNavigation.java:2362) com.eos.b2c.ui.ResellerNavigation.doPost(ResellerNavigation.java:579) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) thread dump http-8080-2 daemon prio=10 tid=0x5335e000 nid=0x6d82 runnable [0x2b8b9a5c9000..0x2b8b9a5caa90] java.lang.Thread.State: RUNNABLE at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:145) at
Re: Thread stucked at (java.net.SocketInputStream.socketRead0(Native Method))
Is your postgresql server responsive? Yes, there is no error logged in db server and server is very much responsive. Have you ever been able to get a valid connection during the lifetime of the application? Yes Was it working for sometime, and then you suddenly start getting this issue...? Yes. it happenes suddendly and sometime not always. Assuming you have isolated this thread correctly as one which is stuck(by taking multiple thread dump...) for how long it has been stuck? Many thread dump took, analyzed and says thread stuck while getting the connection from the db or trying to execute queries. Is it possible firewall dropping connection when Apps server trying to get the db connection. Is it ever coming out of that stuck state? yes. However, number of threads are not coming down. Look into the state of tcp connection using netstat. 1 FIN_WAIT1 1 Foreign 1 established) 2 LAST_ACK 2 SYN_SENT 4 CLOSING 10 LISTEN 17 CLOSE_WAIT 116 TIME_WAIT 287 ESTABLISHED On Sat, Nov 22, 2014 at 3:08 PM, Ameer Mawia ameer.ma...@gmail.com wrote: Jaiswal, This issue is of connection between your host and postgresql server, you are trying to connect and has nothing to do with Tomcat per say. To debug the issue, you will have to answer few more question: Is your postgresql server responsive? Have you ever been able to get a valid connection during the lifetime of the application? Was it working for sometime, and then you suddenly start getting this issue...? Assuming you have isolated this thread correctly as one which is stuck(by taking multiple thread dump...) for how long it has been stuck? Is it ever coming out of that stuck state? Look into the state of tcp connection using netstat. Regards, Ameer Mawia On Sat, Nov 22, 2014 at 10:44 AM, Dhaval Jaiswal dhaval.jais...@via.com wrote: yes. the thread is stucked and started increasing load of the server. My configuration is as below. Query is fetching one row only. Resource name=jdbc auth=Container type=javax.sql.DataSource driverClassName=org.postgresql.Driver url=jdbc:postgresql maxActive=100 maxIdle=20 maxWait=3 validationQuery=select 1 testOnBorrow=true removeAbandoned=true removeAbandonedTimeout=120 logAbandoned=true / On Sat, Nov 22, 2014 at 1:29 AM, Ameer Mawia ameer.ma...@gmail.com wrote: Jaiswal, what your exact question is? Obviously in your application, you need a DB connection and if this is thread which is stuck, stack trace tells that tomcat dbcp, is trying to get you a connection, but stuck while reading the result of validate query which it had run before returning you a valid connection. Probably you can take a look at validation query, for now? Ideally it should be a very simple query, returning just one row and column. Regards, Ameer Mawia On Sat, Nov 22, 2014 at 12:30 AM, Dhaval Jaiswal dhaval.jais...@via.com wrote: Following thread stuck and increased the load. java.net.SocketInputStream.read(SocketInputStream.java:129) org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:145) org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:114) org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:73) org.postgresql.core.PGStream.ReceiveChar(PGStream.java:274) org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1660) org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500) org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374) org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254) org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208) org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:332) org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312) org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:991) org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84) org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96) org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) com.eos.accounts.util.AccountsDatabaseManager.getConnection(Unknown Source) com.eos.accounts.util.AccountsDatabaseManager.getConnection(Unknown Source)
Re: Thread stucked at (java.net.SocketInputStream.socketRead0(Native Method))
On Sat, Nov 22, 2014 at 4:03 PM, Dhaval Jaiswal dhaval.jais...@via.com wrote: Is your postgresql server responsive? Yes, there is no error logged in db server and server is very much responsive. Have you ever been able to get a valid connection during the lifetime of the application? Yes Was it working for sometime, and then you suddenly start getting this issue...? Yes. it happenes suddendly and sometime not always. Assuming you have isolated this thread correctly as one which is stuck(by taking multiple thread dump...) for how long it has been stuck? Many thread dump took, analyzed and says thread stuck while getting the connection from the db or trying to execute queries. Is it possible firewall dropping connection when Apps server trying to get the db connection. I don't think, firewall is an issue, as you said you are able to get connection successfully for sometime and this is happening only intermittently. Is it ever coming out of that stuck state? yes. However, number of threads are not coming down. How is it coming out? Does it throws SocketTimeOutException or does it return back normally returning a valid connection. But in any case, your thread is no lunger stuck. If number of thread is not coming down, it is because it must be busy doing other things. You can't expect the thread to die down just after getting a connection. It must proceed on doing other stuff in your code flow. Look into the state of tcp connection using netstat. 1 FIN_WAIT1 1 Foreign 1 established) 2 LAST_ACK 2 SYN_SENT 4 CLOSING 10 LISTEN 17 CLOSE_WAIT 116 TIME_WAIT 287 ESTABLISHED You can use below command to get the state of connection opened by your tomcat process: netstat -atp|grep pid of the tomcat process In any case, by the symptom you mentioned(connection hunged intermittently),I highly expect it is the postgresql server which is causing the issue. You should check the load at that specific time at your db server. Try connecting an alternate, probably back db server, to see is issue still exist, which I'm to certain extent sure, it will not. On Sat, Nov 22, 2014 at 3:08 PM, Ameer Mawia ameer.ma...@gmail.com wrote: Jaiswal, This issue is of connection between your host and postgresql server, you are trying to connect and has nothing to do with Tomcat per say. To debug the issue, you will have to answer few more question: Is your postgresql server responsive? Have you ever been able to get a valid connection during the lifetime of the application? Was it working for sometime, and then you suddenly start getting this issue...? Assuming you have isolated this thread correctly as one which is stuck(by taking multiple thread dump...) for how long it has been stuck? Is it ever coming out of that stuck state? Look into the state of tcp connection using netstat. Regards, Ameer Mawia On Sat, Nov 22, 2014 at 10:44 AM, Dhaval Jaiswal dhaval.jais...@via.com wrote: yes. the thread is stucked and started increasing load of the server. My configuration is as below. Query is fetching one row only. Resource name=jdbc auth=Container type=javax.sql.DataSource driverClassName=org.postgresql.Driver url=jdbc:postgresql maxActive=100 maxIdle=20 maxWait=3 validationQuery=select 1 testOnBorrow=true removeAbandoned=true removeAbandonedTimeout=120 logAbandoned=true / On Sat, Nov 22, 2014 at 1:29 AM, Ameer Mawia ameer.ma...@gmail.com wrote: Jaiswal, what your exact question is? Obviously in your application, you need a DB connection and if this is thread which is stuck, stack trace tells that tomcat dbcp, is trying to get you a connection, but stuck while reading the result of validate query which it had run before returning you a valid connection. Probably you can take a look at validation query, for now? Ideally it should be a very simple query, returning just one row and column. Regards, Ameer Mawia On Sat, Nov 22, 2014 at 12:30 AM, Dhaval Jaiswal dhaval.jais...@via.com wrote: Following thread stuck and increased the load. java.net.SocketInputStream.read(SocketInputStream.java:129) org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:145) org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:114) org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:73) org.postgresql.core.PGStream.ReceiveChar(PGStream.java:274) org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1660) org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
Tomcat 8 does not start with java 8 on YOSEMITE
Dear tomcat community Maybe someone did have this before (and possibly solved it) On a mac book pro/JOSEMITE I installed Java 8 1.8.0_40-ea with JDK. My $JAVA_HOME is /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home Then I downloaded a tomcat 8 core from http://tomcat.apache.org/download-80.cgi When I start this tomcat 8 I get the following Java exceptio - see below. With this Java 8 also my older tomcat 7 throws the same exception. The official oracle java test page (https://www.java.com/en/download/installed.jsp) says, I have already java uptodate. The exception: It seems that sun/management/ExtendedPlatformComponent be not part of tomcat 8 nor java 8 ... Does anyone have some hints for me? I cannot figure our what is wrong ... Thank you very much in advance! Kind regards Fabio PS: The exception on start (/bin/startup.sh): 22-Nov-2014 18:43:02.218 SEVERE [main] org.apache.tomcat.util.digester.Digester.startElement Begin event threw error * java.lang.NoClassDefFoundError: sun/management/ExtendedPlatformComponent* at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:494) at org.apache.tomcat.util.modeler.Registry.getMBeanServer(Registry.java:443) at org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:580) at org.apache.catalina.mbeans.MBeanUtils.clinit(MBeanUtils.java:77) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.clinit(GlobalResourcesLifecycleListener.java:66) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at java.lang.Class.newInstance(Class.java:442) at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:117) at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1184) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1457) at org.apache.catalina.startup.Catalina.load(Catalina.java:551) at org.apache.catalina.startup.Catalina.load(Catalina.java:599) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484) -- Kind regards / Meilleures salutations / Freundliche Grüsse /Fabio Ricci/ semweb Semantic Web Technologies · Records Management Software systems · ICT coaching · ICT Projects leading *www.semweb.ch* http://semweb.ch Weinmanngasse 26 CH-8700 Küsnacht ZH (Switzerland) /Tel./ +41 (076) 5281961 +39 (389) 0681334 /Skype:/ *semweb-llc* http://myskype.info/semweb-llc *Confidentiality Warning*: This message and any attachments are intended only for the use of the intended recipients, are confidential and maybe privileged. If you are not the intended recipient, you are hereby notified that any review, retransmission, conversion to hard copy, copying, circulation or other use of this message and any attachments is strictly prohibited. If you are not the intended recipient,
How to get rid of that Tomcat page? Please help!
A few days ago, when I tried to access a web site that I frequently access, I obtained an Apache Tomcat page that said: If you're seeing this page via a web browser, it means you've set up Tomcat successfully. Congratulations! But I have never set up Tomcat, I don't know what is Tomcat and I just want to get rid of that thing and to be able to access that web site again. I don't know how that thing took control of my Mac. Since that first time, I have never been able to access my web site. It's only happening on my Mac; on any other computer I can access the site without problems. Could someone tell me how to get rid of that? Richard Aubry - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to get rid of that Tomcat page? Please help!
Richard, On Nov 23, 2014 6:04 AM, Richard Aubry aubry...@gmail.com wrote: A few days ago, when I tried to access a web site that I frequently access, I obtained an Apache Tomcat page that said: If you're seeing this page via a web browser, it means you've set up Tomcat successfully. Congratulations! You are seeing a default Tomcat page (i.e. Root application). It seems that the website you frequent uses Tomcat. They probably upgraded Tomcat incorrectly and used Tomcat default page. There is nothing wrong with your computer. You could probably email website administrators about the problem. It is also likely the problem is going to get fixed by the time you see this message :) Another thing to try - use a different computer, or your phone to access this website. Good luck! But I have never set up Tomcat, I don't know what is Tomcat and I just want to get rid of that thing and to be able to access that web site again. I don't know how that thing took control of my Mac. Since that first time, I have never been able to access my web site. It's only happening on my Mac; on any other computer I can access the site without problems. Could someone tell me how to get rid of that? Richard Aubry - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org