[SOLVED] issues sshing from some remote hosts

Had a quick in some of these threads and couldn't find something similar. I am having an issue when it comes to connecting via ssh  from some ip addresses. example from some (very limited) end points, it connects fine including internally to my network and externally so i know my port forwarding is working. Others it doesnt work at all and just times out.
I have checked to see if my isp is blocking ssh from some ip's so i made available another linux host to try and ssh into and it works fine from the same location that i cant connect to my arch box on.
I have also done tests to see if this is an issue with the way mac ssh via terminal or windows ssh via putty are interacting but have ruled that out.
after trying to ssh into the box via ssh -vvvvv hostname it looks like its failing somewhere at the key exchange. ( i am not sure what i need to be looking for here but i am hoping that someone can help me out.
changed names of hosts etc below.
[login@remotehost ~]$ ssh -vvvvvv archbox.net
OpenSSH_6.6.1, OpenSSL 1.0.1h 5 Jun 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to archbox.net [X.X.X.X] port 22.
debug1: Connection established.
debug1: identity file /home/remotehost/.ssh/id_rsa type -1
debug1: identity file /home/remotehost/.ssh/id_rsa-cert type -1
debug1: identity file /home/remotehost/.ssh/id_dsa type -1
debug1: identity file /home/remotehost/.ssh/id_dsa-cert type -1
debug1: identity file /home/remotehost/.ssh/id_ecdsa type -1
debug1: identity file /home/remotehost/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/remotehost/.ssh/id_ed25519 type -1
debug1: identity file /home/remotehost/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "archbox.net" from file "/home/remotehost/.ssh/known_hosts"
debug3: load_hostkeys: loaded 0 keys
debug1: SSH2_MSG_KEXINIT sent
Last edited by spudicus (2014-07-07 03:34:40)

OK for those who are interested. Issue was due to MTU being set to 1500. set to 1492 and tested OK.
Marked as solved

Similar Messages

  • Reading a text file from a remote host. Authentication required.

    Hi frnds,
    I have to read a text file "config.txt" from a remote host "HOSTNAME". File is shared in a folder - "FOLDER" .
    If the folder is shared with no password protection then it works. But if the folder is password protected the code is unable to read the file.
    I know the UserName and PassWord of the shared folder. How to code for this.
    I don't want to share the Folder to everyone without a password.
    Kindly Help.
    try {
    FileReader fr=new FileReader("\\\\HostName\\folder\\config.txt");
    BufferedReader br=new BufferedReader(fr);
    String s=null;
    while((s=br.readLine())!=null)
    /* One line is read */
    fr.close();
    catch(Exception e)
    throw new Exception("Exception in ConfigConstants."+e.toString());
    urs
    Mishra

    ok.. let me define it clearly...
    By using ftp as a protocol how can I read a text file
    in remote machine........ kindly do reply....Have a look at this article:
    http://www.javaworld.com/javaworld/jw-04-2003/jw-0404-ftp.html
    and what are the prerequisities that are needed for
    such a type of operation.....(At least) an FTP server should be running on the machine where the text file resides.
    Message was edited by:
    prometheuzz
    Oh, you should have your keyboard fixed: the full stop key seems to be stuck, you have a lot of trailing ..... after each sentence.

  • Error accessing mysql database from a remote host

    Hi all,
    I'm running the following PL/SQL script and encountered some errors. The MySQL server is hosted off campus by a hosting company. However, when I run the same script against a MySQL database server hosted on campus, the script works fine. Here's the error:
    ERROR at line 3:
    ORA-04052: error occurred when looking up remote object
    cmswhit_odbc13.mdl_user@RLTEST
    ORA-00604: error occurred at recursive SQL level 1
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [MySQL][ODBC 5.1 Driver][mysqld-4.1.22-standard]SELECT command denied to user
    'cmswhit_odbc13'@'192.160.216.13' for table 'mdl_user'
    ORA-02063: preceding 2 lines from RLTEST
    Here's the script:
    sqlplus -s <<endofit
    $USERPASS
    set serveroutput on;
    DECLARE
    user_name varchar2(30);
    moo_user_name varchar2(300);
    routine VARCHAR2(40);
    cntr NUMBER(8);
    CURSOR read_saradap is
    select gobtpac_external_user
    from gobtpac
    where gobtpac_external_user in ('greenup','yfeng');
    CURSOR read_mdl_user is
    select "username" from "mdl_user"@rltest where "username" = user_name;
    -- E N D O F C U R S O R S --
    BEGIN
    dbms_output.enable(1000000000);
    -- STEP 1: Read through Banner
    cntr := 0;
    OPEN read_saradap;
    LOOP
    routine := 'Read applicant';
    -- Read an applicant record
    dbms_output.put_line('Reading Banner user');
    FETCH read_saradap INTO user_name;
    EXIT WHEN read_saradap%NOTFOUND;
    dbms_output.put_line('Read Banner username=' || user_name);
    cntr := cntr + 1;
    -- Read the Moodle user;
    routine := 'Read moodle user';
    OPEN read_mdl_user;
    FETCH read_mdl_user INTO moo_user_name;
    IF read_mdl_user%NOTFOUND THEN
    dbms_output.put_line('Moodle user not found');
    ELSE
    dbms_output.put_line('Read Moodle username=' || moo_user_name);
    END IF;
    CLOSE read_mdl_user;
    END LOOP;
    rollback;
    CLOSE read_saradap;
    dbms_output.put_line('Total processed: ' || cntr);
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line(SQLCODE);
    dbms_output.put_line(SQLERRM);
    dbms_output.put_line('Error user=' || user_name);
    dbms_output.put_line(routine);
    END;
    EXIT;
    endofit

    The error seems to be quite clear: the user 'cmswhit_odbc13'@'192.160.216.13' lacks the SELECT privilege on the 'mdl_user' table...
    Max
    http://oracleitalia.wordpress.com

  • 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

  • Ldapmodify not working from remote host

    I have an aci on my Groups for class_admin
    (targetattr = "*")
    (target = "ldap:///ou=Groups, o=domain,dc=dom,dc=example,dc=com")
    (version 3.0;
    acl "class_admin for dynamic parent/student email groups";
    allow (all,import)
    (userdn = "ldap:///uid=class_admin, ou=people, o=domain, dc=dom,dc=example,dc=com") and
    (dns="remote-server.domain.com")
    When I run this from the host that the DS is running on, it works fine, but when I run it from the remote host, "remote-server.domain.com" I get "ldap_add: Insufficient access (50)
    additional info: Insufficient 'add' privilege to add the entry"
    ldapmodify -h $host -D "uid=class_admin,ou=people,o=domain, dc=dom,dc=example,dc=com -w $password -a -f /tmp/gun.ldif
    Edited by: knabe_t on Sep 21, 2007 10:20 PM

    Hi,
    it should work ...if remote-server.domain.com is located in same domain as DS host.
    Stefan

  • Plugin Fails to install to remote host OEM 12c R2

    I am trying to get a couple of plugins to deploy to some remote hosts, but they are failing. I did the initial agent install to the servers with no problems. Now I am trying to add the Oracle Database plugin, and the E-Business Suite Plugin now. I have successfully done this before on another OEM install. Here is the output log I see:
    Calling the validateRuntimeParameters method
    PluginDeployonAgt: Plugin Deploy on Agent : validated parameters
    The target_guid is CB189EA727EA205C077F7FC2F853287B.propName : OracleHome
    propName : AgentState
    PluginDeployonAgt
    Plugin Deploy on Agent - oraHome /u01/app/Agent12c/core/12.1.0.2.0
    PluginDeployonAgt - emStateDir /u01/app/Agent12c/agent_inst
    The plugin details are :
    Agent url oracle.apps.ebs
    pluginId 12.1.0.1.0
    pluginVersion 0
    pluginRevision DISCOVERY
    pluginType {4}
    action {5}
    operCode {6}
    errorCode {7}
    errorMsg {8}
    The exception has occured java.security.PrivilegedActionException: oracle.sysman.emSDK.agent.client.exception.AccessPrivilegeException: (oracle.sysman.gcagent.oms.AsAgentPermission putFile)
    The plugin details are :
    Agent url oracle.apps.ebs
    pluginId 12.1.0.1.0
    pluginVersion 0
    pluginRevision AGENT
    pluginType {4}
    action {5}
    operCode {6}
    errorCode {7}
    errorMsg {8}
    The exception has occured java.security.PrivilegedActionException: oracle.sysman.emSDK.agent.client.exception.AccessPrivilegeException: (oracle.sysman.gcagent.oms.AsAgentPermission putFile)
    The exit code is -1
    I have tried resynchronizing, stop/start agents, stop/start OEM, and went as far as rebooting the OEM server. I have not tried removing the host, and agent, then trying to reinstall it.
    Any thoughts, suggestions? Thanks in advance.

    Hi,
    I have the same problem when i try to deploy patch 16466443 on remote agent via Plan.
    Step: GetHomePatchMap Error
    PatchList : 16466443
    TargetName : ------:3872
    [Apr 28, 2013 6:04:22 PM] Command Arguments:
    /oracle/agent12cr2/core/12.1.0.2.0/OPatch/opatch checkComponents -phbasedir /u01/distr/16466443/16466443 -oh /oracle/agent12cr2/core/12.1.0.2.0 -invPtrloc /oracle/agent12cr2/core/12.1.0.2.0/oraInst.loc
    [Apr 28, 2013 6:04:22 PM] java.security.PrivilegedActionException: oracle.sysman.emSDK.agent.client.exception.AccessPrivilegeException: (oracle.sysman.gcagent.oms.AsAgentPermission performOperation)
    [Apr 28, 2013 6:04:22 PM] Unexpected Exception: null
    on the server, this command works correctly:
    oracle@xxx $ /oracle/agent12cr2/core/12.1.0.2.0/OPatch/opatch checkComponents -phbasedir /u01/distr/16466443/16466443 -oh /oracle/agent12cr2/core/12.1.0.2.0 -invPtrloc /oracle/agent12cr2/core/12.1.0.2.0/oraInst.loc
    Oracle Interim Patch Installer version 11.1.0.9.10
    Copyright (c) 2012, Oracle Corporation. All rights reserved.
    Oracle Home : /oracle/agent12cr2/core/12.1.0.2.0
    Central Inventory : /oracle/oraInventory
    from : /oracle/agent12cr2/core/12.1.0.2.0/oraInst.loc
    OPatch version : 11.1.0.9.10
    OUI version : 11.1.0.9.0
    Log file location : /oracle/agent12cr2/core/12.1.0.2.0/cfgtoollogs/opatch/opatch2013-04-28_19-02-03PM_1.log
    Invoking utility "checkcomponents"
    The input patch(es) "[16466443]" can be applied to the following homes (1):
    /oracle/agent12cr2/core/12.1.0.2.0
    The input patch(es) "[16466443]" can be applied to the passed homes by the following command(s):
    /oracle/agent12cr2/core/12.1.0.2.0/OPatch/opatch napply /u01/distr/16466443/16466443 -oh /oracle/agent12cr2/core/12.1.0.2.0 -invptrLoc /oracle/agent12cr2/core/12.1.0.2.0/oraInst.loc
    OPatch command 'checkComponents' done.
    OPatch succeeded.
    The error occurs when I try to put any patch on the agent through the Plan
    somebody decided this issue?
    Edited by: 999966 on 28.04.2013 7:02

  • 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.

  • SMD Issue: A remote host refused an attempted connect operation

    Hi all,
    I am installing SMD agent 7.2 on managed system which is ABAP+JAVA 7.0. I Have successfully installed SMD agent 7.2 on Managemd system. Now, i need to configure its Introcope agent for JAVA system in sOlution manager. when i go to RCA->MAnaged system->setup wizard, it successfully configures it in further screens.
    However, wehn i go to RCA->MAnaged system->INtroscope agent and select the respective JAVA SID for which I installed sMD agent, it does not display the server node of jAVA for that system. Also when I check in the logs of sMG agent in the managed system, I get the below error;
    location:/usr/sap/sMD/SMDA97/log/SMDAgentApplication.0.log
    Error: A remote host refused an attempted connect operation
    Can anyone help me solving this issue?
    REgards,
    FAisal

    Hi Guilherme,
    Thanks for your reply.
    I have checked in agent administration screen. The agent is successfully assigned. I only see a problem while solman talking to the managed system on P4 port. I believe I have to open or do some administration of this P4 port. But where I am not sure.
    I mean while installed another SMD Agent on another J2EE server and it worked instantly!
    Can you help?
    Regards,
    Faisal

  • Mac Pro wakes up from sleep, 'wake reason UHC6' / remote wakeup from some d

    Out of nowhere, my new Mac Pro started suddenly waking up from sleep. It was fine initially, but started a few days ago seemingly without reason.
    The console log states:
    4/15/09 8:40:17 PM kernel USB (UHCI):Port 1 on bus 0x5a has remote wakeup from some device
    4/16/09 12:31:15 AM kernel Wake reason = UHC6
    4/16/09 12:31:15 AM kernel System Wake
    When checking system, and USB, I find:
    USB Bus:
    Host Controller Location: Built In USB
    Host Controller Driver: AppleUSBUHCI
    PCI Device ID: 0x3a39
    PCI Revision ID: 0x0000
    PCI Vendor ID: 0x8086
    Bus Number: 0x5a
    BCM2045B2:
    Product ID: 0x4500
    Vendor ID: 0x0a5c (Broadcom Corp.)
    Version: 1.00
    Speed: Up to 12 Mb/sec
    Manufacturer: Broadcom
    Location ID: 0x5a100000
    Current Available (mA): 500
    Current Required (mA): 0
    Bluetooth USB Host Controller:
    Product ID: 0x8215
    Vendor ID: 0x05ac (Apple Inc.)
    Version: 0.47
    Serial Number: 0023124CDD1F
    Speed: Up to 12 Mb/sec
    Manufacturer: Apple Inc.
    Location ID: 0x5a110000
    Current Available (mA): 500
    Current Required (mA): 0
    Now, from what I can see, the wake event comes from the Bluetooth - but I only have one BT device paired (they Apple wireless keyboard), and I have 'allows BT devices to wake up' DISABLED.
    Does anyone have any suggestions or idea what could be causing the wake-ups? This seems to be happening every few hours, but at no specific times...
    Thanks,
    Dan

    Depends.
    As you can see, the wake event seems to specifically point to the ONE USB bus that the BT is on - but nothing else. All other USB busses have a different hex address....
    Having said that, I have - on the other bus - an RF logitech mouse (I disconnected that - no difference. And, when waking it says 'wake even on the xxx' bus - not the one that 'seems' to wake the system).
    Then, a UPS, and finally an Apple 30inch CinemaDisplay.
    The strange this is that is was fine the first 2 weeks I had the system. Then, one weekend being gone, I turned it off (but that wasn't the first time) and then on. Since then, the wake-up issue on that 'remote device causing event' happened - though of course I can't be sure they are really connected....
    Do you think another device could cause the wake-up - even though the console would wound to BT?
    For the record, I have no BT issues (adapter turning of or otherwise) that I am aware of.
    Thanks for the help / suggestions!
    Dan

  • 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

  • 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'

  • I guess the problem come from me or I really need those contacts before he calls me for it. I'll try some method that I got from some responders on your support website. Do you have or can you recommand any software that can solve this problem?

    I guess the problem come from me but I really need those contacts before he calls me for it. I'll try some method that I got from some responders on your support website. Do you have or can you recommand any software that can solve this problem?
    One more thing. I just update my iphone that my boss gave to me but it seems to be like it giving me some trouble. My iphone was updated not too long and was successful. I try to lock into it and it telling me emergency call. I plug it to my itune and it telling me that the sim card is not valid or supported. So I inserted my sim card that I usually use to call and it still saying the same. Please help me get into it.

    And as far as paying for phone support, here are a few tips:
    If you call your carrier first and then they route you to Apple, you usually don't have to pay for phone support.
    If you are talking to Apple and they ask you to pay a support fee, ask if you can get an exception this time.  That usually works once, but they keep track of the times you've been granted such an exception.
    If you still end up paying the support fee, that fee only applies if it's not a hardware related issue.  In other words, if it can be fixed by just talking over the phone and following Apple's instructions, then the fee applies.  But if your device is deemed to have a hardware failure that caused the issue, then the fee should not apply, and you can ask for it to be waived after the fact.
    This forum is free, and almost all of the technical support articles the Apple tech advisors use are available on this website.  Literally 99% of what they can do over the phone is just walking you through the publicly available support articles.  In other words, you're paying the fee to have them do your research for you.  It's like hiring a research consultant to go look stuff up in the public library so you don't have to.  You're capable of doing it; you'd just rather pay someone to do it for you.
    It's like Starbucks.  You know how to make coffee.  Everyone knows how to make coffee.  And Starbucks coffee isn't any better than what you could make at home for far less.  But you want the convenience.  So you're really paying a convenience fee.  Milk is more expensive at 7-Eleven than it is at the grocery store... because it's a convenience store.

  • We have created shared folder on multiple client machine in domain environment on different 2 OS like-XP,Vista, etc. from some day's When we facing problem when we are access from host name that shared folder is accessible but same time same computer when

    Hello All,
    we have created shared folder on multiple client machine in domain environment on different 2 OS like-XP,Vista, etc.
    from some day's When we facing problem when we are access from host name that shared folder is accessible but same time same computer when we are trying to access the share folder with IP it asking for credentials i have type again and again
    correct credential but unable to access that. If i re-share the folder then we are access it but when we are restarted the system then same problem is occurring.
    I have checked IP,DNS,Gateway and more each & everything is well.
    Pls suggest us.
    Pankaj Kumar

    Hi,
    According to your description, my understanding is that the same shared folder can be accessed by name, but can’t be accessed be IP address and asks for credentials.
    Please try to enable the option below on the device which has shared folder:
    Besides, check the Advanced Shring settings of shared folder and confrim that if there is any limitation settings.
    Best Regards,
    Eve Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Remote host said: 550 5.2.1 Mail from 209.X.X.X refused: spa

    Dear All,
    My Friend is facing a problem he is not able to send mails from outside for e.g yahoo.com his mx is natted on the firewall to my exchange server.
    Sender gets a bounce back mail stating below: -
    <XXX>:
    203.X.X.X does not like recipient.
    Remote host said: 550 5.2.1 Mail from 209.X.X.X refused: spam site.
    Giving up on 203.X.X.X.
    Sorry but i dont know whether this forum should answer my querries which are actually of my friends.
    But if you could it would be really helpful.
    Thanks in advance.
    Regards,
    Ranjit

    Hi Ranjit,
    203.X.X.X does not like recipient.
    Remote host said: 550 5.2.1 Mail from 209.X.X.X refused: spam site.
    Giving up on 203.X.X.X.
    implies that the recipient server is using antispam or blacklist software to refuse connections from certain IP addresses, including the 209.x.x.x address you cited.
    I would consider using an RBL lookup tool such as
    http://www.mxtoolbox.com/blacklists.aspx to check the 209.x.x.x address against different RBLs.
    If it turns out that it is indeed listed, you would need to go to the respective listing site to see how to get off their list.
    ( I am not affiliated with mxtoolbox, they just have a convenient lookup tool on their site )

Maybe you are looking for

  • Imac 350Mhz G3 Slot loading-Won't boot from cd's

    So here's what's going on So, I found this imac awhile back. (somebody was throwing it out) http://www.apple-history.com/?page=gallery&model=imacslot I plugged it in today(it uses the same cable as my summer 2000 indigo imac) and i turned it on, it m

  • How do I connect air print to my Samsung SCX-3405W

    How do I connect my Samsung SCX-3405 to Apple Air Print

  • In Aperture, how do you put a background layer behind text?

    How do you put a background layer behind the text to offset the color of the pic from the text color? Right now, some pics have whites and blacks that drown out the text, making it hard to read...

  • FLASH - Template or Tutorial Needed

    I am very excited as I have been given the ok to learn and develop a new flash site. I have seen many sites that have incorporated the concept of having 4 images underneath a main frame. When the images are selected, they populate the main frame. The

  • Download iPhoto 9

    I recently had to erase the HD on my MacBook and reinstall OS X Lion 10.7.5. Prior to this, I had purchased iPhoto 9.4 from the App Store. After reinstalling the OS, I dug out my old iLife DVD and realised that the version of iPhoto supplied with my