[ 
https://issues.apache.org/jira/browse/GEODE-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16397576#comment-16397576
 ] 

ASF subversion and git services commented on GEODE-4266:
--------------------------------------------------------

Commit a07b67a7dc7828528864520352daf7401249dac7 in geode's branch 
refs/heads/develop from [~nreich]
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=a07b67a ]

GEODE-4266: Make JdbcConnectionException safely serializable to clients (#1601)


  * SQLExceptions that come from underlying sql drivers may not be availale
    on clients or locators and will not be deserializable. When these
    exceptions are contained in a JdbcConnectorException, the stack trace
    is instead converted to a string to ensure safe serialization


> JMX manager should not deserialize exceptions from server
> ---------------------------------------------------------
>
>                 Key: GEODE-4266
>                 URL: https://issues.apache.org/jira/browse/GEODE-4266
>             Project: Geode
>          Issue Type: Bug
>          Components: regions
>            Reporter: Fred Krone
>            Assignee: Nick Reich
>            Priority: Major
>              Labels: jdbc, pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Steps
> Created a jdbc-connection, jdbc-mapping, region in gfsh
> Tried a .get from the region which attempted to read through with the 
> JdbcLoader
> However it could not connect to the endpoint and threw an exception (fine).  
> But the exception wasn't handled in gfsh -- gfsh appeared hung.
> [info 2018/01/09 13:42:41.338 PST s1 <Function Execution Processor1> 
> tid=0x4b] Exception occurred:
> java.lang.IllegalStateException: Could not connect ...
>       at 
> org.apache.geode.connectors.jdbc.internal.SqlHandler.getConnection(SqlHandler.java:59)
>       at 
> org.apache.geode.connectors.jdbc.internal.SqlHandler.read(SqlHandler.java:73)
>       at org.apache.geode.connectors.jdbc.JdbcLoader.load(JdbcLoader.java:52)
>       at 
> org.apache.geode.internal.cache.SearchLoadAndWriteProcessor.doLocalLoad(SearchLoadAndWriteProcessor.java:791)
>       at 
> org.apache.geode.internal.cache.SearchLoadAndWriteProcessor.load(SearchLoadAndWriteProcessor.java:602)
>       at 
> org.apache.geode.internal.cache.SearchLoadAndWriteProcessor.searchAndLoad(SearchLoadAndWriteProcessor.java:461)
>       at 
> org.apache.geode.internal.cache.SearchLoadAndWriteProcessor.doSearchAndLoad(SearchLoadAndWriteProcessor.java:177)
>       at 
> org.apache.geode.internal.cache.DistributedRegion.findUsingSearchLoad(DistributedRegion.java:2338)
>       at 
> org.apache.geode.internal.cache.DistributedRegion.findObjectInSystem(DistributedRegion.java:2208)
>       at 
> org.apache.geode.internal.cache.LocalRegion.nonTxnFindObject(LocalRegion.java:1477)
>       at 
> org.apache.geode.internal.cache.LocalRegionDataView.findObject(LocalRegionDataView.java:176)
>       at 
> org.apache.geode.internal.cache.LocalRegion.get(LocalRegion.java:1366)
>       at 
> org.apache.geode.internal.cache.LocalRegion.get(LocalRegion.java:1300)
>       at 
> org.apache.geode.internal.cache.LocalRegion.get(LocalRegion.java:1285)
>       at 
> org.apache.geode.internal.cache.AbstractRegion.get(AbstractRegion.java:320)
>       at 
> org.apache.geode.management.internal.cli.functions.DataCommandFunction.get(DataCommandFunction.java:443)
>       at 
> org.apache.geode.management.internal.cli.functions.DataCommandFunction.get(DataCommandFunction.java:151)
>       at 
> org.apache.geode.management.internal.cli.functions.DataCommandFunction.execute(DataCommandFunction.java:116)
>       at 
> org.apache.geode.internal.cache.MemberFunctionStreamingMessage.process(MemberFunctionStreamingMessage.java:187)
>       at 
> org.apache.geode.distributed.internal.DistributionMessage.scheduleAction(DistributionMessage.java:382)
>       at 
> org.apache.geode.distributed.internal.DistributionMessage$1.run(DistributionMessage.java:448)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>       at 
> org.apache.geode.distributed.internal.ClusterDistributionManager.runUntilShutdown(ClusterDistributionManager.java:1117)
>       at 
> org.apache.geode.distributed.internal.ClusterDistributionManager.access$000(ClusterDistributionManager.java:108)
>       at 
> org.apache.geode.distributed.internal.ClusterDistributionManager$9$1.run(ClusterDistributionManager.java:987)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 
> Communications link failure
> The last packet sent successfully to the server was 0 milliseconds ago. The 
> driver has not received any packets from the server.
>       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:423)
>       at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
>       at 
> com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990)
>       at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:341)
>       at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2186)
>       at 
> com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2219)
>       at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2014)
>       at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:776)
>       at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
>       at sun.reflect.GeneratedConstructorAccessor34.newInstance(Unknown 
> Source)
>       at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>       at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
>       at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386)
>       at 
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
>       at 
> com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:117)
>       at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:375)
>       at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:204)
>       at 
> com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:459)
>       at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:533)
>       at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:114)
>       at 
> com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:97)
>       at 
> org.apache.geode.connectors.jdbc.internal.HikariJdbcDataSource.getConnection(HikariJdbcDataSource.java:37)
>       at 
> org.apache.geode.connectors.jdbc.internal.SqlHandler.getConnection(SqlHandler.java:57)
>       ... 26 more
> Caused by: java.net.SocketTimeoutException: connect timed out
>       at java.net.PlainSocketImpl.socketConnect(Native Method)
>       at 
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
>       at 
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.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 
> com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211)
>       at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:300)
>       ... 46 more



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to