草庐IT

connect_timeout

全部标签

java - 获取 "java.io.IOException: An existing connection was forcibly closed by the remote host"

我正在对IBMCloudBPM进行休息调用。有时调用工作正常。但有时会出现以下错误。java.io.IOException:Anexistingconnectionwasforciblyclosedbytheremotehost.java.io.IOException:Anexistingconnectionwasforciblyclosedbytheremotehostatsun.nio.ch.SocketDispatcher.read0(NativeMethod)atsun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)

java - "Timeout while fetching"URLFetch GAE/J

我正在使用XMLReader来简单地阅读如下所示的提要。URLConnectionurlConnection=url.openConnection();XmlReaderreader=newXmlReader(urlConnection);当它被调用时,我会在5秒内收到一个IOException“Timeout在获取时”。所以我尝试将超时设置为最大值。(10秒)但仍然没有运气,并且在5秒内仍然是IOExeption。urlConnection.setConnectTimeout(10000);(最大值在文档中说明:http://code.google.com/intl/nl-NL/ap

java - Hibernate 4 中的 SessionFactory.openSession(Connection)

我正在使用SessionFactory.openSession(Connection)获取现有的JDBC连接。现在在4.0中此方法不可用。我应该使用哪种方法? 最佳答案 您可以使用SessionFactory.withOptions()和SessionBuilder.connection(Connectionconnection).SessionBuilder连接(Connection连接)AddsaspecificconnectiontothesessionoptionsParameters:connection-Theconne

java - 远程调试 : Failed to connect to remote VM. 连接超时

我在我的UbuntuVM上使用Eclipse远程调试远程WebLogic应用程序,然后它停止工作。我在远程服务器上打开了调试。从我的VM,我可以远程登录到远程调试端口。我试过重新启动Eclipse并将网络连接设置为Direct。它只是一直超时。FailedtoconnecttoremoteVM.Connectiontimedout.org.eclipse.jdi.TimeoutException在.log中:!MESSAGEFailedtoconnecttoremoteVM.Connectiontimedout.!STACK0org.eclipse.jdi.TimeoutExcepti

java - 我得到 java.net.SocketException : Permission denied: connect when sending an email in Jenkins

我的配置:Windows7机器Java7Jenkins1.511在本地帐户上作为服务运行我的jenkins.xml文件jenkinsJenkinsC:\ProgramFiles\IBM\SDP8.5\jdk\bin\java.exe-Xrs-Xmx256m-Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle-jar"%BASE%\jenkins.war"--httpPort=8080-Djava.net.preferIPv4Stack=true我的hudson.tasks.Mailer.xml文件@example.com

java - hibernate : closing the session factory does not close the c3p0 connection pool

我最近开始在我的应用程序中使用hibernate和c3p0作为ORM。但是,当我关闭session工厂时,连接池并没有自行关闭!这是我的应用程序中也是唯一的地方,我可以在其中对session执行任何操作。StatelessSessionsession=null;Transactiontransaction=null;try{session=sessionFactory.openStatelessSession();transaction=session.beginTransaction();Listlist=session.getNamedQuery("getAvailableThin

java - InetAddress.getByName(host).isReachable(timeout) 的最佳替代方案

我正在尝试联系主机并获得以下代码if(!InetAddress.getByName(host).isReachable(TIMEOUT)){thrownewException("Hostdoesnotexist::"+hostname);}我可以从Windowsping的主机名,也对其进行了tracert,它返回了所有数据包。但是java抛出异常“主机不存在::”;我试验的超时值从2000毫秒到5000毫秒。我也试过3000。我无法理解这个问题的原因是什么。我在网上进行了研究,有人说InetAddress.getByName(host).isReachable(time)不可靠并且根据

java - Apache 米娜 : how to get the IP from a connected client

谁能告诉我如何从连接的客户端获取IP地址?目前我已经找到了session.getRemoteAddress().toString()并返回类似的东西/192.168.1.100:49879这样可以吗?我可以做一些只能返回192.168.1.100的事情吗?当我使用套接字时,我使用的是类似这样的东西:socket.getInetAddress().getHostAddress();在apachemina中使用IoSession有类似的东西吗? 最佳答案 将getRemoteAddress()返回的SocketAddress向下转换为I

java - Redshift 和 Postgres JDBC 驱动程序都拦截 jdbc ://postgresql connection string

我有一个不太确定如何解决的问题:我有一个Web应用程序(打包为war),客户端可以配置他们希望指向的数据库。我们支持PostgreSQL和Redshift(以及其他)。JDBC4驱动程序会自动加载,这很好。问题是:看来RedshiftJDBC驱动程序会先于PostgreSQL响应jdbc://postgresql连接字符串。这会在连接到PostgreSQL数据库时导致JDBC错误。我在我的pom.xml中将驱动程序名称“org.postgresql.Driver”指定为数据源的驱动程序,但我不确定springJDBC模板如何选择驱动程序(除非它选择第一个处理程序)。还有其他人遇到过此类

pymysql.err.OperationalError: (2003, “Can‘t connect to MySQL server on ‘127.0.0.1‘ ([WinError 10061]

Django连接mysql时pymysql报错pymysql.err.Operationa77lError:(2003,“Can’tconnecttoMySQLserveron‘127.0.0.1’([WinError10061]由于目标计算机积极拒绝,无法连接。)”)raiseexcpymysql.err.OperationalError:(2003,“Can’tconnecttoMySQLserveron‘localhost’([WinError10061]由于目标计算机积极拒绝,无法连接。)”)常见错误及其原因NOTE:pymysql和mysql都需要安装!!!安装mysql后进入mys