Sockets - BufferedReader.read() operation time-out
Hi all,
I'm facing some problems to receive data over socket connection from a PC. I send data via BufferedWriter, but I have time-out error (IOException: Operation timed-out) and I can't see why it happens.
Here is part of my code:
StringBuffer strBuffer = new StringBuffer();
int charRead;
File xmlFile = null;
FileWriter fw = null;
try{
if(s != null){
bufReader = new BufferedReader(new InputStreamReader(s.getInputStream()));
xmlFile = new File(fileName);
if(xmlFile.exists())
xmlFile.delete();
xmlFile.createNewFile();
fw = new FileWriter(xmlFile);
}else{
connect();
//while((line = bufReader.readLine()) != null)
while((charRead = bufReader.read()) > -1)
strBuffer.append((char)charRead );
bufReader.close();
String writeString = strBuffer.substring(4);
if(fw == null){
setErroSocket(true);
setMsgErroSocket("I/O Error: Erro recebendo dados via Socket");
fw.write(writeString);
fw.flush();
}catch(IOException ioE){
setErroSocket(true);
setMsgErroSocket("I/O Error: " + ioE.getMessage());
return xmlFile;
If nore detailed information is need, please ask me.
Thanks for any help !
Hi,
I believe I found where was the problem. I was a bit confused with setSoTimeout(), because I thought it set the limit of time for read bytes, but in fact it controls the limit of time that conection is off. Looking a little deeper in my code I saw that bytes are read, but the exception occurs the same way.
I just need to change some things because I need a permanent client socket on-line because I'll need constantly comunication with a server application (Delphi) running on a PC. I believe that I must start with changing my ClientSocket class into a Thread.
Thanks for your help !
Similar Messages
-
Dear all,
I am facing one problem with my user pc "The wait operation time out"
ERROR=
Aconnection was successfully established with the server. but then an error occurred during the pre-loging handshake. (provided , SSL providing error-0 , The wait operation time out microsoft SQL server error- 258.
my user-pc use windows 7 and connect VPN by using "Sonic-wall" we connect successfully and get my remote server IP ping reply but when try to access remote server database that time I am getting this error
At the same time using same network and id can connect the server from vpn and access database from other
system.
please help me sort it out this issue.
thanks
sajalHi Sajal,
It is possible that remote machine(server) is up but please check whether database server is up or not.
Please contact database administrator to know the status of database. This will help you to know the cause.
If database is down you cannot connect it. -
In my office, I have a MacBook and a Mac Pro. I tried to ssh to the Mac Pro from the Macbook and got the "operation time out" error. I am able to ssh to a Linux box from my Macbook.
Anybody has encountered this? Thanks.I solved the problem.
I should select "set access for specific services and applications" in Preferences/Security/Firewall. -
ORA-12535 TNS:Operation time Out and ORA-12154:TNS Could not resolve servic
Greetings!!!
I have installed my Oracle Database 10g & Developer Suite 10g in Windows XP Pro Machine. Oracle Application Server 10g is also installed in Windows 2003 Server machine.Both machine have different domain.When using Form Developer Suite OC4J to run my form program, i can connect to the database properly run the form perfectly.
Problem encountered.
When I tried to run the form using Application Server 10g(installed in Windows 2003 Server), I got an error ORA-12154:TNS Could not resolve service name when connecting to the database and I got an error ORA-12535 TNS:Operation time Out when using TNSPing. I checked both the configuration of TNSNAMES.ORA(database & Application SErver) using the same port & service name but still got the same error.
Hope somebody can help me out there...
Many thanks in advance.
Regards,
BTFI have seen this before with my setup, I found that I had to go into the net configuration assistant, and change my host name to the fully qualified name, example: my compuer name is computer1, I had to enter in computer1.OIT.Docfinity.com for it to take. That has always gotten me past that TNS error, just my 2 cents, hope it helps.
keep on keeping on. -
JZ0T3: Read operation timed out
Hi! I'm trying to solve this problem for a while and actually I couldnt find the cause of the problem.
For some reason, deep inside the code of my application that error happends when I execute some inserts on the same Sybase table (they could be performed concurrently). I said "deep inside the code" since if I test a similar code, but outside the application (that is, just executing the inserts in a stand alone java main) the problem can't be reproduced.
The connection is obtained normally as follows:
try {
Class.forName("com.sybase.jdbc2.jdbc.SybDriver");
}catch (ClassNotFoundException e) {
System.out.println("Oops!");
Connection conn = DriverManager.getConnection(url,user,psw);
conn.setAutoCommit(true);
The driver been used is jconnect 4.5
Then, several inserts are performed:
String exampleQuery = "INSERT INTO SampleTable (id) VALUES ("1")\nSELECT @@IDENTITY";
PreparedStatement stmt = conn.prepareStatement(exampleQuery);
ResultSet rs = stmt.executeQuery();
if (rs.next())
System.out.println(rs.getInt(1));
Some of the query executions raise the following exception:
java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0T3: Read operation timed out.
at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:485)
at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:2961)
at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1796)
at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:201)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:182)
at com.sybase.jdbc2.jdbc.SybStatement.queryLoop(SybStatement.java:1455)
at com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybStatement.java:1440)
at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:70)
I've just found a workarround to solve this problem: synchronizing the execution of the query. That seems to avoid concurrent insertion.
The funny thing is: when I extract the code from the application and execute it in a stand alone java main, even stressing with multiple threads executing batch inserts in a for clause, the problem NEVER happends.
Any tip is welcome since I actually don't know what to do. Thanks a lot, I hope anyone replies!!
Bye!Hi Sean,
I informed the senior developer and she said she has emailed the Oracle regarding this issue. We are developing a website for a company who has purchased the Oracle CRM on demand. Is it mandatory for every one to create a service request? You can email me at [email protected] and I will contact you directly.
Thanks
Jay -
Why does my Adobe Reader installation time out?
Why does my Adobe Reader installation time out at 64 percent on Windows XP?
I am currently running version 9.5.2.
Does anyone have a solution please.Hi,
This "timeout at 64%" issue has been reported more than a few times here.
You can try direct download from
http://get.adobe.com/reader/enterprise/
If you can dedicate some time and help to investigate the issue, here is what I would ask:
Before trying the link I have provided, can you please enable verbose MSI logging and try to install Reader the way you did originally - I assume that you used Adobe.com, right?
If it fails again at 64%, please find the latest MSIxxxxx.log file in the Temp folder and send it to me.
To enable Windows Installer logging
http://support.microsoft.com/kb/223300
...open the registry with Regedit.exe and create the following path and keys:
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer
Reg_SZ: Logging
Value: voicewarmupx
The Temp folder on Windows XP is
C:\Documents and Settings\[YourUserName]\Local Settings\Temp -
System I/O Operation Time-out
I am running iTunes 6.0.5 for Windows. When I try to sync to load about 200 songs on my iPod nano (1st generation)I get the error "The specified I/O operation on drive G: was not completed before the time-out period expired." If I am lucky I might get one or two songs downloaded to my iPod at a time. Any help that could be offered would be greatly appreciated.
I am running iTunes 6.0.5 for Windows. When I try to
sync to load about 200 songs on my iPod nano (1st
generation)I get the error "The specified I/O
operation on drive G: was not completed before the
time-out period expired." If I am lucky I might get
one or two songs downloaded to my iPod at a time.
Any help that could be offered would be greatly
appreciated.
Is the iPod Nano connected to a USB 2.0 port, or a USB 1.1 port? -
IFS-21030 Database Operation time out
Hi everyone,
I really need help with this one. I try to search for a folder with a certain value for a custom attribute. It ALWAYS takes a very long time, but some times it returns successfully and sometimes it gives me a "Database Operation timed out" IFSException.
I tried to change the attribute setting to make it indexed, but it didn't help.
I'm using Oracle Files 9.0.2 (which, I think uses CM SDK 9.0.3, or at least this is the jar I'm using on the client side).
This doesn't happen with all folder queries, just the query where I use the
FolderRestrictQualification.setMultiLevel(true)
Can anyone help me with this?setMultiLevel(true) enables folder recursion, of course, which can be an expensive operation, depending on how many levels deep you need to go.
how many subfolders (and documents) are we talking about here?
.rich -
After successful deployment of my wcf service to staging or production I get the following message when I browse to the url:
<big>Network Error (tcp_error)</big>
A communication error occurred: "Operation timed out"
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.
There is nothing to tell me what the problem could be. The service is running. However, the endpoint status is "down"
If I create a new wcf service and deploy it then it works fine, which leads me to believe that there is something wrong with the config file. Any ideas?some times this massage may be received because of the name resolution problem, so simply open your tnsnames.ora and listener.ora file and replace the HOST name with the IP address of the system where the oralce database has been installed. Thats it. Try it, good luck
ex: HOST = 192.1680.20 it my server IP address
check my tnsnames.ora and listener.ora files
# tnsnames.ora Network Configuration File: E:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.20)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracle)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
# listener.ora Network Configuration File: E:\oracle\product\10.2.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORACLE)
(SID_NAME = PLSExtProc)
(ORACLE_HOME = E:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.20)(PORT = 1521))
Edited by: 935918 on May 23, 2012 10:12 PM -
Unable to download firefox, operation times out
Tried to download firefox with internet explorer, at 99% is says operation timed out
== This happened ==
Not sure how often
== downloaded firefox ==
== User Agent ==
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 1.0.3705; Media Center PC 4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)[[Installing Firefox on Mac]] is somewhat detailed on how to do the install.
The requirements [http://www.mozilla.com/en-US/firefox/5.0beta/system-requirements/ are]:
''Operating Systems''
*Mac OS X 10.5
*Mac OS X 10.6
''Recommended Hardware''
*Macintosh computer with an Intel x86 processor
*512 MB of RAM
*200 MB hard drive space
What is that doesn't work for you? Could you please give more details?
Thank you. -
IIS Manager 6.0 Wait Operation Time Out on connecting to remote server
I'm looking to configure SMTP on Server 2012 Core, I've installed the feature and remote management/administration tools and web management console and web management compatability. When I attempt to connect via IIS 6.0 Manager I immediately receive "The
wait operation timed out"
I've removed and re-installed the SMTP-Server feature without success
any suggestions would be appreciated.I encountred this issue the IIS 6.0 requires the SMTP if you want to configure the remote management of the Server Core then try to follow this youtube podcast
watch?v=Pim1T6z6DJM Configure a Win 7 machine to control
of this serie that shows how to install and configure a web server core from A to Z
http://www.youtube.com/playlist?list=PLzayUN5B2cXMoyziV4oUs94P6EZT6QVmc
watch?v=5z1NiWUJdGU Wipe generation
watch?v=Q3BoLkWWAC4 hard disk preparation
watch?v=lOPvy-cn0Uk server core installation
watch?v=gTnOUJfRkDg configure the web server
watch?v=0ofvknXMNsc install .net framework in the webserver
watch?v=K4ADBzZeM6E install the web server role
watch?v=oGHC0sbe17Y remote control the server
watch?v=SpzAsRkjV40 continue the remote configuration
watch?v=XjPD8U_y29I Create and alias for the web server
watch?v=Pim1T6z6DJM Configure a Win 7 machine to control
Enjoy the vids
The complexity resides in the simplicity Follow me at: http://smartssolutions.blogspot.com -
TNS - 12535 - Connection Operation Time Out
i m getting this error again and again. to overcome this problem, i have searched
CONNECT_TIMEOUT parameter to asign '0' zero vaue, to get higher higher time in listner.ora, but there is no any such parameter in it.(as suggested my teacher) hence i reconfigured my listner, the said prob get solved. but the next day i found the same error. what should be do? is there any solution?
thanx in advancefrom the client (using dos command prompt)
tnsping instance_name
Also check your tns_names file on the client and make certain you are pointing at the correct machine. Check the machine and make certain the listener is listening for the correct alias.
Something is not working correctly.
Are the other clients having the same problems or are they able to connect?
Wayne -
Xmlviewservice.executeSQLQuery TIME OUT ERROR
Hello OBIEE Experts,
I got stucked with the command line xmlviewservice.executeSQLQuery(...) method of OBIEE as operation time out. Actuall i am writing dot net source code to retrive the xml result by passing the query created in Oracle BI Answer page. This method runs fine when running a very simple query returning only two rows. However when i set to use a query that takes around 10 min running in OBIEE answer section, the above method fails. It returns an error Operation Time out. I have even try setting sawservice & xmlviewservice timeout but no use.
Is there any way to handle sql execution time using OBIEE SAW web service functionality ? Please find below code that i have used.
Imports saw = Obiee_Services.web_Reference
Dim sawservice As New saw.SAWSessionService
Dim sessionid = sawservice.logon("xxx", "xxx")
sawservice.Timeout = 60000
'Dim curUser As String = sawservice.getCurUser(sessionid)
'Dim repref As New saw.ReportRef()
Dim xmlviewservice As New saw.XmlViewService
Dim xmlQueryExecutionOption As New saw.XMLQueryExecutionOptions
xmlQueryExecutionOption.maxRowsPerPage = 10
xmlQueryExecutionOption.refresh = True
Dim repid As String = "Report1"
Dim repParams As New saw.ReportParams
Dim repHtmlOP As New saw.ReportHTMLOptions
Dim QueryResult As New saw.QueryResults
xmlviewservice.Timeout = 60000
QueryResult = xmlviewservice.executeSQLQuery(qry, Obiee_Services.web_Reference.XMLQueryOutputFormat.SAWRowsetData, xmlQueryExecutionOption, sessionid)
Dim rstring As String = QueryResult.rowset
Dim i = WriteToFile("text.xml", rstring)
Regards,
Rajen SinghThank you for the reply.
I do agree that i have omitted logging out command line and WriteToFile() definition. The below executesqlquery command is a syncronous call. I do not think it will be a problem with the next two or three lines. Below mentioned command line will not be released by the compiler until and unless it is completed. MOreover i am sure that the two mentioned command line does not have to do much on the issue becouse the error message is associated with below line and also works fine on simple query.
QueryResult = xmlviewservice.executeSQLQuery(qry, Obiee_Services.web_Reference.XMLQueryOutputFormat.SAWRowsetData, xmlQueryExecutionOption, sessionid)
I have tested other work around to resolve the current error i.e "Operation Time Out" error atleast(applying other configuration setup and increasing timeout properties). Having resolved sucessfully the next issue is on the below line. Blank rowset is returned each time. I can get an ID on QueryResult.QueryId and QueryResult.Finished=false.
Dim rstring As String = QueryResult.rowset
Finally, in OBI Presentation Services, the query runs fine in a specific time. -
Connection times out constantly.
When browsing in Firefox, it constantly times out.
Sometimes it does it after 15 mins and sometimes it takes an hour or better.
I need help, the only way to get it going again is to reboot and frankly that is getting old.Hi Carey,
Thank you for responding. No, we don't have any firewalls I think...Hmm strangely the crash doesn't seem to appear int he FTP Log. Here is the log from roughly the time of the "Operation Time Out":
> LIST
< 150 Opening data channel for directory list.
< -rw-r--r-- 1 ftp ftp 3743 Sep 10 09:38 content.ascx
< -rw-r--r-- 1 ftp ftp 4861 Sep 07 12:42 home.ascx
< -rw-r--r-- 1 ftp ftp 3034 Sep 10 09:47 ie8.css
< drwxr-xr-x 1 ftp ftp 0 Sep 07 12:53 images
< drwxr-xr-x 1 ftp ftp 0 Sep 06 11:05 includes
< -rw-r--r-- 1 ftp ftp 3373 Sep 10 09:38 OnePane.ascx
< -rw-r--r-- 1 ftp ftp 20116 Sep 10 09:43 skin.css
< 226 Transfer OK
> CWD /
< 250 CWD successful. "/" is current directory.
> CWD /lis-con.com.au/Portals/0/Skins/Liscon/images
< 250 CWD successful. "/lis-con.com.au/Portals/0/Skins/Liscon/images" is current directory.
> PWD
< 257 "/lis-con.com.au/Portals/0/Skins/Liscon/images" is current directory.
This is the "Background File Activity":
Started: 10/09/2012 9:48 AM
Operation timed out. Cancelling...
Operation timed out. Cancelling...
Operation timed out. Cancelling...
Operation timed out. Cancelling...
Operation timed out. Cancelling...
Operation timed out. Cancelling...
Operation timed out. Cancelling...
Operation timed out. Cancelling...
Operation timed out. Cancelling...
lis-con.com.au\Portals\0\Skins\Liscon\images\icon_topphone.svg - user cancelled
Operation cancelled.
Finished: 10/09/2012 9:53 AM
It's just a little bit frustrating that it takes it 5 minutes to time-out. Is there any way to set time-out settings? Also, if you try and cancel out of the time-out that's when it just stops and you need to force-quit.
Thank you again for taking a look at this! -
Why does the installation time out once it's reached 41%?
I have Windows 7 Operating System and everytime I try to download and install Adobe Reader it times out once it reaches around 41% and I get a message Adobe not installed. Does anyone know how to get around this issue?
What installer do you use?
Try downloading the full installer from http://get.adobe.com/reader/enterprise/
Maybe you are looking for
-
Add On Rollover to Regular Slideshow Widget
There is a Show Hero On Rollover option in the Composition "slideshow," but no option for this in the regular slideshow. I just had a fellow Muse friend ask how to do this. Sounds like a good option to me-
-
Audio Interface with Logic-best bet?
I've been using a Firepod for the last 2 years and it's fine but today a friend of mine brought over a MOTU MK3 Traveller and it sounds so much better. He got it recently but has to sell it and offered it to me for a good deal. It's got me thinking t
-
Hi All ! During implementations, data flows goes like Datasource -> DSO -> Cube -> MP -> Reporting In all DSO's, BEx reporting flag is checked. Though reporting is done on the cube. Does checking this flag reduces the performance? Please advise With
-
An error occured while creating a project Visual Studio 2010 & CVI 2012
While creating a project from VS2010, with CVI 2012 install. I get this error after attempt to convert or create a CVI project. Also the CVI dialog has no details. Solved! Go to Solution.
-
unable to connect to netflix on my ipad