users@glassfish.java.net

Re: Ping failed Exception

From: Bernhard Thalmayr <bernhard.thalmayr_at_painstakingminds.com>
Date: Mon, 16 Jan 2012 13:09:34 +0100

I had some issues with bridged connection too for other communication types.

Have you tried to use 'NAT' and configure a NAT-rule for the SQL connection?

You can then always use 'localhost' to connect to the database.

-Bernhard

On 1/16/12, forums_at_java.net <forums_at_java.net> wrote:
> Hi,
>
> could anyone help me figure this ping connection exception out? Heres my
> situation. I have MySql installed on Windows Server 2003 in Virtual Box on
> my PC. I can't install MySql workbench (which I need for a tutorial I want
> to do) locally because Vista has issues with it so I had to resort to
> putting
> it on a virtual machine. I managed to set up a connection pool for it the
> other day and pinged successfully to the Mysql server on virtual box. Today
> when I went to work with it I had to change the ip add of the connection
> because my vm uses dhcp (its a brigded connection). Now when I change the
> ip in the connection pool properties to match the new ip given by dhcp I get
> a ping exception. Heres the glassfish admin console error:
>
> "Connection could not be allocated because: Communications link failure due
> to underlying exception: ** BEGIN NESTED EXCEPTION **
> java.net.SocketException MESSAGE: java.net.SocketException: Malformed reply
> from SOCKS server STACKTRACE: java.net.SocketException:
> java.net.SocketException: Malformed reply from SOCKS server at
> com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
> at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284) at com.mysql..."
>
> The stacktrace:
>
> "WARNING: RAR8054: Exception while creating an unpooled [test] connection
> for
> pool [ MySql ], Connection could not be allocated because: Communications
> link failure due to underlying exception:
> ** BEGIN NESTED EXCEPTION **
> java.net.SocketException
> MESSAGE: java.net.SocketException: Malformed reply from SOCKS server
> STACKTRACE:
> java.net.SocketException: java.net.SocketException: Malformed reply from
> SOCKS server
> at
> com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
> at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
> at com.mysql.jdbc.Connection.createNewIO(Connection.java:2569)
> at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
> at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
> at
> com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.java:425)
> at
> com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.java:140)
> at
> com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.java:110)
> at
> com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource.getPooledConnection(MysqlConnectionPoolDataSource.java:58)
> at
> com.sun.gjc.spi.CPManagedConnectionFactory.createManagedConnection(CPManagedConnectionFactory.java:121)
> at
> com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getManagedConnection(ConnectorConnectionPoolAdminServiceImpl.java:517)
> at
> com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:627)
> at
> com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.testConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:439)
> at
> com.sun.enterprise.connectors.ConnectorRuntime.pingConnectionPool(ConnectorRuntime.java:910)
> at
> org.glassfish.admin.amx.impl.ext.ConnectorRuntimeAPIProviderImpl.pingJDBCConnectionPool(ConnectorRuntimeAPIProviderImpl.java:570)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.glassfish.admin.amx.impl.mbean.AMXImplBase.invoke(AMXImplBase.java:1038)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
> at
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
> at
> javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:288)
> at
> org.glassfish.admin.amx.util.jmx.MBeanProxyHandler.invoke(MBeanProxyHandler.java:453)
> at
> org.glassfish.admin.amx.core.proxy.AMXProxyHandler._invoke(AMXProxyHandler.java:822)
> at
> org.glassfish.admin.amx.core.proxy.AMXProxyHandler.invoke(AMXProxyHandler.java:526)
> at $Proxy140.pingJDBCConnectionPool(Unknown Source)
> at
> org.glassfish.admingui.common.handlers.JdbcTempHandler.pingJdbcConnectionPool(JdbcTempHandler.java:99)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:442)
> at
> com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420)
> at
> com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:394)
> at
> com.sun.jsftemplating.layout.event.CommandActionListener.invokeCommandHandlers(CommandActionListener.java:150)
> at
> com.sun.jsftemplating.layout.event.CommandActionListener.processAction(CommandActionListener.java:98)
> at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
> at
> javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:772)
> at javax.faces.component.UICommand.broadcast(UICommand.java:300)
> at
> com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:166)
> at
> javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:775)
> at
> javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1267)
> at
> com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
> at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
> at
> com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
> at
> org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
> at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
> at
> com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
> at
> org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
> at
> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:239)
> at
> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
> at
> com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
> at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
> at
> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
> at
> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
> at
> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
> at
> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
> at
> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
> at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
> at java.lang.Thread.run(Thread.java:662)
> ** END NESTED EXCEPTION **
> Last packet sent to the server was 13 ms ago."
>
>
>
> If anyone could help it would be much appreciated.
>
>
>
> Thanks,
>
> Alan
>
>
> --
>
> [Message sent by forum member 'asmith2306']
>
> View Post: http://forums.java.net/node/882728
>
>
>


-- 
IT-Consulting Bernhard Thalmayr
- Painstaking Minds -
83620 Vagen (Munich area)
Germany