Connection problem in sockets

hi,
i am developing a client application in j2me on mobile..which needs to connect remote java server running on port 5000.so i initially tried a NetworkDemo client in suns WTK2.5 to connect to my remote server.
I am using gprs as berarer.In this socketconnection is used to establish connectio. But i am not getting any request on server...
they have used code
SocketConnection sc;
sc = (SocketConnection)Connector.open("socket://59.95.17.115:5000");
here i have provided my own ip address of server where java server is listning on port 5000.
My Client is running on N-72 having gprs settings from Vodafone.
So can we use this kind of socket to connect to remote server??
Or only httpconnection is possible???
please help me as this is My final year project..if this doesn't work.
I have to switch to another way...

Are you sure port 5000 is open on that IP? I'm guessing it's not (since i can't telnet to it)..
Read the manual of your Buffalo WBMR-G54 Wireless ADSL2+ Router router and set it to open the port and let it forward the the computer where your server is running.

Similar Messages

  • Connection problem odbc socket

    I made a odbc socket connection through a dsn to a foxpro
    database (tables), cf made the connection. Dreamweaver sees all of
    the tables, but cannot read the fields or data. Received this error
    message:
    [1]java.sql.SQLException: [Macromedia][SequeLink JDBC
    Driver][ODBC Socket][Microsoft][ODBC Visual FoxPro Driver]File
    'ccdllc.actrec' does not exist.
    even tho actrec was a listed table in the database panel.
    Any ideas?
    David

    Thanks for spending your time on this. I'm brand new on CF,
    have always used asp for database work, thought this would be a
    breeze. Clearly there's some simple thing I'm not doing correctly.
    I made the connection to the database in CF with the ODBC socket
    driver, then verified the connection. Went into Dreamweaver, set up
    the database connection, and read the table list in the database
    panel. But Dreamweaver wasn't able to read the contents of the
    tables (columns and data), nor was it able to make bindings. I
    inserted the query into the html page and tried running the code
    with the following results:
    -1:[Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Visual FoxPro Driver]File 'ccdllc.actrec'
    does not exist.
    java.sql.SQLException: [Macromedia][SequeLink JDBC
    Driver][ODBC Socket][Microsoft][ODBC Visual FoxPro Driver]File
    'ccdllc.actrec' does not exist.
    at
    macromedia.sequelink.ssp.Diagnostic.toSQLException(Unknown Source)
    at macromedia.sequelink.ssp.Chain.cnvDiagnostics(Unknown
    Source)
    at macromedia.sequelink.ssp.Chain.decodeDiagnostic(Unknown
    Source)
    at macromedia.sequelink.ssp.Chain.decodeBody(Unknown Source)
    at macromedia.sequelink.ssp.Chain.decode(Unknown Source)
    at macromedia.sequelink.ssp.Chain.send(Unknown Source)
    at
    macromedia.sequelink.ctxt.stmt.StatementContext.execDirect(Unknown
    Source)
    at
    macromedia.jdbc.sequelink.SequeLinkImplStatement.execute(Unknown
    Source)
    at
    macromedia.jdbc.slbase.BaseStatement.commonExecute(Unknown Source)
    at
    macromedia.jdbc.slbase.BaseStatement.executeQueryInternal(Unknown
    Source)
    at macromedia.jdbc.slbase.BaseStatement.executeQuery(Unknown
    Source)
    at
    coldfusion.server.j2ee.sql.JRunStatement.executeQuery(JRunStatement.java:111)
    at
    coldfusion.rds.DbFuncsServlet$DbSqlStatementOperator.processCmd(DbFuncsServlet.java:409)
    at
    coldfusion.rds.DbFuncsServlet.processCmd(DbFuncsServlet.java:78)
    at coldfusion.rds.RdsServlet.doPost(RdsServlet.java:57)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    coldfusion.rds.RdsFrontEndServlet.doPost(RdsFrontEndServlet.java:102)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
    at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:318)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:426)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:264)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    Again, thanks for your help, looking forward to any ideas you
    might have.
    David

  • Problem with socket connections through a proxy server.

    People,
    I set the system properties to use a proxy server so my application can fetch data from servers located outside my local network:
    System.setProperty("socksProxyPort", port);
    System.setProperty("socksProxyHost", proxy_addy);Then, when I attempt to stabilish a connection:
    s = new Socket(this.getHost(), port);It hangs.
    I appreciate any help since my available Java documentation is quite obscure regarding proxy servers.

    Is the proxy on another machine? Try it's IP. If
    not, replace 'proxy' with 'localhost'.
    - SaishYes, it is another machine.
                byte x[] = {(byte)aaa,(byte)bbb,(byte)ccc,(byte)ddd};
                s = new Socket(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress(InetAddress.getByAddress(x), 8080)));
                s.connect(new InetSocketAddress(this.getHost(), port));Again, it hung.

  • Problem with socket connection through Java Embedding...

    We are trying to create a simple socket connection to a socket server through BPEL PM using the Java Embedding component.
    BPEL Process : Client makes an asynchronous request. Passes an input variable. The input variable is sent to the Server Program through a socket connection through the Java embedding component.
    Server: We are running a simple Socket Server program from command prompt.
    The code below works fine as long as we do not try to receive a response from the server (Commented Code).
    If we uncomment the code and try to receive a response, it refuses to create an instance for the BPEL Process. And sometimes restarts the BPEL Server.
    Client Code:
    String msg="NONE";
    try{
    org.w3c.dom.Element input = (org.w3c.dom.Element) getVariableData("inputVariable","payload","/client:clientProcessRequest/client:input");
    msg = input.getNodeValue();
    Socket clientsoc=new Socket("ServerIP",1000);
    PrintWriter out1=new PrintWriter(clientsoc.getOutputStream());
    out1.write(msg);
    out1.flush();
    BufferedReader cin1=new BufferedReader(new InputStreamReader(clientsoc.getInputStream()));
    msg=cin1.readLine();
    setVariableData("outputVariable","payload","/client:result",new String(msg));
    clientsoc.close();
    catch(UnknownHostException e)
    System.err.println("Don't know about host: dev.");
    System.exit(1);
    catch (IOException e)
    System.err.println("Couldn't get I/O for "+ "the connection to: dev.");
    System.exit(1);
    }

    Repost

  • Unending connectivity problems -- and Desktop Help...

    I'm wasting so much time on connectivity problems that it's positively wearying. Prior to the installation of BT Infinity here in April, I had a low quality broadband service because of the length of the line from the exchange: if I could get a download speed of 1.2Mbps and an upload of a quarter of that, I was doing well. 
    BT advised that thanks to fibre optic, my Internet should run much faster. So we had Infinity installed. I'm registered with Speedtest.net so am able to see my performance record.
    The average download speed is now aroun d 6Mbps and the average upload, more than that at 7Mbps. How an upload speed can consistently be faster than a download escapes me.
    But I'm not familiar with the ways of Internet connectivity and try as a I might, can't get my head around it.
    This desktop computer runs Vista OS. Vista was **bleep** when it came out and is renowned for its botched handling of Internet connections. So I'm not blaming BT for the literally unending connectivity problems that are occurring now, with line drops, speeds slowing to a crawl, and no guarantee that any connection will last. But it would be good to actually use BT software to help fathom out what's going wrong here, and today's typical morning which looks like this:
    1) Boot up computer. Automatic connection to hub via Netgear USB wireless adapter. Hub is on ground floor of this 3-storey property but signal strength from hub  is excellent, as confirmed by inSSIDer monitoring, currently showing 54 with no other networks anywhere near that figure.
    2) Perhaps 5 minutes after connection established, it's then lost. 'Local Only' is displayed. This is, apparently, a known Vista problem. But Microsoft has issued a fix for it. I know this, because it took 100 hours of ploughin g the Net to find out that MS had finally admitted to one more Vista screw-up. I've used the Microsoft router "fix it" before and it didn't work ("failed to process") so uninstalled it and have DL'd it again now and run it. This time it says it has fixed everything.
    3) Computer is re-booted to make the fix effective. Computer connects to Internet. Speedtest.net check yet again confirms that upload speed is faster than download speed.
    4) Connection dies. So much for Microsoft Fix It.
    5) Windows diagnostics reports that it can re-set the IP profile (or something.) I click yes. The re-set goes through. Connectivity is restored. 10 minutes later, connectivity is lost. Just a red X in the tray. No connection of any kind, not even that daft 'Local Connection' only alert.
    6) Reboot. Yet again. BT Desktop Help was installed here and ran OK when we were using our Netgear DSG34 router. But since the change to the BT Hub, the BT program has never run at all. So-oo. . . It has been uninstalled. And then re-DL'd and re-installed. And though the installation  has been completed, clicking on 'launch' has failed to launch anything. But anyway. An hour ago, in one of the brief periods today when the Internet connection was holding up, I Revo-ed out the earlier install, DL'd BT desktop Help and re-installed it. . . and I'm still at the same stage as always, with a  Firefox browser page that's open and completely blank and has been for the past 30 minutes. The URL is:
    file:///C:/Program%20Files/BT%20Broadband%20Desktop%20Help/btbb/Start.html
     Repeated page re-loading gets nowhere. Malwarebytes PRO is turned OFF to prevent any possibility of blocking and the antivirus is termporaily SUSPENDED. This PC runs on Windows standard firewall but even turning that OFF doesn't get the page to load. Copying the address into Internet Explorer in case there's a Firefox problem merely results in Firefox being opened and the same blank page running there.
    7) After all that. . . Connection lost yet again and this time, Windows cannot connect at all. It reports that the "wireless network security key is not correct". I happen to know that it is, because this is maybe the 20th time it has reported this in the past 10 days and every time I have to key in the "correct" key all over again. . . at which point Windows still says it isn't correct and cannot repair.
    Turning off the computer completely, unplugging from the wall, holding in the power switch for a full minute to clear the circuits, traipsing up and dowen three flights of stairs to turn off the hub, then wait, then turn the power back onm again. . . Ah, wot fun times I'm having here with my particular versioin of Infinity (as in, an infinity of connectivcity problems.)
    Summary: I seem to be being simultaneously hit with one issue after another.
    I'm bewildered as to why ever since Infinity was installed here, my upload speed is generally faster than my download speed. I'm not happy with endless Internet connection failures though am thinking that Vista is playing a large part here with its "wrong security key" and unending 'Local Only / Limited Connection' failures. I do miss my Netgear router and the ability to access a fantastic help menu and re-boot directly from the desktop without having to keep going up and down three flights of sdtairs to do so (I haven't been able to find out how toe access the BT Hub remotely.)
    Above all though: I'm  really tired of repeatedly trying to run freshly downloaded and installed BT Desktop Help software but getting no further than a blank page because the program has stalled.
    If anyone has any advice / suggestions, other than to buy a carrier pigeon, that'd be much appreciated.
    Thanks.

    Thanks again to John and gg30340. Here's an update:
    1) BT Desktop Help removed completely from this computer. The uninstaller itself mopped up everything, which surprised me. But anyway.
    2) Bt Home Hub manager set up and working. Had to input serial number and create new password. All of this sounds fairly easy and would be if one had the device near the desk. But the idiots who built this property shoved the BT master socket inside the garage next to the door. Our two home computers are on the third floor. To ensure the wireless signal strength is OK, the Hub and Infinity module/device/whatever it's called are on a high shelf. It's a major job to even reach the darn things, never mind read the labels seeing as how the BT Infinity engineer was good enough to tidy up the cabling and make a very tight connection to the wall socket.
    3) I had hoped to be able to back up the Hub's settings, seeing as the software provides for Advanced Settings / System / Backup. But not on mine (Hub 3.0). All that System allows is choosing which internet clock to define the accurate time. Everything else in System is just a pattern of short lines as if trying to indicate that there's some text there but it's invisible.This is now my second encounter with BT software which, for whatever reason, isn't functioning as it should on this PC.
    4) Hub reset to factory fresh, according to BT guide.
    5) Reset appears to have achieved nothing apart from requiring the password to be popped in again. After reset, it wasn't even possible to connect to the hub manager. Internet connectivity was eventually established for all of 30 seconds and then, gone.
    6) Computer was shut down and then booted anew. Internet connectivity is still. . . dreadful. One minute everything's fine and then, literally,. the next minute a webpage won't load. Even opening the Hub Manager has taken three attempts, i.e., disconnecting from the Internet, re-connecting, failing, and trying twice more until success. Yet all the time these failures are occurring, the tray icon is showing a steady, unwavering green icon for Local and Internet access -- despite the fact, there manifestly isn't any.
    7) Speedtest. net tests are actually showing upload and download 'trajectories' going slower and slower and finally halting at some point on the arc, then after a period of up to 30 seconds, suddenly becoming animated again. Speed test results with broadband speed checker UK and Think Broadband's checker are so at variance with one another, and with Speedtest, net, that it seems all three are using different technologies in pursuit of the same thing. Either way, upload speeds continue to be much, much faster than download speeds, a state of affairs I certainly have never encountered before.
    8) Speedtest net tests taken in the past 10 minutes, with one test following on from its predecessor, begin at 8.24 down/8.88 up, followed by 5.24 down / 6.40 up, followed by a mind-numbingly lonnnnng 0.62 down / 8.70 up -- in other words, a continuous yo-yoin g of Internet connectivity to the pooint that it actually might as well not even be here (I've had to make five attempts just to get on to this forum. . .)
    9) BT Speedtest will necessitate disconnection of everything downstairs and all boxes being lugged up here. This is actually going to require uncoililng tied-off cabling and hanging off a stepladder to do so -- though I surely can't be the only person in Britain who doesn't have a nice, handy BT master socket in their study or lounge. That said though: until we switched to Infinity, we *never* experienced these kinds of horrendous connectivity problems and never had need to unplug the Netgear router downstairs and bring it upstairs to connect directly to tjhe desktop PC so BT's own test could be run.
    I'll just have to get to work dismantling stuff tomorrow. However, I have to say that after a factory re-set which has changed nothing at all, I'm beginning to think there's a problem with the BT line itself (hence why I'm happy to follow the advice here, though less than happy at the prospect of the messing about involved.)
    Thanks, you two, for your patient help, and also for clarifying the situation re the three signal paths being shown on inSSIDer. At least I know that's usual now! And now, hopefully, when I press 'Post', I won't be faced with an endlessly spinning Firefox circle culminating in  what may well be, or seem to be, the 57,938th time today of seeing "Page Not Found". . .

  • Problem with socket communications

    I am trying to put together a client server socket communication pair.
    I have one application that runs in the background acting as a server and another that can be started and stopped that acts as a client.
    I can start the server and create a server socket with no problem.
    I can start the client and it connects to the server.
    The server acknowledges the connection and appears to go into a blocking state waiting for the client to send another message.
    The server blocks at the line
    parent.logit("Waiting for message from EVR..... ");
    The problem is that when the client sends another message, the server doesn't hear it.
    I am not sure if the problem is with the client or server communication code.
    If anyone out there is a socket communication guru, I would appreciate it if you could tell me what I am doing wrong.
    Thanks
    Server code:
    import java.io.*;
    import java.net.*;
    public class EVRServer
        extends Thread
      EVRDataLoader parent = null;
      ServerSocket serverSock = null;
      Socket clientSock = null;
      BufferedReader reader = null;
      BufferedWriter writer = null;
      int evrPort = 0;
      int retryLimit = 10;
      int retryCount = 0;
      boolean alive = false;
      boolean killSocket = false;
      boolean evrConnected = false;
      boolean retry = true;
      EVRListener evrListener = null;
    //=============================================================================
    // Full constructor
    //=============================================================================
       * Full constructor.
       * @param dl DataLoader - Parent application
       * @param port int Socket port
      public EVRServer(EVRDataLoader dl, int port)
        parent = dl;
        evrPort = port;
    //=============================================================================
    //  Run method - Main thread executed by start() method
    //=============================================================================
       * Main thread executed by start() method
      public void run()
        while (retry)
          if (retryCount > retryLimit)
            retry = false;
          parent.logit("Retry count = " + retryCount);
          // Create new server socket connection
          if (serverSock == null)
            try
              serverSock = new ServerSocket(evrPort);
              parent.logit("Created Server Socket for EVR on port " + evrPort);
              alive = true;
              killSocket = false;
              evrConnected = false;
            catch (Exception e)
              parent.logit(
                  "ERROR - Could not create Server socket connection for EVR: " +
                  e.toString());
              killSocket = true;
              alive = false;
          // Create new client socket connection
          if (clientSock == null)
            try
              parent.logit("Waiting for EVR to connect");
              clientSock = null;
              clientSock = serverSock.accept();
              retryCount = 0;
              evrConnected = true;
              killSocket = false;
              parent.logit("EVR connected on server Socket Port " + evrPort);
            catch (Exception e)
              parent.logit("ERROR - Error accepting EVR connection: " + e.toString());
              killSocket = true;
            try
              reader = new BufferedReader(new InputStreamReader(
                  clientSock.getInputStream()));
              writer = new BufferedWriter(new OutputStreamWriter(
                  clientSock.getOutputStream()));
              parent.logit( "Created reader "+reader);
              parent.logit( "Created writer "+writer);
            catch (Exception e)
              parent.logit(
                  "ERROR - creating reader or writer to EVR: " + e.toString());
              killSocket = true;
          int nullCount = 0;
          while (killSocket == false)
            try
              parent.logit("Waiting for message from EVR..... ");
    //          sendMessage("Data Controller connected on port " + evrPort);
              String s = reader.readLine();
              parent.logit("EVR - Received message: " + s);
              if (s != null)
                parent.processEvrMessage( s);
              else
                sleep(1000);
                nullCount++;
                if (nullCount > 10)
                  parent.logit("Exceeded retry limit: ");
                  killSocket = true;
            catch (Exception ex)
              parent.logit("Error Reading from EVR: " + ex.toString());
              killSocket = true;
          parent.logit( "After while loop");
          evrConnected = false;
          try
            retryCount++;
            parent.logit("Closing EVR connection. ");
            reader.close();
            writer.close();
            clientSock.close();
            writer = null;
            reader = null;
            clientSock = null;
            try
              sleep(1000);
            catch (Exception ee)
              parent.logit("Error after sleep " + ee.toString());
          catch (Exception e)
            parent.logit("Error closing EVR server socket");
    //=============================================================================
    // Call this method to kill the client socket connection.
    //=============================================================================
       * Call this method to kill the client socket connection.
      public void killConnection()
        killSocket = true;
    //=============================================================================
    // Return RTM connected state
    //=============================================================================
       * Return RTM connected state
       * @return boolean - Returns true if RTM is connected to server, false if not.
      public boolean isRtmConnected()
        return evrConnected;
    //=============================================================================
    // Returns state of server socket.
    //=============================================================================
       * Returns state of server socket.
       * @return boolean - Returns true if server socket is enabled, false if not.
      public boolean isServerSocketAlive()
        return alive;
    //=============================================================================
    // Send a message to the client socket.
    //=============================================================================
         * Send a message to the client socket.
         * @param msg String - Message to send.
         * @return boolean - Returns true if message sent OK, false if not.
      public boolean sendMessage(String msg)
        parent.logit(" In EVR Server - Send Message - got message: " + msg);
        if (evrConnected)
          try
            parent.logit("Sending message to EVR: " + msg);
            writer.write(msg + "\n");
            writer.flush();
            return true;
          catch (Exception e)
            parent.logit("ERROR - Error sending message to EVR: " + e.toString());
            return false;
        else
          parent.logit("EVR not connected, cannot send message: " + msg);
          return false;
    }Client code:
    package evrsimulator;
    import java.net.*;
    import java.io.*;
    class PortConnector
          extends Thread
       ServerSocket serverSock = null;
       boolean isIP = false;
       InetAddress addr = null;
       Frame1 parent = null;
       byte[] rawIP;
        //   String initialMsg = "";
       public PortConnector( Frame1 f )
         parent = f;
       // This method is called when the thread runs
       public void run()
          if ( parent.hostName.indexOf( "." ) > 0 )
             isIP = true;
             byte[] rawIP = parent.getRawIP( parent.hostName );
          try
             System.out.println( "Connecting to host " +
                                            parent.hostName + " on port " +
                                            parent.socketPort );
             if ( isIP )
                addr = InetAddress.getByAddress( rawIP );
             else
                addr = InetAddress.getByName( parent.hostName );
             System.out.println( "Inet address = " + addr );
             SocketAddress sockaddr =
                   new InetSocketAddress( addr, parent.socketPort );
             // Create an unbound socket
             parent.client = new Socket();
             // This method will block no more than timeoutMs.
             // If the timeout occurs, SocketTimeoutException is thrown.
             parent.client.connect( sockaddr, parent.socketTimeOut );
             parent.socketOut =
                   new BufferedWriter( new OutputStreamWriter(
                   parent.client.getOutputStream() ) );
             parent.socketIn = new BufferedReader( new InputStreamReader(
                   parent.client.getInputStream() ) );
             parent.localName = parent.localName +
                   parent.client;
             System.out.println( "Parent socketOut = "+parent.socketOut);
             System.out.println( "Parent socketIn = "+parent.socketIn);
          catch ( UnknownHostException uhe )
             System.out.println( "Unknown Host - " + uhe.getMessage() );
          catch ( SocketTimeoutException ste )
             System.out.println( "Socket time out - " + ste.getMessage());
          catch ( IOException ioe )
             System.out.println( "IO exception - " + ioe.getMessage() );
          // Listen on socket for message from host - thread should block.
          parent.portConnected = true;
          while ( parent.portConnected )
             try
                String msg = parent.socketIn.readLine();
                System.out.println( "Message from Host: " + msg );
                System.out.println( "Message from Host: |" + msg + "|" );
                if( msg.length() > 2)parent.processMessage( msg );
             catch ( IOException ioe )
                System.out.println( "Exception creating server socket." );
          try
             System.out.println(
                   "PortConnection - Closing socket and IO connections" );
             parent.socketIn.close();
             parent.socketOut.close();
             parent.client.close();
             parent.clockRunning = false;
             if( parent.heartBeating) heartBeat.interrupt();
          catch ( IOException ioex )
             System.out.println( "Exception closing socket." );
    }

    Your first problem is that you keep closing and recreating the ServerSocket. Do this once only in the lifetime of the server.
    This is such a basic error that I haven't read the rest of the code. Before you go any further I suggest you read the Custom Networking trail of the Java Tutorial.

  • Problem with socket in java and c++

    I am connecting to a server developed in java that use sys/socket.h, this server use DataInputStream
    class and readUTF so:
    in = new DataInputStream(socket.getInputStream());
    inputString = in.readUTF()
    My application in C++ it use winsock2.h and I utilize the method "send" in order to send the plots to the server
    java got hold of:
    #define MAXLONGITUD 10000
    char     bufEnviados[MAXLONGITUD + 1];
    bufEnviados[0] = (0xff & (longitud >> 8));
    bufEnviados[1] = (0xff & longitud);
    send(sock, bufEnviados,strlen(bufEnviados), 0 );
    I send the two first characters with UTF format so that the server in java could recognize them.
    The application operated correctly it until received an old plot of 6.236 characters later
    from which it close the connection with the socket and it fall my application!
    I have carried out several tests and I don't succeed in sending more than those 6.236 characters, however it achievement receibing whatever quantity of characters without problems!
    Could somebody help me to resolve this problem? I am attempting of everything and I don't achieve it!
    Ahead of time thank you!

    alfaximena wrote:
    #define MAXLONGITUD 10000
    char     bufEnviados[MAXLONGITUD + 1];
    bufEnviados[0] = (0xff & (longitud >> 8));
    bufEnviados[1] = (0xff & longitud);
    send(sock, bufEnviados,strlen(bufEnviados), 0 );
    Are you sending characters or binary data? You mention "plot" which sounds like binary data. You cannot send binary data via character encoding. Characters in java are not just bits, they are mapped values. If you encode it with something like base64 then that should be ok.
    I can only suppose that your testing was with data sets greater than 255, because strlen() would not have worked otherwise.
    Since you have the size then use it rather than using strlen().
    I send the two first characters with UTF format so that the server in java could recognize them.
    The application operated correctly it until received an old plot of 6.236 characters later
    from which it close the connection with the socket and it fall my application!
    There is nothing special about that particular number. So I would guess that the data in that set is the problem. Probably because you are in fact sending binary data. If, for example, a byte with a value of zero showed up in the sequence then strlen() would return an incorrect value compared to the size that you told java you are sending.

  • Content Server connection problems

    SAP Content Server connection problems
    I have installed the SAP Content Server on a Windows 2003 server. I connected to the Max DB on the remote server from Database Manager on my PC. I created repositories in R/3 in OAC0 and CSADMIN and saved documents to the Content Server. This all took a few hours from O/S install to saving a document in the repository, so I do understand the basics of the Content Server and Max DB.
    Unfortunately we are not going to use Windows; we will be running this on UNIX. Therefore I'm trying it out on a Linux system while I wait for the AIX system to be available. It's been a long road but I have finally gotten the install to finish 'successfully' however I can't connect from R/3.
    When I run the check http://10.XXX.YYY.ZZZ:1090/ContentServer/ContentServer.dll?serverInfo from the browser on the Linux host I get back a good status as shown below:
    serverType="SAP HTTP Content Server";serverVendorId="SAP AG";serverVersion="640";serverPatch="0";serverBuild="16";pVersion="0046";serverStatus="running";serverDate="2008-03-25";serverTime="22:39:45";startUpDate="2008-03-25";startUpTime="22:32:21";lastAccessDate="2008-03-25";lastAccessTime="22:38:33";
    However when I do this from any my PC it won't connect. (Of course the real problem is I can't connect from R/3.)
    If I try the same URL from a different user session on the same Content Server Linux host I get the same good status.
    I thought maybe the httpd.conf file was wrong so I tried:
    Listen 0.0.0.0:1090
    In cs.conf I tried commenting out AdminSecurity & AdminSecurityGroup.
    I also changed StorageDriver from SAPDBStorage to FSStorage.
    I don't know if this is related or just another problem to tackle once I can get through this one. I was not able to add the new system to the Database Manager. I get the error "-4 could not connect to socket [10060]".
    Thanks to all for any help. Points will dutifully be rewarded.
    David

    Hi Henk,
    It looks like I am dumber than a rock. The firewall was indeed active on the Linux host. I turned it off and can now do the http connection test to the Content Server. (I awarded very helpful points.)
    I still can't connect to the database with the Database Manager however the message has changed; it now says "-4 XSERVER might be inactive". I just turned off the firewall so I have a few things to try, like figure out how to start MaxDB without the DB Manager. I'll post my progress. Thanks Henk.
    David
    Edited by: Dave Hill on Mar 28, 2008 12:00 AM
    Now I have installed the Database Studion on my PC. No I'm getting this message when I try to connect to the host/database on the Linux system: "Cannot connect to host 10.XXX.XXX.XXX:7210 [Connection refused: connect], -813."
    Does MaxDB need to be started to connect? Any idea how to start it manually? Thanks,
    David
    Edited by: Dave Hill on Mar 28, 2008 1:06 AM
    Ah, at long last. There's this tiny yet very important little program called x_server that SAP didn't include in the SAP Content Server install guide. This needs to be running in order for anything to connect. I'm sure most of you know about it but for the rest you can find it in:
    /sapdb/programs/bin
    Then type
    ./x_server start
    I'm not sure what user it should run under but I started it as the sdb user.
    You could automate the database startup with a script. See http://maxdb.sap.com/doc/7_7/e9/005dac1592496783e26133eb7fad0b/frameset.htm
    Thank you Henk, I'll call this problem solved and award points.
    Edited by: Dave Hill on Mar 28, 2008 2:10 AM

  • Broadband/internet and wireless connection problem...

    Towards the end of 2101 I received an email informing me that BT would be upgrading my local line and I could expect a much improved service. Whether this 'upgrade' has been the cause of my problems or is merely coincidental I cannot say. Prior to my experience since this time I could count lost broadband in hours per year (I never had internet or wireless connection problems). 
    Since the end of 2010 I now regularly lose my broadband completely every six to eight weeks. 'Home Hub cannot connect to broadband.' There is a worsening loss of speed? over a period of two to four days at the end of which I need to phone BT three/four/five, etc. times until they manage to locate the problem and fix it. It is always some problem they find on the line or with their equipment.
    I always mention that this is an ongoing problem. Never do they take any action to escalate the issue.
    This week things have become considerably worse.
    I have started to lose my internet connection now. 'Safari cannot connect to the internet'.
    There are now two issues which arise concurrently.
    I phoned BT, finally the operative in India (through a very poor BT wireless phone connection) changed the channel of my router for me. He mentioned something about changing the address and password. This seriously exacerbated the situation. My password is not recognised now when I am asked to reconnect by selecting a network.
    The next occasion on which I lost my INTERNET connection and tried to reconnect I got the message 'Airport has the self-assigned IP address (...........) and is unable to connect to the internet.
    I phoned BT to report this and was told that this indicated an adapter problem and the problem was now out of BT's hands. I Should contact Apple. 
    I did so. Apple said I should contact BT to change channels. I explained this had caused the problem and they were now refusing to assist me. Apple tried everything that they could think of to resolve the issue (despite not being required to do so). Eventually the only suggestion they could make as BT had refused to help was to reinstall my operating system. Extremely drastic. But I can now connect wirelessly again.
    Service is still intermittent requiring constant restarts to regain connections.
    BT's response to a formal complaint was more of the usual banal questions, the usual tests, the usual promises of 'something would be done'.
    Their systems are not set up to make any sort of accurate diagnosis of customers' issues. They seem to have a set number of 'fixes' into which they try to fit all problems - one would assume simply to save costs - their cost saving exercises are now costing me money.
    That's all for starters.
    Any suggestions?
    Solved!
    Go to Solution.

    fredderf99 wrote:
    I have a similar problem, since BT "upgraded my broardband" my home hub looses internet connection at least twice a day and I have to power reset it. the broadband shows as connected but the internet connection is lost, if I try reconnecting it fails and only a power resetr will work. I have a temp solution by fitting a time switch to the mains adaptor and reseting it at 0200 each day. but before the upgrade the home hub had worked for years and no problems. i have also replaced the origonal home hub 1 with a home hub 2 to see if that improves the situation.
    welcome to the forum
    This subject has been marked as solved by the originator and you will get more response if you start your own subject rather than continue here.
    if you start your own subject just cut and paste your post and then in order to help please can you post the adsl stats from your router may need to 'show detail' to get all stats (if hub enter 192.168.1.254 in your browser and navigate to adsl or use a-z, if netgear enter 192.168.0.1) and run btspeedtester (MAC users may have problems) http://speedtester.bt.com and post the results .
    are you connected directly to the NTE5 master or test socket or to somewhere else? Do you have any phone extension sockets in your home?
    Have you tried the quiet line test? - dial 17070 option 2 - should hear nothing - best done with a corded phone. if cordless phone you may hear a 'dull hum' which is normal
    Someone may then be able to offer help/assistance/suggestions to your problem
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post.
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Connect(/var/imap/socket/lmtp) failed: No such file or directory' + DBERROR

    Mail server won't work: Dual 2 GHz PowerPC G5 running Mac OS X Server 10.5.8
    Cleared /var/imap/db
    Rebuilt the database using 'sudo mailbfr -f'
    Logs say:
    master: process started
    deliver[nnn]: connect(/var/imap/socket/lmtp) failed: No such file or directory
    ctl_cyrusdb[nnn]: DBERROR db4: unable to join the environment
    ctl_cyrusdb[nnn]: verifying cyrus databases
    ctl_cyrusdb[nnn]: skiplist: recovered/var/imap/mailboxes.db (xxx records, yyyyy bytes) in 0 seconds
    ctl_cyrusdb[nnn]: skiplist: recovered/var/imap/annotations.db (0 records, zzz bytes) in 0 seconds
    Help!

    Update(s):
    (1) problem went away on a reboot
    (2) problem re-appeared at 02:00 this morning, following a attempted mailbfr backup
    (3) new problem on reboot:
    - IMAP now working
    - Overview shows SMTP status as 'Running'
    - SMTP log says: postfix/postfix-script[nnnn]: fatal: the Postfix mail system is not running
    (4) so, try to shut down mail gracefully with 'serveradmin stop mail'
    'mail: state = "STOPPING"'
    'mail: status = 0'
    BUT!
    (5) 'Overview' shows IMAP and so on 'Stopped' and for SMTP 'Shutting down'
    (6) 'Overview' now shows Outgoing SMTP and Incoming SMTP 'Running'
    (7) Try again, says 'Shutting down' for a while, then 'Running' again

  • Connectivity problem with MS BizTalk Server 2010

    Hi colleagues,
    I have a connectivity problem between MS BizTalk Server 2010 and SAP.
    There are two virtual machines (VMs on VMWare), the first one is SAP ERP6 Ehp6 (IDES), and second one is MS BizTalk Server 2010 (BT). On BT side I have deployed a package which sends ORDERS05 document to SAP and has to receive a reverse call. The bottom line is that SAP can receive a call from BT but cannot send a reverse call. Gateway monotor shows the connection:
    In the trace file I can't see anything suspicious:
    trc file: "dev_rd", trc level: 1, release: "721"
    Tue Apr 01 20:14:28 2014
    ***LOG S00=> GwInitReader, gateway started ( 5060) [gwxxrd.c     1759]
    systemid   562 (PC with Windows NT)
    relno      7210
    patchlevel 0
    patchno    136
    intno      20020600
    make       multithreaded, Unicode, 64 bit, optimized
    pid        5060
    gateway runs with dp version 138000(ext=120000) (@(#) DPLIB-INT-VERSION-138000-UC)
    gateway (version=721.2013.09.02)
    gw/reg_no_conn_info = 1
    gw/local_addr : 0.0.0.0
    gw/sim_mode : set to 0
    ***LOG S1I=> GwSetSimMode, Simulation Mode deactivated () [gwxxprf.c    4020]
    * SWITCH TRC-RESOLUTION from 1 TO 1
    CCMS: initialize CCMS Monitoring for ABAP instance with J2EE addin.
    CCMS: SemInMgt: Semaphore Management initialized by AlAttachShm_Doublestack.
    CCMS: SemInit: Semaphore 38 initialized by AlAttachShm_Doublestack.
    Tue Apr 01 20:14:29 2014
    Bind service sapgw00 (socket) to port 3300
    GwIInitSecInfo: secinfo version = 2
    GwIRegInitRegInfo: reginfo version = 2
    Tue Apr 01 20:14:30 2014
    GwPrintMyHostAddr: my host addresses are :
      1 : [192.168.1.127] WIN2008R2 (HOSTNAME)
      2 : [127.0.0.1] WIN2008R2 (LOCALHOST)
    Full qualified hostname = WIN2008R2
    DpSysAdmExtCreate: ABAP is active
    DpSysAdmExtCreate: VMC (JAVA VM in WP) is not active
    DpIPCInit2: read dp-profile-values from sys_adm_ext
    DpShMCreate: sizeof(wp_adm)  42864 (2256)
    DpShMCreate: sizeof(tm_adm)  5517056 (27448)
    DpShMCreate: sizeof(wp_ca_adm)  64000 (64)
    DpShMCreate: sizeof(appc_ca_adm) 64000 (64)
    DpCommTableSize: max/headSize/ftSize/tableSize=500/16/1384064/1384080
    DpShMCreate: sizeof(comm_adm)  1384080 (2744)
    DpSlockTableSize: max/headSize/ftSize/fiSize/tableSize=0/0/0/0/0
    DpShMCreate: sizeof(slock_adm)  0 (296)
    DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
    DpShMCreate: sizeof(file_adm)  0 (80)
    DpShMCreate: sizeof(vmc_adm)  0 (2160)
    DpShMCreate: sizeof(wall_adm)  (41664/42896/64/192)
    DpShMCreate: sizeof(gw_adm) 48
    DpShMCreate: sizeof(j2ee_adm) 3952
    DpShMCreate: SHM_DP_ADM_KEY  (addr: 0000000011A40050, size: 7174832)
    DpShMCreate: allocated sys_adm at 0000000011A40060
    DpShMCreate: allocated wp_adm_list at 0000000011A430B0
    DpShMCreate: allocated wp_adm at 0000000011A432A0
    DpShMCreate: allocated tm_adm_list at 0000000011A4DA20
    DpShMCreate: allocated tm_adm at 0000000011A4DA70
    DpShMCreate: allocated appc_ca_adm at 0000000011FA0390
    DpShMCreate: allocated comm_adm at 0000000011FAFDA0
    DpShMCreate: system runs without slock table
    DpShMCreate: system runs without file table
    DpShMCreate: allocated vmc_adm_list at 0000000012101C40
    DpShMCreate: system runs without vmc_adm
    DpShMCreate: allocated gw_adm at 0000000012101CF0
    DpShMCreate: allocated j2ee_adm at 0000000012101D30
    DpShMCreate: allocated ca_info at 0000000012102CB0
    DpCommAttachTable: attached comm table (header=0000000011FAFDA0/ft=0000000011FAFDB0)
    MtxInit: -2 0 0
    DpRqQInit: use protect_queue / slots_per_queue 0 / 2001 from sys_adm
    Tue Apr 01 20:14:45 2014
    GwDpInit: attached to gw_adm at 0000000012101CF0
    Tue Apr 01 20:16:21 2014
    Prxy Trace = 0

    Hi Deepak,
    Thanks for the answer, but this is not the case I'm afraid. I've received an error message for BizTalk instance:
    "Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The segment name is not valid for the IDOCTYP, Release, or CIMTYP. Segment name: E2EDP01006GRP   IDOCTYP: ORDERS05    Release: 620   CIMTYP: . Ensure that your message xml validates against the operation schema.
    Don't really understood what does it want from me...

  • Tnsping80 connectivity problem

    Hi,
    I am getting tnsping80 connectivity problem.
    Trying to connect remotely to 9i database server (9.2.0.8).
    tnsping80 shows following reply:
    C:\Documents and Settings\Administrator>tnsping80 applydb.world 5
    TNS Ping Utility for 32-bit Windows: Version 8.0.5.0.0 - Production on 02-JUL-09 13:21:22
    (c) Copyright 1997 Oracle Corporation. All rights reserved.
    Attempting to contact (ADDRESS=(PROTOCOL=TCP)(HOST=128.5.22.57)(PORT=1521))
    OK (21400 msec)
    TNS-12560: TNS:protocol adapter error
    Sometimes it gets connected but next second it will not get connected.
    This is a continuous behaviour.
    When traced tnsping, it shows follwing lines at end:
    nttcnp: Validnode Table IN use; err 0x0
    nttcnp: exit
    nttcni: entry
    nttcni: trying to connect to socket 1920.
    nttcni: trying to connect to socket 1920.
    nttcni: trying to connect to socket 1920.
    nttcni: trying to connect to socket 1920.
    nttcni: trying to connect to socket 1920.
    ntt2err: entry
    ntt2err: soc 1920 error - operation=1, ntresnt[0]=530, ntresnt[1]=55, ntresnt[2]=0
    What could be the reason for such behaviour?
    ntt2err: exit
    nttcni: exit
    nttcon: exit
    nserror: nsres: id=0, op=65, ns=12560, ns2=0; nt[0]=530, nt[1]=55, nt[2]=0
    nsopen: unable to open transport
    nsmfr: 1664 bytes at 0x95a7b8
    nsmfr: 400 bytes at 0x95c330

    Hi,
    All other client have no issue in connecting to database server.
    Only this clinet machine is not able to connect.
    sqlnet.ora
    TRACE_LEVEL_CLIENT = NONE
    TNSPING.TRACE_LEVEL =ADMIN
    sqlnet.authentication_services = (NONE)
    #names.directory_path = (TNSNAMES,HOSTNAME)
    names.default_domain = world
    name.default_zone = world
    #automatic_ipc = off
    sqlnet.log
    Fatal NI connect error 12203, connecting to:
    (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=128.5.22.57)(PORT=1521)))(CONNECT_DATA=(SID=applydb)(SERVER=DEDICATED)(CID=(PROGRAM=C:\ORANT\BIN\ifrun60.EXE)(HOST=RECEPTION)(USER=Administrator))))
    VERSION INFORMATION:
         TNS for 32-bit Windows: Version 8.0.5.0.0 - Production
         Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 8.0.5.0.0 - Production
    Time: 01-JUL-09 14:46:03
    Tracing not turned on.
    Tns error struct:
    nr err code: 12203
    TNS-12203: TNS:unable to connect to destination
    ns main err code: 12560
    TNS-12560: TNS:protocol adapter error
    ns secondary err code: 0
    nt main err code: 530
    TNS-00530: Protocol adapter error
    nt secondary err code: 55
    nt OS err code: 0
    above log is repeating

  • Weird ethernet connection problem

    Hello
    I have a really weird connection problem. I am not a complete beginner but I just don't see what's going on.
    I just had BT infinity 4 installed with the modem placed in a closet. I then had cat6 cables installed by an electrician between the closet and the different rooms, all wall sockets on each end.
    Test1: If I connect to the BT Home Hub wirelessly it works.
    Test2: If I connect to the BT Home Hub via ethernet directly to the device it works.
    Test3: If I connect to the BT Home Hub via ethernet through the wall sockets directly it works.
    Test4: If I connect a switch (a DLink DGS-1210) to the wall sockets and I connect through the switch I do not get connectivity. I can however access the switch's web interface or other computers connected to the switch. But I cannot connect to 192.168.1.254 for instance.
    Test5: if I connect one switch to each end of the wall socket, I can access the web interface of the other switch through one switch.
    Test6: if I connect a switch directly to the BT Home Hub, and I connect through the switch it doesn't work.
    The switch test the cables which are fine, I see no collision in the switch port monitoring, and I have the same problem with all sockets. So I do not think that the wiring of the electrician itself is a problem (otherwise Test3 & Test5 would fail).
    This gives me the feeling that the BT Home Hub (BT Home Hub 5) is the cause of my worries but I can't think of a logical explaination of why the Home Hub would behave differently whether it's connected directly rather than through a switch. Also these are rather high-end switches, which have always worked very well and I do not believe that both would fail simultaneously.
    Has anyone experienced anything similar?
    thanks
    Charles

    The switch by any chance has not got some form of dhcp set up. Maybe allocating ip addresses to devices on your network as well as the home hub. I had similar issue when I had connected a linksys ata onto my network, rather than use the socket labeled network I used the one labeled ethernet.
    (If I have helped you in any way to say "Thank You" please click on the star next to the message. Thank You)
    If I have solved your Issue please click the "Mark as accepted solution" button.

  • Timeouts and connection problems after 5.1(2) upgrade

    AIM/chat and some other programs are having timeout/connection problems after upgrade to 5.1(2). I am using S241 also. The connection problems stopped when the IPS was set to bypass. Rebuilt IPS and left sigs at default settings and problem is still happening. I am not seeing any of the IPs that are having the problem in the Event Viewer or on the Events in the IDM.
    Any known issues with the 5.1(2) that would cause this type of problem?

    I don't know specifically, but I did notice that 5.1(3) was released today.

  • Hi, i am having trouble with my mac mail account, i cannot send or receive any emails because of the server connection problems. Message says it could not be connected to SMTP server. Thanks in advance for your help.

    Hi, i am having trouble with my mac mail account, i cannot send or receive any emails because of the server connection problems. Message says it could not be connected to SMTP server. Thanks in advance for your help.

    Hello Sue,
    I have an iPad 3, iPad Mini and iPhone 5S and they are all sluggish on capitalisation using shift keys. I hope that Apple will solve the problem because it is driving me crazy.
    I find using a Microsoft Surface and Windows 8 phone, which I also have, work as well as all the ios devices before the ios 7 upgrade.
    It has something to do with the length of time that you need to hold the shift key down. The shift key needs to be held longer than the letter key for the capitalisation to work. For some reason, this is a major change in the way we have learnt to touch type on computers. I am having to relearn how to type!
    Michael

Maybe you are looking for