Rsh hang when remote host halted

Solaris 8 on a sunblade 100. Running an rsh command to a remote box hangs when the remote box is killed with halt -q. The rsh command used to illustrate the fault is: rsh -l username hostname sleep 30
Looking into this, it seems the ndd parameter tcp_keepalive_interval was set to the default 7200000 (2 hours) so I changed it to the minimum of 10000 (10 seconds). Problem pesists. Looking further it seems that setsockopt needs to set SO_KEEPALIVE too. This needs to be done by the rsh internals, not by my command line as I have no knowledge of the underlying socket.
Searching this site tells me that this was a reported bug in previous versions of the OS, but not in SunOS5.8, check bug id 1075044
Any help would be appreciated, even if it is to suggest a workaround. I am sending the rsh from a popen in C. At the moment my whole application hangs forever if the remote box is killed.

Solaris 8 on a sunblade 100. Running an rsh command
to a remote box hangs when the remote box is killed
with halt -q. The rsh command used to illustrate the
fault is: rsh -l username hostname sleep 30
Looking into this, it seems the ndd parameter
tcp_keepalive_interval was set to the default 7200000
(2 hours) so I changed it to the minimum of 10000 (10
seconds). Problem pesists. Looking further it seems
that setsockopt needs to set SO_KEEPALIVE too. This
needs to be done by the rsh internals, not by my
command line as I have no knowledge of the underlying
socket.
Searching this site tells me that this was a reported
bug in previous versions of the OS, but not in
SunOS5.8, check bug id 1075044
Any help would be appreciated, even if it is to
suggest a workaround. I am sending the rsh from a
popen in C. At the moment my whole application hangs
forever if the remote box is killed.Do you observe similar issue if there is a network failure
that happens inbetween the remote command executing..

