ReadUTF causing socket failure

Hi
I am having a problem where occasionally readUTF is not getting the data sent from the client side of the socket, plus the socket is then not able to read any more data (no exceptions thrown).
I have caught some data from a situation where it has happened. It doesn't look like there's anything wrong with the data. Could anyone advise me on this? Is there a different way I should be approaching this?
Client side code:
try {
    System.out.println("DEBUG: writeInt: " + cmd);
    System.out.println("DEBUG: writeUTF: " + cmdString);
    o.writeInt(cmd);
    o.writeUTF(cmdString);
    o.flush();
    System.out.println("DEBUG: sent");
catch(IOException ex) {
    // processing IOException
catch(Exception ex) {
    // processing Exception
}Server side code:
try {
    while(running) {
        this.yield();
        int cmd = i.readInt();
        System.out.println("DEBUG: cmd: " + cmd);
        String cmdString = i.readUTF();
        System.out.println("DEBUG: cmdString: " + cmdString);
        this.commandReceived(cmd, cmdString);
catch (IOException ex) {
    //processing IOException
catch (Exception ex) {
    //processing Exception
finally {
    //processing finally
}snapshot from log at the point it fails:
client side log:
DEBUG: writeInt: 16
DEBUG: writeUTF: ||508^^filter.symbol.txt||720^^false||700^^3||703^^0||719^^false||705^^0||706^^0||702^^0||704^^0||701^^1||507^^VOD||
DEBUG: sent
DEBUG: writeInt: 16
DEBUG: writeUTF: ||720^^false||700^^2||703^^147||719^^false||705^^420||706^^300||702^^0||704^^69||701^^8||
DEBUG: sent
server side log:
cmd: 16
DEBUG: cmdString: ||508^^filter.symbol.txt||720^^false||700^^3||703^^0||719^^false||705^^0||706^^0||702^^0||704^^0||701^^1||507^^||
DEBUG: cmd: 16
DEBUG: cmdString:
The point being that there is not much difference between the first set of data that is sent and the second. But the second String value never gets from writeUTF to readUTF. And no exceptions are thrown.
Any advice on this would be much appreciated.
Thanks
Glyn

If you wanted to, you could use writeLong() on the datainputstream to send the number of bytes you are using in your byte array in writeBytes(). Then on the dataoutputstream you could use readFully() with a byte array of the size specified by readLong().
Just a thought.
K

Similar Messages

  • RMMR1MRS-When run in background cause update failure errors looking

    hi,
          RMMR1MRS report when run in background cause update failure errors .
    There are few  below reason for the error log.
    1.  for the PO invoice already generated -  (its right if already invoice generated. should not happen again)
    2.  In  MIGO,  entire  quantity has been reversed  and also invoice generated with zero value - ( its right , should not happen invoice again )
    3. Particular PO line item deleted -  (its right if the PO line item deleted. ERS settlement not require)
    For the all above reason, the update error occurs.  But the mean time  the program  "RMMR1MRS"  should not through the update error log. 
    Note: The job was not terminated due to this update error and also no harm because of the error log
    can you please help on this update failure why it occurs.

    Have you found a solution already? If so, please, share it with the community and close this thread.

  • Step failure causes sequence failure Option

    Hi !
    I need some clarification about the Step failure causes sequence failure Option , I'm using TS 4.2 Under Win XP .
    Lets say i have a Seq with 4 steps in all of then Step failure causes sequence failure Option is Checked .
    Record Result in all of the3 steps is Checked , If the first step will fail will it perform the next steps ? and will it record the result for this steps ?
    Thank U . 
    Kobi Kalif
    Software Engineer

    Record Result in all of the3 steps is Checked , If the first step will fail will it perform the next steps ? YES
    and will it record the result for this steps ? YES
    What this is signifying, is if a Step fails then when the Sequence has completed and returned back to the caller the status of this step will be FAILED.
    If you need to jump to Cleanup then you will need to set the Post Action.
    regards
    Ray Farmer
    Regards
    Ray Farmer

  • Hostid change on reboot causes zpool failure to load

    Seems every time I restart my Solaris 11 Express PVM the hostid is regenerated thus causing a failure for zfs to load pool 'tank'
    zfs: [ID 427000 kern.warning] WARNING: pool 'tank' could not be loaded as it was last accessed by another system (host: solaris hostid: 0x45edf6). See: http://www.sun.com/msg/ZFS-8000-EY
    (note: unable to locate msg/ZFS-8000-EY on oracle.com)
    'zpool import -f pool' works, but I don't want to hack the service manifests to make this automatically import on reboot.
    dom0
    Oracle VM server release 2.2.1
    Linux <hostname> 2.6.18-128.2.1.4.25.el5xen #1 SMP Tue Mar 23 12:43:27 EDT 2010 i686 i686 i386 GNU/Linux
    domU
    SunOS solaris 5.11 snv_151a i86pc i386 i86xpv Solaris

    Seems like modifying vm config using Oracle Virtual Manager GUI insists on inserting the following line in vm.cfg (as well as deleting my 'phy:' lines):
    vif_other_config = []
    Problem of 'hostid changing on reboot' persists even after manually removing the above line and using the running vm.cfg is as follows:
    cpu_weight = 512
    disk = ['file:/var/ovs/mount/A1E890DD6BE34CFF9CB69BCA47ACB4D3/running_pool/sx11/System.img,xvda,w',
    'phy:/dev/c7t1,xvdb,w',
    'phy:/dev/c7t2,xvdc,w',
    'phy:/dev/c7t3,xvdd,w',
    'phy:/dev/c7t4,xvde,w',
    'phy:/dev/c7t5,xvdf,w',
    'phy:/dev/c7t6,xvdg,w',
    'phy:/dev/c7t7,xvdh,w',
    extra = '/platform/i86xpv/kernel/amd64/unix -B zfs-bootfs=rpool/ROOT/solaris,bootpath=/xpvd/xdf@51712:a'
    kernel = '/var/ovs/mount/A1E890DD6BE34CFF9CB69BCA47ACB4D3/iso_pool/be/sol-11-exp-201011-text-x86/unix'
    memory = 4096
    name = 'sx11'
    ramdisk = '/var/ovs/mount/A1E890DD6BE34CFF9CB69BCA47ACB4D3/iso_pool/be/sol-11-exp-201011-text-x86/boot_archive'
    uuid = 'd56c89ef-ef4b-40e8-8d68-2a64c86d5f12'
    vcpus = 6
    vfb = ['type=vnc,vncunused=1,vnclisten=0.0.0.0,vncpasswd=oracle']
    vif = ['bridge=xenbr0,mac=00:16:3E:7A:7F:BF,type=netfront',
    'bridge=xenbr1,mac=00:16:3E:4E:2D:1A,type=netfront',
    ]

  • Activate or skip "Record Results" and "Step Failure Cause Sequence Failure" for all steps of a step type

    Hello all,
    I am using teststand 3.1
    Is it possible to skip or activate ´"Record Results" and "Step Failure Cause Sequence Failure" for all steps of a step type.
    It is very much work to do this for all steps, because I have hundred of steps
    regards
    samuel

    hi,
    here is an example that will change the TS.NoResult. You just have to change this area of the sequence to suit your needs
    I haven't added any fancy stuff, such as adding a filedialog to get the seq file to change, you will find the various variables in the Locals.
    Hope it helps
    There is a version for 3.1 and 3.5.
    Regards
    Ray Farmer
    Regards
    Ray Farmer
    Attachments:
    ChangeStepTypeRunMode.zip ‏30 KB

  • Xgridcontrollerd[1503]: Warning: status socket failure

    We had a power outage and since then I've been seeing the following error message in the system.log and it seems like xgrid has hung while working on 4 jobs, they've showed about 50% complete in xgrid admin for a few hours. There is nothing in the logs that I can see. Though I do get status socket failures every couple of hours
    educaster xgridcontrollerd[1503]: Warning: status socket failure; will attempt to re-create status socket
    Everything seems to be working (i.e. the podcast producer is accepting and creating podcasts) but this error message pops up in the logs every couple of hours.
    any ideas?

    I decided to use nouveau instead of nvidia and now I got my external an internal display working.

  • CVS General Socket FAilure

    Hello,
    i got a problem to make a Connection to my CVS Server.
    The Connection works with the StandAlone Client WinCvs.
    When I attemp to test the connection under JDeveloper, I receive the message:
    Testing connection...
    General socket failure when opening connection to the CVS server.
    java.net.ConnectException: Connection refused: connect
    Connection test failed: unable to connect.
    What could I do ?
    Thanks, Patrick

    what connection method are you using to access the remote repository? pserver, ext, ssh?
    Thanks,
    Rob

  • 3rd Part Menory Causes Fan Failure

    Bought my MBP about 9 months ago and shortly thereafter installed a 1G Ram Module from OWC. 2 Weeks ago my Right hand side fan statred making an awfull racket and then dies. Contacted Apple who had me send it to them. Received my computer last nite. Now remember the only thing wrong with this MBP was the fan. The Hardware Test (Short/Long) run from Disk 1 showed only a Fan Problem. No Memory, Mother Board, Etc. I received the computer back with the Main Logic Board Replaced, Disk Drive Slicked, Memory in a plastic Bag. And the MBP is unusable as received from Apple. Screen goes black, locks up, etc. Tried Reinstalling OSX and it would not complete. I sent about 5 hours on the phone with Apple Tech Support on receiving my MBP back in worse condition than it was sent in for. After going around and around with Apple I got a good tech who said it was a definit hardware issue (Others wanted to first buy Apple-Care for 359 or a 49 version) but since its still falls within one year and also 90 day warrenty if Apple Screwed it up I refused. Finally it will be sent back in to "HOPEFULLY" be fixed this time! Anyways, enogh venting and back to the original question; "Will A Ram Module Cause A Failure To A Fan?" Just one fan by the way the left one worked but upon return they said they replaced both. Thanks for allowing me to vent!! Hopefully this is a fluke on Apple Support since I really miss my Laptop right now!!
    Bill......
    MBP   Mac OS X (10.4.8)  

    Thanks for the response. Yes I am or was using SMC Fan Control along with iStat in the Dash for moniotring. I work with a lot of PC's and have built my own from MB and Up. Since I am fairly new to Mac but in all my years I have never heard of Memory causing a failure of a Fan. I could as you said believe Kernel Panics or Programs screwing up or reboots for that matter. My assumption is that they did not like the OWC Memory or the addition of Non-Apple Memory. I also find it hard to believe my Main Logic Board all of a sudden (In the Apple Techs Hands) went bad. I can understand maybe the drive being slicked and fans switched in-pairs. But the rest I find really off the wall. I just hope that they can correct the problems right this time since I have been hyping my MBP since I got it and now this is a real show-stopper for me!
    Bill......

  • Sh conn (Cause of failures)

    Hello
    Instruction:
    CONN WEB server farm online sh
    Failure occurs on a particular server. The cause of the failure?
    sh serverfarm WEB
    serverfarm     : WEB, type: HOST
    total rservers : 3
                                                    ----------connections-----------
           real                  weight state        current    total      failures
       ---+---------------------+------+------------+----------+----------+---------
       rserver: WEB1
           172.32.20.11:80       8      OUTOFSERVICE 22         0          0
       rserver: WEB2
           172.32.20.14:80       8      OPERATIONAL  37         859        0
       rserver: WEB3
           172.32.20.17:80       8      OPERATIONAL  60         1168       21
    There is no result to failure of the probe.
    Software
      loader:    Version 12.2[120]
      system:    Version A2(3.2a) [build 3.0(0)A2(3.2a)]
    Thank you.

    Thank you for answer.
    Has now continued failure occurs. Is there to be resolved method to SYN timeout occurrence at the time?
    The ace is the problem? The problem is the server?
    inside_l4# sh probe 80 detail
    probe       : 80
    type        : TCP
    state       : ACTIVE
    description :
       port      : 80      address     : 0.0.0.0         addr type  : -
       interval  : 2       pass intvl  : 2               pass count : 5
       fail count: 2       recv timeout: 2
       conn termination : FORCED
       expect offset    : 0         , open timeout     : 10
       expect regex     : -
       send data        : -
                           --------------------- probe results --------------------
       probe association   probed-address  probes     failed     passed     health
       ------------------- ---------------+----------+----------+----------+-------
       serverfarm  : WEB
         real      : WEB1[80]
                           172.32.20.11    0          0          0          DISABLED
       Socket state        :
       No. Passed states   : 0         No. Failed states : 0
       No. Probes skipped  : 0         Last status code  : 0
       No. Out of Sockets  : 0         No. Internal error: 0
       Last disconnect err :  -
       Last probe time     : Never
       Last fail time      : Never
       Last active time    : Never
         real      : WEB2[80]
                           172.32.20.14    46499      0          46499      SUCCESS
       Socket state        : CLOSED
       No. Passed states   : 1         No. Failed states : 0
       No. Probes skipped  : 0         Last status code  : 0
       No. Out of Sockets  : 0         No. Internal error: 0
       Last disconnect err :  -
       Last probe time     : Tue May 21 18:42:58 2013
       Last fail time      : Never
       Last active time    : Mon May 20 16:46:57 2013
         real      : WEB3[80]
                           172.32.20.17    45704      0          45704      SUCCESS
       Socket state        : CLOSED
       No. Passed states   : 1         No. Failed states : 0
       No. Probes skipped  : 0         Last status code  : 0
       No. Out of Sockets  : 0         No. Internal error: 0
       Last disconnect err :  -
       Last probe time     : Tue May 21 18:42:57 2013
       Last fail time      : Never
       Last active time    : Mon May 20 17:13:32 2013
       serverfarm  : WEB_EDI
         real      : WEB4[80]
                           172.32.20.21    972749     3          972746     SUCCESS
       Socket state        : CLOSED
       No. Passed states   : 1         No. Failed states : 0
       No. Probes skipped  : 1         Last status code  : 0
       No. Out of Sockets  : 0         No. Internal error: 0
       Last disconnect err :  -
       Last probe time     : Tue May 21 18:42:58 2013
       Last fail time      : Never
       Last active time    : Mon Apr 29 04:17:06 2013
         real      : WEB5[80]
                           172.32.20.24    972746     2          972744     SUCCESS
       Socket state        : CLOSED
       No. Passed states   : 1         No. Failed states : 0
       No. Probes skipped  : 4         Last status code  : 0
       No. Out of Sockets  : 0         No. Internal error: 0
       Last disconnect err :  -
       Last probe time     : Tue May 21 18:42:58 2013
       Last fail time      : Never
       Last active time    : Mon Apr 29 04:17:06 2013
    ============================================================
    inside_l4# sh serverfarm WEB
    serverfarm     : WEB, type: HOST
    total rservers : 3
                                                    ----------connections-----------
           real                  weight state        current    total      failures
       ---+---------------------+------+------------+----------+----------+---------
       rserver: WEB1
           172.32.20.11:80       8      OUTOFSERVICE 0          0          0
       rserver: WEB2
           172.32.20.14:80       8      OPERATIONAL  28         55085      622
       rserver: WEB3
           172.32.20.17:80       8      OPERATIONAL  5          44150      414
    MINISTOP/inside_l4#

  • Clicking on hyperlink in Outlook causes "General Failure" Error message to pop up in Outlook - but we page does open in Firefox 4.0

    Since upgrading to Firefox 4.0 - every time I click on a link in Outlook, it causes a "General Failure" error message that says, "The URL was:" ... "The system cannot find the fix specified."
    However the site opens fine in Firefox.

    I have same problem and found article below that worked but then i ended up having to do system restore because outlook stopped sending emails after i synced new iPhone while at Apple store that caused problem!!!
    http://answers.yahoo.com/question/index?qid=20080512192747AAHDZtL

  • Handling socket failure

    When using a permanently open socket connection,
    if this disconnects at the remote end, due to a failure, is there an event posted to the agent (applet)??

    An Exception would be thrown. Look for info on try/catch blocks.

  • Inclusion of cxxabi.h and iostream causes compile failure

    stephen@hal:/tmp$ cat test.cpp
    #include <iostream>
    #include <cxxabi.h>
    int main()
      return 0;
    stephen@hal:/tmp$ /home/stephen/solaris-studio/SolarisStudio12.4-linux-x86-bin/solarisstudio12.4/bin/CC -std=c++03 -Wp,-I/usr/include/x86_64-linux-gnu/ -c test.cpp
    "/home/stephen/solaris-studio/SolarisStudio12.4-linux-x86-bin/solarisstudio12.4/lib/compilers/CC-gcc/include/c++/4.8.2/cxxabi.h", line 131: Error: Only one of a set of overloaded functions can be extern "C".
    1 Error(s) detected.
    This happens on at least ubuntu and fedora.

    > - don't include <cxxabi.h>, or
    Actually the problematic behavior is more complicated than just a conflict betwen external cxxabi.h and internal definition.
    There is no failure if you "just include" cxxabi.h.
    Our internal definition agrees with what is defined in cxxabi.h
    And compiler does emit error message if you include cxxabi.h after iostream.
    Something fishy happens between exactly these two headers, causing cxxabi.h to define atexit differently.
    It does not happen with other STL headers.
    Say, including <string> and then cxxabi.h works ok.
    > I needed another work around for including fcntl.h and string
    I'm not sure how you came from "fcntl.h and string" to "cxxabi.h and iostream".
    You also mention "stlport" in your cmake commit and I assume stlport is -library=stlport4.
    Which means it has nothing to do with -std=c++03/-std=c++11/-compat=g modes that use G++ STL headers.
    If you want to make your change only for sunCC -library=stlport4 then you can try hacking around with some additional #ifdefs
    but I would really like to know why that rather innocent fcntl.h causes the problem.
    regards,
      Fedor.

  • Firefox causing Windows failure with bluescreens

    Since installing firefox version supplied thru a yahoo download Windows xp fails with bluescreens. I perfer using firefox over IE but can not continue with the windows failures. I'll have to go back to IE.

    Phillipp,
    Originally, I thought this was a windows problem. I went to http://answers.microsoft.com/en-us, logged in and searched on 'unauthorised version of windows".
    You asked for a thread. There isn't one in particular, just a '''pattern''' in the many responses to that search term that are there. You'll need to read more than just a few of the entries to see it.
    The search turned up lots of user entries with statements like "I've used a fully activated windows for years and suddenly it's telling me the windows version is unauthorised. why?" A common question by MS in reply is what did you last install or upgrade before the event, and many of the users replied Firefox. . . . The MS suggestions seemed to usually involve safe mode and uninstall actions.
    I haven't done any of that - no need to yet - the unauthorised version message hasn't re-appeared, but once bitten several times shy. I know several users who have not had the problem also, so it looks to be very irregular, however the list of users with the unauthorised version problem citing firefox are not isolated cases either. My reaction on reading those posts would have been - if I did not already use FF - don't go near it. Software relies on reputation and those who have a bad experience with a program often do not advise the programmers of that - just steer clear and tell others to do the same. So I am telling you about it . . . .
    The reality of FF being implicated in some way in these unauthorised version messages is clear in the entries on the MS website. It's possible that Mozilla has never seen them or heard of the issue, but that doesn't make the problem non-existent. The point of my message is that Mozilla needs to get its act together in this space, identify what can cause that message (talk to MS??) and ensure that it does not happen during new version testing.
    You guys have a better link to the developers than any other I have seen. Pass this along.
    Davidk03

  • Firewire external drive causes internet failure on iMac 2.8 GHz

    I am connected to the internet via wireless connection, which shows a strong signal. When I connect my external Lacie HD, I receive a failure notice when when I open any browser. Signal strength is still strong, but the network, internet and logon fails. I have reset and purged the caches, etc, but no luck. Creating a new connection does not help either. The one sure fix: eject the HD, disconnect it, and open the browser again. Bingo; I'm on. What gives? Anyone have an idea why or what would cause this? It took a while to make the association, but the drive is the culprit undoubtedly.

    Hi elkaboom-
    Greetings and welcome to the Apple boards.
    If the drive has an external power supply brick those have been known to go bad. it is hard to diagnose because the blue light comes on and the drive sounds like it is working.
    When the supply goes bad it causes all kinds f problems. This is the first time I have heard of this symptom though I still believe this may be your culprit.
    If the drive is under warranty LaCie will replace the supply at no charge. If it is out of warranty you can purchase a supply directly from them for around $20.
    Luck-
    -DaddyPaycheck

  • IDVD encoding causes system failure during burn process

    I have iDVD 5 on my work computer (dual 2.7Ghz G5 / 2.5 G RAM), and have burned successfully before my current project.
    My current project has a 28:45 movie and I have tried two different themes with different combinations of drop zones (one with the movie as the drop zone and one with stills only) and everything previews okay, but when I start the burn process it will get to a certain point in the encoding and then the whole system crashes. I come back to check on the process, and my screen is filled with black squares with error info in it... (looks like a DOS screen or something) and it says something about system failure and that I need to restart my computer.
    I'm so stubborn that I keep trying different combinations of possibilities but I'm having no luck. The movie that it's hangin up on was captured in Final Cut Pro from a VHS, edited in Final Cut to trim the excess black, and exported as a Final Cut Movie that I imported into iDVD.
    As I said above, I have burned successfully on this computer and this iDVD, so the fact that this one project refuses to burn is perplexing.
    any thoughts?

    A gap in video would be a space between one clip and another. This is a problem when you are editing your footage, not capturing it. In other words, it is a user introduced problem.
    In FCP when you say "Ignore Timecode Breaks" it just means to continue capturing video even if there is a timecode break. If you do not select this option, FCP would immediately stop catpturing whenever it hit a timecode break. A timecode break is not the same thing as a gap you create during editing. A timecode break could be as simple as rewinding your camera footage and then recording over it... the timecode now has a break because it is not continuous timecode, it jumps from one timecode to another.
    Depending on what device you are capturing from, your audio may come in a few frames before or after the video. This would be especially true for a non-controllable device. It is a simple fix to adjust this as you would have noticed any sync issues right in the timeline during playback.
    A system reboot in the middle of encoding is a serious crash... I doubt if it is the footage per se that is causing this to happen. Footage has been known to force an application to abort a process (or stay in an infinite loop), but an actual system shutdown would be extremely rare.
    Consider recapturing the footage into a new FCP project and then creating a new iDVD project for it, this will eliminate either a corrupted FCP file or an iDVD project from the equation. Also, are you burning directly to disc or are you preparing a disc image? I'd go with the disc image approach because you can test your final build that way.

Maybe you are looking for

  • (Error RFC 00101) (Error: INF) Large DeskI reports in Infoview.

    Hi, I am getting error u2018No server was available to process the request. Please try again later. (Error RFC 00101) (Error: INF)" while opening a DeskI report in Infoview (BOXIR2 SP4). Same error appears while viewing scheduled instances of this re

  • Strange emails on IPhone only

    For the past few days I'm getting emails on my Iphone 3GS, with "No Sender" "No Subject" "No message" on them, like 50 at a time, and I can't delete them. When I go into "Edit" there's no little circle to click on.  This doesn't appear on my Imac or

  • I want to modify the payment term in BP

    Hi, I want to modify the payment term in BP. I have this message when I try to modify: "do you want the system to replace all associated payment term settings automatically?" I can choose YES or NO: what changes if I choose the first or the second ch

  • "Missing InfoCube 0COPA_C01 in Version A" during migration to BI7.

    Hi, I get "Missing InfoCube 0COPA_C01 in Version A" error message when trying to migrate ZCOMP_CODE Object ( in RSEC_MIGRATION program) when migration from BW3.5 to BI7.0. Does anybody have an idea how I could fix this issue. Thanks, Sruthi.

  • "IMAQdxOpenCamera" function execution time is particularly long,why?

    I install VAS2011 in CVI2010 environment, running IMAQdx the samples  <Grab and AttributesSetup>,  "IMAQdxOpenCamera" function execution time is particularly long, more than 7 seconds,why? Thanks! Solved! Go to Solution.