Similar Messages

  • SQL*Plus hangs when connecting to remote DB (Solaris, 10gR2)

    First of all the particulars:
    Local System:
    Solaris 8, Oracle 10.2.0.4, October CPU
    Remote System:
    Solaris 10, Oracle 10.2.0.4, July CPU
    We are trying to initiate a connection from our local system to our remote system using a DB Link. After opening SQL*Plus, we log in with <user>@<dblink>, are asked for a password, and after entering the password, SQL Plus hangs indefinitely (we typically have to kill the sqlplus process to regain our session). Also, logging into the local system with a local account, and then querying using the db link (select * from dual@<link>) gives the same result.
    From the remote system, we CAN log into the local system using the same process, and we can also query the local system. in other words, it works in one direction, but not the other.
    We have checked all the usual suspects: tnsnames, sqlnet, db_domain, global_names, and all are set correct for our setup (although I of course welcome suggestions to check something else in the files). Also have confirmed validity of /etc/hosts entries, and permissions on those files for the 'oracle' user. A 'tnsping' and 'ping' are both successful in both directions, though I understand these only check the listener and hardware layer.
    Our Sys Admin has checked firewall connections between the two systems, and stated that they're open on the listener port (1521).
    Listener log files on the remote host, when the hang happens, show an established connection from the local host.
    Does anyone have any suggestions as to what to check for next?
    Thank you in advance for the assist!

    Whew, that truss output is enough to make your eyes bleed!
    This system is on a closed network, so I cannot post the files here, nor would I wish reading those things on anyone nice enough to spend a minute here helping me out!@
    But comparing the truss from the "broken" system, and the working one, the sqlplus that hangs returns a:
    ERR #134 ENOTCONN on a getpeernam() thread.
    The other truss (working side), does not throw that particular line, and the truss output varies widely after that line in the output fille.
    After a few moments letting the sqlplus process "hang", I get:
    ERR #62 ETIME
    Outside of that, lust a lot of hex values!

  • Error when Connecting to Remote Host

    Hi,
    I am not sure if this post belongs here or in the network section, if I need to repost this in the networks section please let me know!
    The problem is when I use an applet to connect to a remote host I get an error.I am am pasting the error below.
    Please, advice.
    Thanks!
    Error:--------
    Exception while connecting : access denied (java.net.SocketPermission
    192.168.2.2:54000 connect,resolve)
    Exception in thread "SocketClient"
    java.nio.channels.IllegalBlockingModeException
    at java.nio.channels.spi.AbstractSelectableChannel.register
    (AbstractSelectableChannel.java:172)
    at java.nio.channels.SelectableChannel.register
    (SelectableChannel.java:254)
    at liburbi.net.SocketClient.run(SocketClient.java:310)
    at java.lang.Thread.run(Thread.java:613)

    Try doprivileged in your signed applet.
    Signing applets:
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post and reply 18 for the java class file using doprivileged
    Still problems?
    A Full trace might help us out:
    http://forum.java.sun.com/thread.jspa?threadID=656028

  • BIND appends my domain to remote host names when querying

    I'm running BIND v9.3.0 on Solaris 8.
    All the zone files, named.conf, resolv.conf etc seem to be properly
    configured.
    I get normal name resolution for hosts located inside my v-lan.
    Sendmail works inside my v-lan.
    However, when I try to hit an internet site outside of my v-lan it
    won't resolv.
    So, setting nslookup to debug mode, I did a lookup of a remote host.
    The result is that, when my local dns is queried, the host name alone
    is used, like its supposed to
    i.e.
    ;;res_nmkquery(QUERY, hostname, IN A)
    This is a remote host so, obviously, my DNS has no record of it, so it
    tries the remote server. This is where the problem comes in. When
    the remote server is queried, my domain gets appended to the host
    name:
    i.e.
    ;;res_nmkquery(QUERY, hostname.MYDOMAIN, IN A)
    Since the host does not reside in my domain, obviously this fully
    qualified domain name will never resolve because it isn't correct.
    How do I make it stop????!!!!!

    I notice the following error logs in server :
    EXCH.xxxx.org.xx in the personal store on the local computer. Therefore, it is unable to support the STARTTLS SMTP verb for the connector Default Frontend EXCH with a FQDN parameter of EXCH.xxxx.org.xx. If the connector's FQDN is not specified, the computer's
    FQDN is used. Verify the connector configuration and the installed certificates to make sure that there is a certificate with a domain name for that FQDN. If this certificate exists, run Enable-ExchangeCertificate -Services SMTP to make sure that the Microsoft
    Exchange Transport service has access to the certificate key.
    What this issues,

  • When remote database used in DB Link is down, JDBC hangs

    Hello!
    I have DB Link defined in my Oracle DB I work with from JSP application
    which uses
    Tomcat's connection pool. When remote DB is available, everything is
    fine. But when
    it goes down (I explicitly shut it down with "shutdown immediate"),
    JDBC call hangs:
    Statement Stmt1 = conn.createStatement();
    rs = Stmt1.executeQuery("SELECT something FROM mytable@mylink");
    Second line causes hang forever (or long enough for me to wait, more
    that 30 minutes).
    If I add this:
    Stmt1.setQueryTimeout(5);
    then it hangs for about 1min45sec, then throws exception "end of line
    in communication
    channel". Unfortunately, 1min45sec is too much to wait for the end
    user. Also, it resets
    my connection to my DB (not remote one), so it is no longer usable,
    which costs me
    something to recover.
    It looks like the error occurs only when connection I use had
    successful "history" of
    being able to connect via DB Link. If I get connection not from
    Tomcat's connection
    pool, but force a new connection, everything works fine (something to
    do with session
    using DB Link).
    Has anyone had similar problem? Is a workaround different from creating
    a new
    connection available?
    Thanks!

    Well, it appeared that this is nothing to do with Tomcat. The following sequence
    of calls causes the same symptoms:
    Statement stmt2 = cn.createStatement();
    ResultSet rs2 = stmt2.executeQuery("select 'x' from dual@mylink");
    rs2.next();
    System.out.println(rs2.getString(1));
    rs2.close();
    stmt2.close();
    // !!! do shutdown immediate to DB referenced by mylink, now
    stmt2 = cn.createStatement();
    rs2 = stmt2.executeQuery("select 'x' from dual@mylink"); // !!! hangs forever
    rs2.next();
    System.out.println(rs2.getString(1));
    rs2.close();
    stmt2.close();
    If I would create a new connection for the second set of statements (before
    second stmt2 = ...), it will not hang, and I will get correct error:
    java.sql.SQLException: ORA-02068: following severe error from MYLINK
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Looks like something to do with Oracle JDBC driver?

  • Detecting When a Non-Blocking Socket Is Closed by the Remote Host

    Hi,
    Using NIO non blocked sockets how do I detect when a Non-Blocking Socket Is Closed by the Remote Host?
    What I have read is:
    The only way to detect that the remote host has closed the connection is to attempt to read or write from the connection. If the remote host properly closed the connection, read() will return -1. If the connection was not terminated normally, read() and write() will throw an exception.
    I have written a server test program using NIO and an applet connecting to the server program via sockets.
    When I after a successful connection shuts down the browser following happens: The code below comes in an endless loop though mySelector.select returns 0 every time. (The selector is registered for OP_READ). size = 1.
    while (true) {
    int n = mySelector.select();
    int size = mySelector.keys().size();
    if (n == 0) continue;
    Is this an expected result?
    How do I get to know what client has lost connection?
    My environment:
    W2000
    java 1.4.1 build 1.4.1_01-b01
    Browser used: IE 5.0
    Many thanks for your help on this matter!
    Regards Magnus Wistr�m

    What you're doing looks OK to me.
    I wonder whether your thread is being interrupted by Thread.intterupt() somewhere. Try putting a Thread.interrupted() before the select call.
    Sylvia.

  • Error FRM-91500 when compile from remote host

    Dear all,
    I have a problem when compiling forms from remote using 'frmcmp.sh'. It creates error :
    "FRM-91500: Unable to start/complete the build."
    and when I try to compile from remote host using 'frmcmp', it creates error:
    "frmcmp: error while loading shared libraries: libjvm.so: cannot open shared object file: No such file or directory"
    The problem is also occured when I use vnc, ssh, telnet. So I can't complie forms when I login from remote host.
    But,
    the problem doesn't occured if I compile forms by login FROM SERVER directly. There's no firewall between me and the server, network connection is good, and I already try some advice from this forum using:
    export ORACLE_TERM=vt220
    export DISPLAY=202.181.18.31
    But It still doesn't work. I try export DISPLAY using my local Ip-address, using my gateway ip-address, but none of them works. Please help me solve this problem so I can compile from remote host
    The server specification:
    Pentium 4
    RAM 1 GB
    OS Enterprise Linux AS release 4 (October Update 4)
    server IP adddress:x.x.x.x
    with product:
    Oracle DB 10g
    Oracle Apllication Server 10gR2
    My own IP address:192.168.13.34
    server see me as : x.x.x.x
    Regards,
    firman

    your DISPLAY isn't correct,
    it should be something like
    export DISPLAY=203.81.184.30:0.0
    where 0.0 stands for your local display and the virtual screen on it ..
    (or something like that ... )
    in any case I first would check the X-Session using some standard X-application
    like xterm or xclock
    as long as they don't work, your compile will fail
    hope that helps
    Volker

  • Login into a remote host and test one ip whether its pinging or not.

    Hello Friends
    I need to login into a remote host. From that remote host i need to test one ip that whether its is pinging or not.
    For that i have written one code snippet its working fine when that ip is pinging.
    But it is hanging when that ip is not pinging properly.
    I could not read the output while not pinging.
    For making telnet connection to the remote host, i am using jcsh.jar
    Any body know the solution for that please help me.see below my code.
    /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
    import com.jcraft.jsch.*;
    import java.awt.*;
    import javax.swing.*;
    import java.io.*;
    public class Exec{
      public static void main(String[] arg){
        try{
          JSch jsch=new JSch(); 
          String temp = "";
          String host=null;
          if(arg.length>0){
            host=arg[0];
          else{
            host=JOptionPane.showInputDialog("Enter username@hostname",System.getProperty("user.name")+"@localhost");
          String user=host.substring(0, host.indexOf('@'));
          host=host.substring(host.indexOf('@')+1);
          Session session=jsch.getSession(user, host, 22);
          // username and password will be given via UserInfo interface.
          UserInfo ui=new MyUserInfo();
          session.setUserInfo(ui);
          session.connect();
          String command=JOptionPane.showInputDialog("Enter command",
                                                     "ping ");
          Channel channel=session.openChannel("exec");
          ((ChannelExec)channel).setCommand(command);
          channel.setInputStream(null);
          ((ChannelExec)channel).setErrStream(System.err);
          BufferedWriter stdOut = new BufferedWriter(new OutputStreamWriter(channel.getOutputStream()));
          channel.connect();
          int count = 0;
          int count1 = 0;
          while(true) {
          if((temp = stdInput.readLine()) != null || (temp = stdInput.readLine()).compareTo("") != 0 ) {
               System.out.println("NOT NULL OUTPUT");
               while ((temp = stdInput.readLine()) != null) {
               System.out.println(">"+temp);
                if(temp.indexOf("64 bytes from") == 0) {
                   if(count++ > 4)
                        System.out.println("Ping Okay");
                        channel.disconnect();
                        break;
            try{Thread.sleep(1000);}catch(Exception ee){}
          else
               System.out.println(">"+temp);
               count1++;
               if(count1>10)
                    System.out.println("Ping is not okay.");
                    break;
               else {
                    System.out.println("Trying...");
    //                continue;
               try{Thread.sleep(1000);}catch(Exception ee){}
          if(channel.isClosed()){
              System.out.println("exit-status: "+channel.getExitStatus());
              break;
          channel.disconnect();
          session.disconnect();
        catch(Exception e){
          System.out.println(e);
      public static class MyUserInfo implements UserInfo, UIKeyboardInteractive{
        public String getPassword(){ return passwd; }
        public boolean promptYesNo(String str){
          Object[] options={ "yes", "no" };
          int foo=JOptionPane.showOptionDialog(null,
                 str,
                 "Warning",
                 JOptionPane.DEFAULT_OPTION,
                 JOptionPane.WARNING_MESSAGE,
                 null, options, options[0]);
           return foo==0;
        String passwd;
        JTextField passwordField=(JTextField)new JPasswordField(20);
        public String getPassphrase(){ return null; }
        public boolean promptPassphrase(String message){ return true; }
        public boolean promptPassword(String message){
          Object[] ob={passwordField};
          int result=
            JOptionPane.showConfirmDialog(null, ob, message,
                                          JOptionPane.OK_CANCEL_OPTION);
          if(result==JOptionPane.OK_OPTION){
             passwd=passwordField.getText();
            return true;
          else{
            return false;
        public void showMessage(String message){
          JOptionPane.showMessageDialog(null, message);
        final GridBagConstraints gbc =
          new GridBagConstraints(0,0,1,1,1,1,
                                 GridBagConstraints.NORTHWEST,
                                 GridBagConstraints.NONE,
                                 new Insets(0,0,0,0),0,0);
        private Container panel;
        public String[] promptKeyboardInteractive(String destination,
                                                  String name,
                                                  String instruction,
                                                  String[] prompt,
                                                  boolean[] echo){
          panel = new JPanel();
          panel.setLayout(new GridBagLayout());
          gbc.weightx = 1.0;
          gbc.gridwidth = GridBagConstraints.REMAINDER;
          gbc.gridx = 0;
          panel.add(new JLabel(instruction), gbc);
          gbc.gridy++;
          gbc.gridwidth = GridBagConstraints.RELATIVE;
          JTextField[] texts=new JTextField[prompt.length];
          for(int i=0; i<prompt.length; i++){
            gbc.fill = GridBagConstraints.NONE;
            gbc.gridx = 0;
            gbc.weightx = 1;
            panel.add(new JLabel(prompt),gbc);
    gbc.gridx = 1;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weighty = 1;
    if(echo[i]){
    texts[i]=new JTextField(20);
    else{
    texts[i]=new JPasswordField(20);
    panel.add(texts[i], gbc);
    gbc.gridy++;
    if(JOptionPane.showConfirmDialog(null, panel,
    destination+": "+name,
    JOptionPane.OK_CANCEL_OPTION,
    JOptionPane.QUESTION_MESSAGE)
    ==JOptionPane.OK_OPTION){
    String[] response=new String[prompt.length];
    for(int i=0; i<prompt.length; i++){
    response[i]=texts[i].getText();
         return response;
    else{
    return null; // cancel

    Do a Google search for "java ftp client". There are some existing packages that you can use.

  • TcpListener not working on Azure: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host

    Hi Everybody,
    i'm playing a little bit with Windows Azure and I'm blocked with a really simple issue (or maybe not).
    I've created a Cloud Service containing one simple Worker Role. I've configured an EndPoint in the WorkerRole configuration, which allows Input connections via tcp on port 10100.
    Here the ServiceDefinition.csdef file content:
    <?xml version="1.0" encoding="utf-8"?>
    <ServiceDefinition name="EmacCloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2014-01.2.3">
    <WorkerRole name="TcpListenerWorkerRole" vmsize="Small">
    <Imports>
    <Import moduleName="Diagnostics" />
    <Import moduleName="RemoteAccess" />
    <Import moduleName="RemoteForwarder" />
    </Imports>
    <Endpoints>
    <InputEndpoint name="Endpoint1" protocol="tcp" port="10100" />
    </Endpoints>
    </WorkerRole>
    </ServiceDefinition>
    This WorkerRole is just creating a TcpListener object listening to the configured port (using the RoleEnvironment instance) and waits for an incoming connection. It receives a message and returns a hardcoded message (see code snippet below).
    namespace TcpListenerWorkerRole
    using System;
    using System.Net;
    using Microsoft.WindowsAzure.ServiceRuntime;
    using System.Net.Sockets;
    using System.Text;
    using Roche.Emac.Infrastructure;
    using System.IO;
    using System.Threading.Tasks;
    using Microsoft.WindowsAzure.Diagnostics;
    using System.Linq;
    public class WorkerRole : RoleEntryPoint
    public override void Run()
    // This is a sample worker implementation. Replace with your logic.
    LoggingProvider.Logger.Info("TcpListenerWorkerRole entry point called");
    TcpListener listener = null;
    try
    listener = new TcpListener(RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Endpoint1"].IPEndpoint);
    listener.ExclusiveAddressUse = false;
    listener.Start();
    LoggingProvider.Logger.Info(string.Format("TcpListener started at '{0}:{1}'", RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Endpoint1"].IPEndpoint.Address, RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Endpoint1"].IPEndpoint.Port));
    catch (SocketException ex)
    LoggingProvider.Logger.Exception("Unexpected exception while creating the TcpListener", ex);
    return;
    while (true)
    Task.Run(async () =>
    TcpClient client = await listener.AcceptTcpClientAsync();
    LoggingProvider.Logger.Info(string.Format("Client connected. Address='{0}'", client.Client.RemoteEndPoint.ToString()));
    NetworkStream networkStream = client.GetStream();
    StreamReader reader = new StreamReader(networkStream);
    StreamWriter writer = new StreamWriter(networkStream);
    writer.AutoFlush = true;
    string input = string.Empty;
    while (true)
    try
    char[] receivedChars = new char[client.ReceiveBufferSize];
    LoggingProvider.Logger.Info("Buffer size: " + client.ReceiveBufferSize);
    int readedChars = reader.Read(receivedChars, 0, client.ReceiveBufferSize);
    char[] validChars = new char[readedChars];
    Array.ConstrainedCopy(receivedChars, 0, validChars, 0, readedChars);
    input = new string(validChars);
    LoggingProvider.Logger.Info("This is what the host sent to you: " + input+". Readed chars=" + readedChars);
    try
    string orderResultFormat = Encoding.ASCII.GetString(Encoding.ASCII.GetBytes("\xB")) + @"MSH|^~\&|Instrument|Laboratory|LIS|LIS Facility|20120427123212+0100||ORL^O34^ORL_O34| 11|P|2.5.1||||||UNICODE UTF-8|||LAB-28^IHE" + Environment.NewLine + "MSA|AA|10" + Environment.NewLine + @"PID|||patientId||""""||19700101|M" + Environment.NewLine + "SPM|1|sampleId&ROCHE||ORH^^HL70487|||||||P^^HL70369" + Environment.NewLine + "SAC|||sampleId" + Environment.NewLine + "ORC|OK|orderId|||SC||||20120427123212" + Encoding.ASCII.GetString(Encoding.ASCII.GetBytes("\x1c\x0d"));
    writer.Write(orderResultFormat);
    catch (Exception e)
    LoggingProvider.Logger.Exception("Unexpected exception while writting the response", e);
    client.Close();
    break;
    catch (Exception ex)
    LoggingProvider.Logger.Exception("Unexpected exception while Reading the request", ex);
    client.Close();
    break;
    }).Wait();
    public override bool OnStart()
    // Set the maximum number of concurrent connections
    ServicePointManager.DefaultConnectionLimit = 12;
    DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString");
    RoleEnvironment.Changing += RoleEnvironment_Changing;
    return base.OnStart();
    private void RoleEnvironment_Changing(object sender, RoleEnvironmentChangingEventArgs e)
    // If a configuration setting is changing
    LoggingProvider.Logger.Info("RoleEnvironment is changing....");
    if (e.Changes.Any(change => change is RoleEnvironmentConfigurationSettingChange))
    // Set e.Cancel to true to restart this role instance
    e.Cancel = true;
    As you can see, nothing special is being done. I've used the RoleEnvironment.CurrentRoleInstance.InstanceEndpoints to retrieve the current IPEndpoint.
    Running the Cloud Service in the Windows Azure Compute Emulator everything works fine, but when I deploy it in Azure, then I receive the following Exception:
    2014-08-06 14:55:23,816 [Role Start Thread] INFO EMAC Log - TcpListenerWorkerRole entry point called
    2014-08-06 14:55:24,145 [Role Start Thread] INFO EMAC Log - TcpListener started at '100.74.10.55:10100'
    2014-08-06 15:06:19,375 [9] INFO EMAC Log - Client connected. Address='196.3.50.254:51934'
    2014-08-06 15:06:19,375 [9] INFO EMAC Log - Buffer size: 65536
    2014-08-06 15:06:45,491 [9] FATAL EMAC Log - Unexpected exception while Reading the request
    System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    --- End of inner exception stack trace ---
    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32 userOffset, Int32 desiredChars, Boolean& readToUserBuffer)
    at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count)
    at TcpListenerWorkerRole.WorkerRole.<>c__DisplayClass0.<<Run>b__2>d__0.MoveNext() in C:\Work\Own projects\EMAC\AzureCloudEmac\TcpListenerWorkerRole\WorkerRole.cs:line 60
    I've already tried to configure an internal port in the ServiceDefinition.csdef file, but I get the same exception there.
    As you can see, the client can connect to the service (the log shows the message: Client connected with the address) but when it tries to read the bytes from the stream, it throws the exception.
    For me it seems like Azure is preventing the retrieval of the message. I've tried to disable the Firewall in the VM in Azure and the same continues happening.
    I'm using Windows Azure SDK 2.3
    Any help will be very very welcome!
    Thanks in advance!
    Javier
    En caso de que la respuesta te sirva, porfavor, márcala como válida
    Muchas gracias y suerte!
    Javier Jiménez Roda
    Blog: http://jimenezroda.wordpress.com

    hi Javier,
    I changed your code like this:
    private AutoResetEvent connectionWaitHandle = new AutoResetEvent(false);
    public override void Run()
    TcpListener listener = null;
    try
    listener = new TcpListener(
    RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Endpoint"].IPEndpoint);
    listener.ExclusiveAddressUse = false;
    listener.Start();
    catch (SocketException se)
    return;
    while (true)
    IAsyncResult result = listener.BeginAcceptTcpClient(HandleAsyncConnection, listener);
    connectionWaitHandle.WaitOne();
    The HandleAsync method is your "While (true)" code:
    private void HandleAsyncConnection(IAsyncResult result)
    TcpListener listener = (TcpListener)result.AsyncState;
    TcpClient client = listener.EndAcceptTcpClient(result);
    connectionWaitHandle.Set();
    NetworkStream netStream = client.GetStream();
    StreamReader reader = new StreamReader(netStream);
    StreamWriter writer = new StreamWriter(netStream);
    writer.AutoFlush = true;
    string input = string.Empty;
    try
    char[] receivedChars = new char[client.ReceiveBufferSize];
    // LoggingProvider.Logger.Info("Buffer size: " + client.ReceiveBufferSize);
    int readedChars = reader.Read(receivedChars, 0, client.ReceiveBufferSize);
    char[] validChars = new char[readedChars];
    Array.ConstrainedCopy(receivedChars, 0, validChars, 0, readedChars);
    input = new string(validChars);
    // LoggingProvider.Logger.Info("This is what the host sent to you: " + input + ". Readed chars=" + readedChars);
    try
    string orderResultFormat = Encoding.ASCII.GetString(Encoding.ASCII.GetBytes("\xB")) + @"MSH|^~\&|Instrument|Laboratory|LIS|LIS Facility|20120427123212+0100||ORL^O34^ORL_O34| 11|P|2.5.1||||||UNICODE UTF-8|||LAB-28^IHE" + Environment.NewLine + "MSA|AA|10" + Environment.NewLine + @"PID|||patientId||""""||19700101|M" + Environment.NewLine + "SPM|1|sampleId&ROCHE||ORH^^HL70487|||||||P^^HL70369" + Environment.NewLine + "SAC|||sampleId" + Environment.NewLine + "ORC|OK|orderId|||SC||||20120427123212" + Encoding.ASCII.GetString(Encoding.ASCII.GetBytes("\x1c\x0d"));
    writer.Write(orderResultFormat);
    catch (Exception e)
    // LoggingProvider.Logger.Exception("Unexpected exception while writting the response", e);
    client.Close();
    catch (Exception ex)
    //LoggingProvider.Logger.Exception("Unexpected exception while Reading the request", ex);
    client.Close();
    Please try it. For this error message, I suggest you could refer to this thread (http://stackoverflow.com/questions/6173763/using-windows-azure-to-use-as-a-tcp-server
    ) and this post (http://stackoverflow.com/a/5420788).
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Can't see design view after changing connections file from localhost to a remote host & back again

    I was using localhost to test files before changing the connections document over to a remote host, since I couldn't get dreamweaver to connect to the remote host, I changed back to localhot. My files are all .php files. This is a dynamic site. After I changed my connection back to my local host my design view no longer works. It's competly grey with 3 small icons at the top on the left. I can view in live view and I can view in the browser. But no longer in design view after being able to for 6 months. The 3 icons are a hard drive case, a document, and a link symbol . When I click in code view the design view turns grey when I click in design view it turns white. I am using wamp for the localhost, Windows XP home, Dreamweaver CS5. Can someone please tell me how to go back to design view. This happens with any & all files including non dynamic .html files. Also having a problem connecting to my remote host. using godaddy, and they have tried with me for 2 hours to connect, I just keep getting password is incorrect. Thank you for any help, Stacey

    I would also recommend clearing the Site cache, which may help with the connection failure. To do so, choose Site > Advanced > Recreate Site Cache.
    After doing so, be sure to go back into your Site Setup, and make sure the FTP address, user name, and password are all correct. (Click the Test button in there to verify.)
    If that doesn't help with getting connected to your server, you might try an alternate FTP client (e.g. FileZilla) to just make sure you are entering the right connection information. It could be that GoDaddy is having some issue, or maybe you just mistyped something (I know I do this often when I type too fast).
    As for the issue with Design View, try clearing the Dreamweaver cache. Instructions are here: http://forums.adobe.com/thread/494811
    You might also try toggling the location of Design View. That is, when in Split View, choose View > Design View On Left. Then, choose that menu option again to reset the location back to the right.
    Resetting the workspace might also be recommended. Window > Worksapce Layout > Reset 'name of current workspace'

  • XML not working in remote host

    Dear colleagues, I've a JSP successfully running locally with J2SE1.4.2 and Tomcat5.
    The problem is it won't run when uploaded in the remote host. I've spent hours in vain, please help.
    The program should load an XML file located in the application folder (same path as the JSP), parse it into
    a DOM tree and retrieve some values.
    I'm getting NullPointerException.
    My import statements:
    <%@ page import="java.io.*" %>
    <%@ page import="org.w3c.dom.*" %>
    <%@ page import="org.xml.sax.*" %>
    <%@ page import="javax.xml.parsers.*" %>
    The code I'm using to get the real path of xml file from JSP scriptlet is:
    String filepath = application.getRealPath(filename);
    However, I also tried and failed with the hard-coded pathname like this:
    String filepath ="/var/tomcat/webapps/babyuniverse/myxmlfile.xml";
    Upon checking the Java version of remote host, I found that it is 1.2.2
    Now I guess, some of the packages I'm importing may not exist in the remote host, especially
    the org.w3c.dom and/or org.xml.sax.
    Upon checking the tomcat/lib folder in the remote host, I found it contains the following jar files:
    ant.jar; commons-fileupload-1.0.jar; jasper.jar; jaxp.jar; parser.jar; servlet.jar; webserver.jar
    Are those packages sufficient to handle my program. If not, which extra packages are needed and where
    they can be found? I've permission to upload files to tomcat/lib and also to restart tomcat if needed.
    But I cannot update classpath.
    Thank you for the help.

    Hi, I found out where to find those jars you mentioned.
    But unfortunately, I was wrong in stating that I'm allowed to upload files to
    tomcat/lib. When I tried, I couldn't. I could only upload them to
    my app's WEB-INF/lib. And this isn't working. Any ideas to solve my problem?
    I'm sure the line I'm getting the NullPointerException is at
    Document mydoc = myparser.parse(new File(xml_file_name));
    My assumption is that it is not able to find a parser.
    Please help someone.

  • WCF service connection forcibly closed by the remote host for large data

    Hello ,
                        WCF service is used to generate excel report , When the stored procedure returns large data around 30,000 records. Service fails
    to return the data . Below is the mentioned erorr log :
    System.ServiceModel.CommunicationException: An error occurred while receiving the HTTP
    response to <service url> This could be due to the service
     endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by
    the server (possibly due to the service shutting down). See server logs for more details. ---> System.Net.WebException:
    The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException:
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
    ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
       at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
       at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       --- End of inner exception stack trace ---
       at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
       --- End of inner exception stack trace ---
       at System.Net.HttpWebRequest.GetResponse()
       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout).
       --- End of inner exception stack trace ---
    Server stack trace:
       at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
       at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at IDataSetService.GetMastersData(Int32 tableID, String userID, String action, Int32 maxRecordLimit, Auditor& audit, DataSet& resultSet, Object[] FieldValues)
       at SPARC.UI.Web.Entities.Reports.Framework.Presenters.MasterPresenter.GetDataSet(Int32 masterID, Object[] procParams, Auditor& audit, Int32 maxRecordLimit).
    WEB CONFIG SETTINGS OF SERVICE
    <httpRuntime maxRequestLength="2147483647" executionTimeout="360"/>
    <binding name="BasicHttpBinding_Common"  closeTimeout="10:00:00"  openTimeout="10:00:00"
           receiveTimeout="10:00:00"  sendTimeout="10:00:00"  allowCookies="false"
           bypassProxyOnLocal="false"  hostNameComparisonMode="StrongWildcard"
           maxBufferSize="2147483647"  maxBufferPoolSize="0"  maxReceivedMessageSize="2147483647"
           messageEncoding="Text"  textEncoding="utf-8"   transferMode="Buffered"
           useDefaultWebProxy="true">
    <readerQuotas     maxDepth="2147483647"
          maxStringContentLength="2147483647"  maxArrayLength="2147483647"
          maxBytesPerRead="2147483647"  maxNameTableCharCount="2147483647" />
         <security mode="None"> 
    WEB CONFIG SETTINGS OF CLIENT
    <httpRuntime maxRequestLength="2147483647" requestValidationMode="2.0"/>
    <binding name="BasicHttpBinding_Common"
           closeTimeout="10:00:00"       openTimeout="10:00:00"
           receiveTimeout="10:00:00"       sendTimeout="10:00:00"
            allowCookies="false"        bypassProxyOnLocal="false"
            hostNameComparisonMode="StrongWildcard"        maxBufferSize="2147483647"
            maxBufferPoolSize="2147483647"        maxReceivedMessageSize="2147483647"
            messageEncoding="Text"        textEncoding="utf-8"
            transferMode="Buffered"        useDefaultWebProxy="true">
     <readerQuotas
           maxDepth="2147483647"
           maxStringContentLength="2147483647"
           maxArrayLength="2147483647"
           maxBytesPerRead="2147483647"
           maxNameTableCharCount="2147483647" />   

    Doing binding configuration on a WCF service to override the default settings is not done the sameway it would be done on the client-side config file.
    A custom bindng must be used on the WCF service-side config to override the defualt binding settings on the WCF service-side.
    http://robbincremers.me/2012/01/01/wcf-custom-binding-by-configuration-and-by-binding-standardbindingelement-and-standardbindingcollectionelement/
    Thee readerQuotas and everything else must be given in the Custom Bindings to override any default setttings on the WCF service side.
    Also, you are posting to the wrong forum.
    http://social.msdn.microsoft.com/Forums/vstudio/en-us/home?forum=wcf

  • SFTP receiver error: putFile: Could not connect to remote host; Reason: Unable to open Sftp client. SshReasonCode: CHANNEL_FAILURE

    Hi,
    When we try to send file over seeburger SFTP (receiver) we are getting the error as below.
    Message processing failed. Cause: javax.resource.ResourceException: Fatal exception: javax.resource.ResourceException: >> Description: SFTP transaction error occured.>> Details: putFile: Could not connect to remote host; Reason: Unable to open Sftp client. SshReasonCode: CHANNEL_FAILURE>>SendingStatus: NOT_TRANSMITTED>>FaultCategory: COMMUNICATION_ERROR>>Retryable: true>>Fatal: true, >> Description: SFTP transaction error occured.>> Details: putFile: Could not connect to remote host; Reason: Unable to open Sftp client. SshReasonCode: CHANNEL_FAILURE>>SendingStatus: NOT_TRANSMITTED>>FaultCategory: COMMUNICATION_ERROR>>Retryable: true>>Fatal: true
    But we are able to connect through filezilla . we are able to create and delete file using the same username and password which is being used in SFTP adapter.
    we have imported the both dsa and rsa keys in SFTP partner folder in NWA. Even though we are getting same error.
    Thanks,
    Vinayak

    Hi Ram,
    we checked with network team and port 22 is open and they are able to ping to the target system.
    we checked the seeburger logs and we see EOF received from remote site error:
    Caused by: com.maverick.ssh.SshException: EOF received from remote side [Unknown cause]
    #at com.maverick.ssh2.TransportProtocol.b(Unknown Source)
    #at com.maverick.ssh2.TransportProtocol.i(Unknown Source)
    #at com.maverick.ssh2.TransportProtocol.nextMessage(Unknown Source)
    #at com.maverick.ssh.message.SshMessageRouter.d(Unknown Source)
    #at com.maverick.ssh.message.SshMessageRouter.access$000(Unknown Source)
    #at com.maverick.ssh.message.SshMessageRouter$_b.run(Unknown Source) 
    Thanks,
    Vinayak.

  • CC&B 2.3.1 startup showing "Unable to start remote host JVM" error

    When starting up a newly installed CC&B server (Linux Redhat 5.0, x86_64), using weblogic 10.3.5, and java 1.6.0_35, I am incurring this error. Log file snippet:
    specified via property spl.runtime.cobol.remote.jvmMaxLifetimeSecs, defaulting to 0
    - 2012-09-13 17:49:12,837 [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO (shared.environ.ApplicationProperties) Child JVM maximum COBOL requests is not spe
    cified via property spl.runtime.cobol.remote.jvmMaxRequests, defaulting to 0
    - 2012-09-13 17:49:12,838 [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO (cobol.host.CobolHostStartup) Using active JVM count of 2 for remote cobol executi
    on.
    - 2012-09-13 17:49:12,880 [pool-2-thread-1] ERROR (cobol.host.RemoteJVMFactoryImpl) Unable to start remote host JVM.
    java.io.IOException: Cannot run program "/srv/spl/ccb/CCBDEMO/bin/splcobjrun.sh": java.io.IOException: error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
    at java.lang.Runtime.exec(Runtime.java:593)
    at java.lang.Runtime.exec(Runtime.java:431)
    at java.lang.Runtime.exec(Runtime.java:369)
    at com.splwg.base.support.cobol.host.RemoteJVMFactoryImpl.addConnection(RemoteJVMFactoryImpl.java:87)
    at com.splwg.base.support.cobol.host.RotatingCommandRunnerProvider$ConnectionMonitor.addNecessaryConnections(RotatingCommandRunnerProvider.java:403)
    at com.splwg.base.support.cobol.host.RotatingCommandRunnerProvider$ConnectionMonitor.doHousekeeping(RotatingCommandRunnerProvider.java:330)
    at com.splwg.base.support.cobol.host.RotatingCommandRunnerProvider$ConnectionMonitor.run(RotatingCommandRunnerProvider.java:323)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
    Does anyone have any ideas?

    hi
    I face a similar issue as u faced . Please let me know the solution .
    Error in Log file : When trying to switch language.
    ZOHAIB - 169696-23-1 2012-01-09 15:23:22,624 [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR (web.dataservlet.PageChange) Unexpected error.
    com.splwg.base.support.cobol.host.InputClosedException:
    The following stacked messages were reported as the LoggedException was rethrown:
    com.splwg.base.api.service.ServiceDispatcher$5.execute(ServiceDispatcher.java:248): Caught exception from SessionExecutable.execute()
    com.splwg.base.support.pagemaintenance.AbstractPageMaintenance.changeItem(AbstractPageMaintenance.java:134): Rollback: Change failed
    com.splwg.base.support.cobol.host.CommandRunnerHolder.invoke(CommandRunnerHolder.java:31): An exception occurred calling cobol program CIPZDATA
    com.splwg.base.support.cobol.host.OptimizedRemoteExecuterStub.sendRequestGetResponse(OptimizedRemoteExecuterStub.java:83): An exception has occurred calling the remote JVM
    com.splwg.base.support.cobol.host.OptimizedRemoteExecuterStub.sendRequestGetResponse(OptimizedRemoteExecuterStub.java:83): An exception occurred invoking remote command.

  • Web SAPconsole doesn't work from remote host

    Hi,
    we have a SAPconsole server (Win XP EN, SP2, last windows update). win a full SAPgui 6.40 comp 5 with SP23.
    SAPconsole with a telnet server works fine in local and in remote hosts.
    Web SAPconsole works fine in local but when I try from a remote host such a PC with IE6 with right url we stay in wait status forever... no error message ora other warning.
    Have you have any idea ?

    Hello Ganimede Dignan,
    although I do not know if XP (which version?) is officially supported it should work, please remember that XP probably has a (crippled: max 10 connections) IIS5 on it and win2003 comes with a IIS6. Since you stated that it works locally it must be something with you IIS, network or firewall security settings.
    Please upgrade your web/sapconsole to the latest patch for 640 since there are known concurrency issues for the patches < 25.
    Regards,
      Fekke

Maybe you are looking for

  • Best Practice for Maintaining a web scoped feature

    I am in the process of creating a web scoped feature that creates a few lists and some event recievers for those lists. My plan was to have the lists created on feature activating. This way, users can simply activate the feature if they want to take

  • I can't update my itunes to 10.7, can anyone help?

    It gets almost half way then says "itunes has an invalid digital signature" then quites on its self. I really want to update it beacuse a recently update my ipad to IOS.6 or what ever it is and can't plug it in to my computer until i've update itunes

  • Album sorting not being saved

    I am using Photoshop Elements 8 and I successfully created and saved 3 albums and copied them to my IPAD using ITUNES. They were in the correct sorted sequence. I then went back and tried to make a best of show album with my 3 star pictures and every

  • Ipod Problems (not playing/clicking)

    My ipod was acting up today.. My computer wouldnt recognize it and it wouldnt update.. Then.. it was freezing up and going real slow... the freezing stopped and everything worked except it wouldnt play a song... it sounded like it was trying to but t

  • Supplier Registration and Preselection

    Hi all, We are trying to configure Supplier Registration and preselection process in SRM: When Supplier is filling Registration form then we try to send it but It got an error message: "Administration SRM isn’t available" What has happened? Regards,