How to manage socket communications

i need to learn about how to manage socket communications. does any one has sample codes to share that illustrates how to manage sockets? Im going to create an application that listens over a socket. My socket listener should be able to read over the socket continuously without user intervention. If there's no data, it would wait until something comes in. If some data come in, the listener should be able to read it automatically, and save data in db.
Im thinking of an infinite loop here, but the problem
arises when the socket is waiting for data to come in. The application consumes 100% CPU resources. And im only running one instance of my socket listener. My solution here is to use threads and let the thread SLEEP for a while when no there's no data yet.
Any advise on this matter is very much appreciated. Thank you.

It sounds, that you are using non-blocking read from a socket inside a busy wait loop. You should do a blocking read, which means your process/thread will be suspended by OS untill something is available on your socket.
I'm new to Java and I can not say how actually to implement this, but look for "blocking/non-blocking read" in network interface documentation.
Zhenya.

Similar Messages

  • How to correct socket communications error 10054: connection reset by peer

    We are running Lookout 5.1 (build 8) reading data through Modbus Ethernet Drivers and we are constantly getting "socket communications error 10054: connection reset by peer" alarms on the server. When I connect to the server file with a client file the client is experiencing communications problems including locking up when editing, trends not showing up, stops updating completely (can only be corrected by restarting server file), and losing symbolic link.
    Does anyone know how to stop this alarm from happening and if this could be the cause of my faulty server-client connection or is this strictly a problem between the server and the ethernet radios in the field?
    Any response would be appreciated.
    Thanks!
    Jason
    Jason Phillips

    DST1,
    All I had to do was increase the receive timeout in each driver's properties until the socket errors disappeared. I have them all set to 30000 msec. Communications have been great on this wireless ethernet system ever since.
    Sorry for not answering sooner - needed to make time to go back and look at the file and then TS Lee came our way!
    Jason Phillips

  • [NSFileHandle][Sockets] How to manage a network disconnection?

    Hi,
    I have built a client/server app that communicates via TCP/IP.
    The *Client is an iPhone Application* that receives and sends many messages of variable sizes through a NSFileHandle object linked with a socket as its filedescriptor
    I catch *incoming bytes trough an Observer* whose matching message is named "DataAvailable:(NSNotification *)aNotification".
    *When the server stops*, the observer receives one last "dataAvailable" notification, which I try to manage with the [NSFileHandle readdataoflength:1]... that throws an *exception indicating the +connection has been reset by peer+* , which I catch and manage through a SocketDidDisconnect: homemade message.
    But I have a *problem when the disconnection occurs directly because of a network disconnection* (I did disconnect the network on purpose) : I receive *no "DataAvailable" notification* (although it receive one I just close the connection from the server Application).
    Then I thought I could check every 1/10 seconds if my connection was still ok by trying to do a [MyNSFileHandle ReadDataOfLength:0] : that would throw an exception as soon as my connection goes down. But obviously, reading 0 bytes does not have any effect. And since I don't wanna loose the queued incoming data by various random reading, I don't know how to detect such a network problem.
    If any of your has an idea about *how to manage a network disconnection with a NSFileHandle without involving the random reading of queued incoming data*, I will listen to you with the greatest interest.
    Thank you for reading till the end.

    Looks like it will be of some help, yes.
    But I don't have time to test it today. I'll tell you as soon as I have tested it.
    Thanks anywa for your help

  • How to design socket client-server app for 2-way communication

    Hi, I am writing a client-server application. I have a single server and many clients. Each client will need the ability to send information to the server at any time. The server will also need the ability to send information to a client at any time. Its this second part that I am not sure how to design. Would I need to create a SocketServer on each client to accept incoming messages, or is there a better way? Thanks

    scranchdaddy wrote:
    Don't my requirements sound a lot like an IM application, where a chat server might need to send a message to a chat client at any time?Not really. If that is what you are designing
    in my opinion one could easily be forgiven for thinking you were deliberately obfuscating your goal...
    How does the server know where the client is? Does it know the IP address of the client?I would imagine the server would contain a directory of IPs? I'm not sure.
    What happens if the client is not running?Then I guess the message would not get delivered.
    What happens if the client is behind a firewall that does not allow incoming connections?How do IM chat clients work? How have people solved this in the past?Typically the server would only care about clients currently connected to the server.
    Maybe you should re-think your design. I don't really have a design, just requirements, that's why I'm writing this post.Your subject says "+How to *design* socket client-server app for 2-way communication+".
    Are you saying you expect someone else to do the design for you?

  • My iCloud storage is very nearly full but i can't find out how to manage it!

    I keep recieving an e-mail saying that my icloud backup is almost full but i have no idea how to manage this. I don't want to purchase more back up, is there a way of managing it?

    Welcome to the Apple Community.
    settings > iCloud > storage & backup > manage...

  • Socket communication via TCP-IP

    Hi,
    I am new to CF and would like to establish TCP-IP socket
    communication with a remote server. How can I exchange XML messages
    with a remote server / port via TCP-IP. Do I need to use the event
    gateways of does CF offer another way of setting up socket
    communication ?
    Many thanks in advance !
    John

    Do I need to use the event gateways of does CF offer another way
    of setting up socket communication ?
    I would say, yes, use the socket gateway that ships with
    Coldfusion. However, it has a functionality I cannot really
    understand. If you are a client setting up a socket to connect to
    the gateway, the gateway expects your code to have, beforehand, a
    value for the variable
    originatorID. Yet,
    originatorID is a large, unique integer that the gateway
    code generates when you connect. That seems to me to be a
    chicken-and-egg dilemma.

  • Socket communication problem

    hello all,
    i have written a small program to send a message to echo server and get back the response from the server.
    it gives a error as
    COULD NOT GET I/O FOR CONNECTION TO <ip address>
    i am working on win nt version 4 service pack 4 installed on a home computer.
    the code is as below:
    import java.io.*;
    import java.net.*;
    public class net4a {
    public static void main(String[] args) throws IOException{
    Socket echoSocket = null;
    DataOutputStream os = null;
    DataInputStream is = null;
         DataInputStream stdIn = new DataInputStream(System.in);
         InetAddress host = InetAddress.getLocalHost();
    try {
    echoSocket = new Socket(host, 7);
    os = new DataOutputStream(echoSocket.getOutputStream());
    is = new DataInputStream(echoSocket.getInputStream());
    } catch (UnknownHostException e) {
    System.err.println("Don't know about host: " + host);
    } catch (IOException e) {
    System.err.println("Couldn't get I/O for the connection to: " + host);
    if (echoSocket != null && os != null && is != null) {
    try {
    String userInput;
    while ((userInput = stdIn.readLine()) != null) {
    os.writeBytes(userInput);
    os.writeByte('\n');
    System.out.println("echo: " + is.readLine());
    os.close();
    is.close();
    echoSocket.close();
    } catch (IOException e) {
    System.err.println("I/O failed on the connection to: " + host);
    look forward to ur valuable tips on the same.

    Hello,
    Long time java programmer, first time forum user.
    Looks like you looking to looking to get a java applet/program communicating with a web server. This is not an extremely difficult task and I have successfully got apache communicating CGI transactions to and from an applet with no drama�s.
    This is very useful as it is restrictive to have to open up extra sockets across a network as many networks today restrict socket communication often for security or business/organization policies.
    An alternative is to use HTTP request using the POST command to talk to a web server with the web server replying to the request. For example, you may need to ask a database to pull out all customer names from a server-side database. The applet need only send a URLEncoded request to the server, the webserver invokes the CGI process (I use Java to handle the CGI requests but other methods/languages can be used) which returns the result of the transaction.
    I have listed some code that included the a �ping-pong� request to a server. It included the applet function that calls the webserver, the CGI batch script (for win NT/XP) to invoke the java program, the cgi-lib to simply parse the URL request (many thanks to the author) and the server-side java program that responds to the request.
    I hope you find this useful. The download for apache, the webserver, is available at
    http://www.apache.org/
    and is a pretty simple install. Make sure you fix up the httpd.conf file to suit your system.
    Good luck.
    Dale Miller
    CLIENT-SIDE (Java Applet Snippit)
    public class Comm {
         private String server;
         private URL toServer;
         private URLConnection uRLConnection;
         private DataOutputStream dataOutputStream;
         private StringBuffer output;
         private BufferedReader dataInputStream;
         private String result;
         private int resultsLast;
         private String results[] = new String[100];
         private int firstTU;
         //this function starts in its own thread and takes care
         //of logins and there re-tries, the messaging.
         //Please see the actual function for better details
         //private LoginWatcher loginWatcher;
         public Comm(String serverAddress) throws UnsupportedEncodingException{
              System.out.println("loaded Comm class!");
              //First thing we need to do is set up the login watcher
              //loginWatcher = new LoginWatcher();
              this.output = new StringBuffer();
              this.server = serverAddress;
              try {
                   this.toServer = new URL(server + "ping.cgi");
              } catch (MalformedURLException e) {
                   System.out.println("ERROR : in contacting the server");
                   System.out.println("Server : " + server);
                   System.out.println("NOT FOUND!!");
              try {
                   this.uRLConnection = toServer.openConnection();
              } catch (IOException e) {
                   System.out.println("ERROR : Connection to server refused");
              this.uRLConnection.setUseCaches(false);
              this.uRLConnection.setDoInput(true);
              this.uRLConnection.setDoOutput(true);
              this.uRLConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
              try {
                   this.dataOutputStream = new DataOutputStream(uRLConnection.getOutputStream());
              } catch (IOException e) {
                   System.out.println("ERROR : opening dataoutputstream");
              this.output.setLength(0);
              output.append("first=" + URLEncoder.encode("I am", "UTF-8"));
              output.append("&last=" + URLEncoder.encode("number 1", "UTF-8"));
              try {
                   dataOutputStream.writeBytes(new String(output));
              } catch (IOException e) {
                   System.out.println("ERROR : Sending string to cgi ping.cgi");
              try {
                   this.dataInputStream = new BufferedReader(new InputStreamReader(uRLConnection.getInputStream()));
              } catch (IOException e) {
                   System.out.println("ERROR : Setting up input stream");
              String grab = new String();
              System.out.print("Searching for server..");
              try {
                   grab = dataInputStream.readLine();
                   grab = dataInputStream.readLine();
              } catch (IOException e) {
                   System.out.println("ERROR : Reciving ping data from server");
              if (grab.equals("pass")) {
                   System.out.println("OK");
              } else {
                   System.out.println("ERROR\n\nSERVER NOT FOUND!!!");
                   System.exit(-1);
              //loginWatcher.loginWatcherTh.start();
    CGI BATCH TO INVOKE CGI PROGRAM
    #!java -cp c:\ss\ middle
    CGI-LIB TO PARSE HTTP REQUESTS
    import java.util.*;
    import java.io.*;
    * cgi_lib.java<p>
    * <p>
    * Usage: This library of java functions, which I have encapsulated inside
    * a class called cgi_lib as class (static) member functions,
    * attempts to duplicate the standard PERL CGI library (cgi-lib.pl).
    * You must invoke any Java program that uses this library from
    * within a UNIX script, Windows batch file or equivalent. As you
    * will see in the following example, all of the CGI environment
    * variables must be passed from the script into the Java application
    * using the -D option of the Java interpreter. This example
    * UNIX script uses the "main" routine of this class as a
    * CGI script:
    * <pre>
    * (testcgi.sh)
    * #!/bin/sh
    * java \
    * -Dcgi.content_type=$CONTENT_TYPE \
    * -Dcgi.content_length=$CONTENT_LENGTH \
    * -Dcgi.request_method=$REQUEST_METHOD \
    * -Dcgi.query_string=$QUERY_STRING \
    * -Dcgi.server_name=$SERVER_NAME \
    * -Dcgi.server_port=$SERVER_PORT \
    * -Dcgi.script_name=$SCRIPT_NAME \
    * -Dcgi.path_info=$PATH_INFO \
    * cgi_lib
    * </pre>
    * Question and comments can be sent to [email protected].<p>
    * @version 1.0
    * @author Pat L. Durante
    class cgi_lib
    * Parse the form data passed from the browser into
    * a Hashtable. The names of the input fields on the HTML form will
    * be used as the keys to the Hashtable returned. If you have a form
    * that contains an input field such as this,<p>
    * <pre>
    * &ltINPUT SIZE=40 TYPE="text" NAME="email" VALUE="[email protected]"&gt
    * </pre>
    * then after calling this method like this,<p>
    * <pre>
    * Hashtable form_data = cgi_lib.ReadParse(System.in);
    * </pre>
    * you can access that email field as follows:<p>
    * <pre>
    * String email_addr = (String)form_data.get("email");
    * </pre>
    * @param inStream The input stream from which the form data can be read.
    * (Only used if the form data was posted using the POST method. Usually,
    * you will want to simply pass in System.in for this parameter.)
    * @return The form data is parsed and returned in a Hashtable
    * in which the keys represent the names of the input fields.
    public static Hashtable ReadParse(InputStream inStream)
    Hashtable form_data = new Hashtable();
    String inBuffer = "";
    if (MethGet())
    inBuffer = System.getProperty("cgi.query_string");
    else
    // TODO: I should probably use the cgi.content_length property when
    // reading the input stream and read only that number of
    // bytes. The code below does not use the content length
    // passed in through the CGI API.
    DataInput d = new DataInputStream(inStream);
    String line;
    try
    while((line = d.readLine()) != null)
    inBuffer = inBuffer + line;
    catch (IOException ignored) { }
    // Split the name value pairs at the ampersand (&)
    StringTokenizer pair_tokenizer = new StringTokenizer(inBuffer,"&");
    while (pair_tokenizer.hasMoreTokens())
    String pair = urlDecode(pair_tokenizer.nextToken());
    // Split into key and value
    StringTokenizer keyval_tokenizer = new StringTokenizer(pair,"=");
    String key = new String();
    String value = new String();
    if (keyval_tokenizer.hasMoreTokens())
    key = keyval_tokenizer.nextToken();
    else ; // ERROR - shouldn't ever occur
    if (keyval_tokenizer.hasMoreTokens())
    value = keyval_tokenizer.nextToken();
    else ; // ERROR - shouldn't ever occur
    // Add key and associated value into the form_data Hashtable
    form_data.put(key,value);
    return form_data;
    * URL decode a string.<p>
    * Data passed through the CGI API is URL encoded by the browser.
    * All spaces are turned into plus characters (+) and all "special"
    * characters are hex escaped into a %dd format (where dd is the hex
    * ASCII value that represents the original character). You probably
    * won't ever need to call this routine directly; it is used by the
    * ReadParse method to decode the form data.
    * @param in The string you wish to decode.
    * @return The decoded string.
    public static String urlDecode(String in)
    StringBuffer out = new StringBuffer(in.length());
    int i = 0;
    int j = 0;
    while (i < in.length())
    char ch = in.charAt(i);
    i++;
    if (ch == '+') ch = ' ';
    else if (ch == '%')
    ch = (char)Integer.parseInt(in.substring(i,i+2), 16);
    i+=2;
    out.append(ch);
    j++;
    return new String(out);
    * Generate a standard HTTP HTML header.
    * @return A String containing the standard HTTP HTML header.
    public static String Header()
    return "Content-type: text/html\n\n";
    * Generate some vanilla HTML that you usually
    * want to include at the top of any HTML page you generate.
    * @param Title The title you want to put on the page.
    * @return A String containing the top portion of an HTML file.
    public static String HtmlTop(String Title)
    String Top = new String();
    Top = "<html>\n";
    Top+= "<head>\n";
    Top+= "<title>\n";
    Top+= Title;
    Top+= "\n";
    Top+= "</title>\n";
    Top+= "</head>\n";
    Top+= "<body>\n";
    return Top;
    * Generate some vanilla HTML that you usually
    * want to include at the bottom of any HTML page you generate.
    * @return A String containing the bottom portion of an HTML file.
    public static String HtmlBot()
    return "</body>\n</html>\n";
    * Determine if the REQUEST_METHOD used to
    * send the data from the browser was the GET method.
    * @return true, if the REQUEST_METHOD was GET. false, otherwise.
    public static boolean MethGet()
    String RequestMethod = System.getProperty("cgi.request_method");
    boolean returnVal = false;
    if (RequestMethod != null)
    if (RequestMethod.equals("GET") ||
    RequestMethod.equals("get"))
    returnVal=true;
    return returnVal;
    * Determine if the REQUEST_METHOD used to
    * send the data from the browser was the POST method.
    * @return true, if the REQUEST_METHOD was POST. false, otherwise.
    public static boolean MethPost()
    String RequestMethod = System.getProperty("cgi.request_method");
    boolean returnVal = false;
    if (RequestMethod != null)
    if (RequestMethod.equals("POST") ||
    RequestMethod.equals("post"))
    returnVal=true;
    return returnVal;
    * Determine the Base URL of this script.
    * (Does not include the QUERY_STRING (if any) or PATH_INFO (if any).
    * @return The Base URL of this script as a String.
    public static String MyBaseURL()
    String returnString = new String();
    returnString = "http://" +
    System.getProperty("cgi.server_name");
    if (!(System.getProperty("cgi.server_port").equals("80")))
    returnString += ":" + System.getProperty("cgi.server_port");
    returnString += System.getProperty("cgi.script_name");
    return returnString;
    * Determine the Full URL of this script.
    * (Includes the QUERY_STRING (if any) or PATH_INFO (if any).
    * @return The Full URL of this script as a String.
    public static String MyFullURL()
    String returnString;
    returnString = MyBaseURL();
    returnString += System.getProperty("cgi.path_info");
    String queryString = System.getProperty("cgi.query_string");
    if (queryString.length() > 0)
    returnString += "?" + queryString;
    return returnString;
    * Neatly format all of the CGI environment variables
    * and the associated values using HTML.
    * @return A String containing an HTML representation of the CGI environment
    * variables and the associated values.
    public static String Environment()
    String returnString;
    returnString = "<dl compact>\n";
    returnString += "<dt><b>CONTENT_TYPE</b> <dd>:<i>" +
    System.getProperty("cgi.content_type") +
    "</i>:<br>\n";
    returnString += "<dt><b>CONTENT_LENGTH</b> <dd>:<i>" +
    System.getProperty("cgi.content_length") +
    "</i>:<br>\n";
    returnString += "<dt><b>REQUEST_METHOD</b> <dd>:<i>" +
    System.getProperty("cgi.request_method") +
    "</i>:<br>\n";
    returnString += "<dt><b>QUERY_STRING</b> <dd>:<i>" +
    System.getProperty("cgi.query_string") +
    "</i>:<br>\n";
    returnString += "<dt><b>SERVER_NAME</b> <dd>:<i>" +
    System.getProperty("cgi.server_name") +
    "</i>:<br>\n";
    returnString += "<dt><b>SERVER_PORT</b> <dd>:<i>" +
    System.getProperty("cgi.server_port") +
    "</i>:<br>\n";
    returnString += "<dt><b>SCRIPT_NAME</b> <dd>:<i>" +
    System.getProperty("cgi.script_name") +
    "</i>:<br>\n";
    returnString += "<dt><b>PATH_INFO</b> <dd>:<i>" +
    System.getProperty("cgi.path_info") +
    "</i>:<br>\n";
    returnString += "</dl>\n";
    return returnString;
    * Neatly format all of the form data using HTML.
    * @param form_data The Hashtable containing the form data which was
    * parsed using the ReadParse method.
    * @return A String containing an HTML representation of all of the
    * form variables and the associated values.
    public static String Variables(Hashtable form_data)
    String returnString;
    returnString = "<dl compact>\n";
    for (Enumeration e = form_data.keys() ; e.hasMoreElements() ;)
    String key = (String)e.nextElement();
    String value = (String)form_data.get(key);
    returnString += "<dt><b>" + key + "</b> <dd>:<i>" +
    value +
    "</i>:<br>\n";
    returnString += "</dl>\n";
    return returnString;
    * The main routine is included here as a test CGI script to
    * demonstrate the use of all of the methods provided above.
    * You can use it to test your ability to execute a CGI script written
    * in Java. See the sample UNIX script file included above to see
    * how you would invoke this routine.<p>
    * Please note that this routine references the member functions directly
    * (since they are in the same class), but you would have to
    * reference the member functions using the class name prefix to
    * use them in your own CGI application:<p>
    * <pre>
    * System.out.println(cgi_lib.HtmlTop());
    * </pre>
    * @param args An array of Strings containing any command line
    * parameters supplied when this program in invoked. Any
    * command line parameters supplied are ignored by this routine.
    public static void main( String args[] )
    // This main program is simply used to test the functions in the
    // cgi_lib class.
    // That said, you can use this main program as a test cgi script. All
    // it does is echo back the form inputs and enviroment information to
    // the browser. Use the testcgi UNIX script file to invoke it. You'll
    // notice that the script you use to invoke any Java application that
    // uses the cgi_lib functions MUST pass all the CGI enviroment variables
    // into it using the -D parameter. See testcgi for more details.
    // Print the required CGI header.
    System.out.println(Header());
    // Create the Top of the returned HTML
    // page (the parameter becomes the title).
    System.out.println(HtmlTop("Hello World"));
    System.out.println("<hr>");
    // Determine the request method used by the browser.
    if (MethGet())
    System.out.println("REQUEST_METHOD=GET");
    if (MethPost())
    System.out.println("REQUEST_METHOD=POST");
    System.out.println("<hr>");
    // Determine the Base URL of this script.
    System.out.println("Base URL: " + MyBaseURL());
    System.out.println("<hr>");
    // Determine the Full URL used to invoke this script.
    System.out.println("Full URL: " + MyFullURL());
    System.out.println("<hr>");
    // Print all the CGI environment variables
    // (usually only used while testing CGI scripts).
    System.out.println(Environment());
    System.out.println("<hr>");
    // Parse the form data into a Hashtable.
    Hashtable form_data = ReadParse(System.in);
    // Print out each of the name/value pairs
    // from sent from the browser.
    System.out.println(Variables(form_data));
    System.out.println("<hr>");
    // Access a particular form value.
    // (This assumes the form contains a "name" input field.)
    String name = (String)form_data.get("name");
    System.out.println("Name=" + name);
    System.out.println("<hr>");
    // Create the Bottom of the returned HTML page - which closes it cleanly.
    System.out.println(HtmlBot());
    SERVER-SIDE PROGRAM TO RETURN PING
    import java.util.*;
    import java.io.*;
    class ping
         public static void main(String args[]) {
              System.out.println(cgi_lib.Header());
              Hashtable form_data = cgi_lib.ReadParse(System.in);
              String one = (String)form_data.get("first");
              String two = (String)form_data.get("last");
              boolean test;
              test = false;
              if (one.equals("I am")) {
                   if (two.equals("number 1")) {
                        test = true;
              if (test == true) {
                   System.out.println("pass");
              } else {
                   System.out.println("fail");
         //Datavasee
    ENJOY :)

  • How to manage VPN clients in SCCM 2012

    Hi,
    In my environment, I have multiple clients over VPN in multiple sites, 
    now I have problem, I how can I manage those clients for VPN, coz n CM 2012 I have to give boundary group and n boundary group  have to give the site server references, and I have only one IP subnet in whole environment, but from that subnet, some clients
    are from A site, B site and C site, now can you tell me how to manage them, 
    How to configure DP for them??
    How they can get correct MP?  
    Sharad Singh | My blogs: SharadTech | Twitter:
    @SinghSharaad | | Please remember to click “Mark as Answer” on the post that helps you.This can be beneficial to other community members reading the thread.

    Jason, 
    I have only one IP subnet means I have only one IP subnet for VPN clients n all environment, all clients from all sites which are connecting with VPN they will fall on that VPN IP subnet.
    other than  have LAN/WAN link for all sites, which I have already configured according to Sites/DP and there s no problem, every thing is working fine.
    but for VPN i have only one network which is worldwide, and that network used by all sites, this is the problem, How can I manage that network, and where should I add for boundary/DP for site references??? 
    Sharad Singh | My blogs: SharadTech | Twitter:
    @SinghSharaad | | Please remember to click “Mark as Answer” on the post that helps you.This can be beneficial to other community members reading the thread.

  • [nQSError: 12002] Socket communication error at call=recv: (Number=10004)

    Can any1 plz help...!
    I am unable to start presentation services...! I am currently using windows server 2003 service pack 2. I tried configuring scheduler after which I got the message:
    "Windows could'nt start Oracle BI Presentation server on local computer. For more information review the system event log. If this is a non-microsft service, contact the service vendor, and refer to service-specific error code -1."
    I am getting these 2 errors:
    In nqserver.log shows below error
    [nQSError: 12002] Socket communication error at call=recv: (Number=10004) A blocking operation was interrupted by a call to WSACancelBlockingCall.
    In nqscheduler.log shows below error
    [nQSError: 12002] Socket communication error at call=: (Number=10048) Only one usage of each socket address (protocol/network address/port) is normally permitted.
    I have changed scheduler port (in Job manager-->file-->configure options..>schedule-->general tab) to an available open port since 9705 is not available. I also updated port number in instanceconfig.xml file.
    Any suggestions would be really appreciated.

    have you seen the blog of John about this? http://obiee101.blogspot.com/2008/08/obiee-configuring-configuring-scheduler.html
    hope this heps

  • [nQSError: 12002] Socket communication error at call=(Number=10004, 10048)

    Can any1 plz help...!
    I am unable to start presentation services...! I am currently using windows server 2003 service pack 2. I tried configuring scheduler after which I got the message:
    "Windows could'nt start Oracle BI Presentation server on local computer. For more information review the system event log. If this is a non-microsft service, contact the service vendor, and refer to service-specific error code -1."
    I am getting these 2 errors:
    In nqserver.log shows below error+
    [nQSError: 12002] Socket communication error at call=recv: (Number=10004) A blocking operation was interrupted by a call to WSACancelBlockingCall.
    In nqscheduler.log shows below error_
    [nQSError: 12002] Socket communication error at call=: (Number=10048) Only one usage of each socket address (protocol/network address/port) is normally permitted.
    I have changed scheduler port (in Job manager-->file-->configure options..>schedule-->general tab) to an available open port since 9705 is not available. I also updated port number in instanceconfig.xml file.
    Any suggestions would be really appreciated.

    user12970693 wrote:
    Can any1 plz help...!Gawsh. That's awful.
    I wonder whether people who deal primarily with BI Server might be able to help you better than people who deal primarily with the database?
    http://forums.oracle.com/forums/category.jspa?categoryID=145
    I am unable to start presentation services...! I am currently using windows server 2003 service pack 2. I tried configuring scheduler after which I got the message:
    "Windows could'nt start Oracle BI Presentation server on local computer. For more information review the system event log. If this is a non-microsft service, contact the service vendor, and refer to service-specific error code -1."
    I am getting these 2 errors:
    In nqserver.log shows below error+
    [nQSError: 12002] Socket communication error at call=recv: (Number=10004) A blocking operation was interrupted by a call to WSACancelBlockingCall.
    In nqscheduler.log shows below error_
    [nQSError: 12002] Socket communication error at call=: (Number=10048) Only one usage of each socket address (protocol/network address/port) is normally permitted.
    I have changed scheduler port (in Job manager-->file-->configure options..>schedule-->general tab) to an available open port since 9705 is not available. I also updated port number in instanceconfig.xml file.
    Any suggestions would be really appreciated.On first guess, I'd almost think some anti-virus or firewall is haunting that machine.

  • How to manage Rescue and Recovery Backups

    Hi I've been using disk image backup solutions since the days of powerquests Drive Image. And have had my days with Ghost and Acronis Trueimage. I recently built a clean Vista image on my T400, and I'd like to take advantage of the Lenovo Rescue and Recovery 4.21 tool since it the recovery technology is already part of my system and I have tested it once.
    I'm used to the idea that a backup tool will produce an image file, which I can manage myself, moving to various media....hiding under my bed etc. With RnR, I've noticed it prefers to control the directory's where backups are placed (this is a bit annoying to me, but I can live with it, as long as it's isolated to the RRBackup directory - which it appears may not be the case). I do appreciate it's ability to specify various backup media locations (network, CD, 2nd HDD, USB) and recognize that it's a simple approach for basic usage.
    Recently I've backed up my image to USB drive, and also to the local disk. I'd like to take that back up and split it up into DVD's and burn it to disk. I know there is a built in RnR feature which lets us copy backups from the local drive (why only local drive ??) to USB/Network/CD, but unfortunately the CD copy feature burns directly to my thinkpad burner...which is a CDR device, not a DVDR device. I'd like to use the DVDR device on my desktop...
    Anyway, I'd like to know if there is more resources on how to manage RnR Backups. I found the following guide http://www-307.ibm.com/pc/support/site.wss/MIGR-70344.html (which is hard to get on Lenovo's site...google finds it better), I'm still reading it, but so far it appears more focused on the pre-desktop area than backup management.
    Any insight would be appreciated.
    Thanks!

    Hi Danielle,
    Consider this allegory; factory settings will make your thinkpad like a never driven 0 meter car [with reference to software]. Hence it will be far-flung from it's previous state. Apart from what you have already saved on memory stick, all settings and the software you have installed on the notebook will be lost.
    I hope this helps.
    Maliha (I don't work for lenovo)
    ThinkPads:- T400[Win 7], T60[Win 7], IBM 240[Win XP]
    IdeaPad: U350
    Apple:- Macbook Air [Snow Leopard]
    Did someone help you today? Compliment them with a Kudos!
    Was your question answered today? Mark it as an Accepted Solution! 
      Lenovo Deutsche Community     Lenovo Comunidad en Español 
    Visit my YouTube Channel

  • How to manage Workgroup Windows 2012r2 core Server Firewall

    How to manage Workgroup Windows 2012r2 core Server Firewall?
    Ideas?
    I have tried most things I can, and it always returns error connecting

    Hi,
    Any update?
    Just checking in to see if the suggestions were helpful. Please let us know if you would like further assistance.
    Best Regards,
    Andy Qi
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Andy Qi
    TechNet Community Support

  • How to manage the payment approver users?

    Hello community,
    I would like to understand more on the payment approval process in SAP Business ByDesign. Despite it is quite easy to find the payment approval process in the help center, it is really hard to find how to manage to whom the payment approval request is sent. How can a system administrator can decide which users have the faculty to approve payments? How to change/update the list of approver users?
    Of course I have the rights to manage all users by assigning them business roles and access rights. I have access to all workcenters.
    Thank you in advance for your help.
    Luca

    Hi Luca,
    You can define threshold amounts for payment approvals depending on company, payment method, and user. No task will be created if the amount of the outgoing payment is below the specified threshold.
    You can define this threshold for both incoming and outgoing payments on the Fine-Tune task Business Task Management for Payment and Liquidity Management
    After maintaining a threshold amount to trigger the approval process, you can define who is the approver via Application and User Management work center, Employee Work Distribution view. In the Finance and Administration group, define the approvers within Approver for Liquidity Management.
    The approval task is then sent to all approvers that you've maintained. If the task is completed for one of them, the payment gets approved. If there is no approver maintained, the task is sent to all authorized managers.
    Please, mark my reply as answered or helpful if this answers your question.
    Additionally, I'd also suggest you to post financial related questions on the Financial Management forum (http://scn.sap.com/community/bydesignbc/fm), which would have a greater visibility from our financial experts team.
    Thanks a lot.
    Best Regards,
    Alexandre.

  • Use of synchronized queue for java socket communications

    Hi all,
    We have a need for a server socket application (stand alone java application) to process just one command per time coming from a java socket client (JSP Web application). There are a lot of users accessing the java socket client, but the server socket can only handle one command per time, so there is a need of a queue type, so users will have to wait for their time.
    We've been told that we can use "synchronized Queue", but we don't know what it is and how to use. A URL, book etc. with sample code would assist us, since we are new to both java socket communication and queue of commands.
    Can anyone assist us
    cheers
    Trajano
    P.S.
    The server socket java application has two threads:
    1st thread handles the java socket communication;
    2nd thread is a RS-232 serial driver that communicates to several micro-controllers connected on a multi-drop.
    JSP web app client socket users can issue various commands at the same time to the java server socket app, however the server can only service one command per time (just one RS-232 COM1 serial port available). The commands have to somehow be added to a queue for processing.

    I do not have the experience to offer advice. But I just happened to be reading today about Collections.synchronizedList.
    import java.util.List;
    import java.util.LinkedList;
    import java.util.Collections;
    public class Queue {
       private List queue;
       public Queue() {
          queue = Collections.synchronizedList(new LinkedList());
       public Object removeItem() throws InterruptedException {
          synchronized (queue) {
             while (queue.isEmpty())
                queue.wait();
             return queue.remove(0);
       public void addItem(Object item) {
          synchronized (queue) {
             queue.add(item);
             queue.notifyAll();
    class Test {
       public static void main(String[] args) {
          final Queue queue = new Queue();
          //start a thread to process items from the queue
          Runnable work = new Runnable() {
             public void run() {
                try {
                   Object item = queue.removeItem();
                   //do something with item
                } catch (InterruptedException e) {
                   //handle this
          Thread worker = new Thread(work);
          worker.start();
    }Reference: Java Thread Programming, Paule Hyde
    Also, here is Doug Lea's library,
    http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html

  • Hi Apple, I was developed an app that impemented In-App purchage, But how I manage the customer reinstall after the trial priod complets. thanking you.

    Hi Apple,
    I was developed an app that impemented In-App purchage,
    But how I manage the customer to reinstall after the trial priod complets.
    Thanking you.

    These forums are user supported.
    So are the iOS Dev Center forums [ https://devforums.apple.com/community/ios ], although staffers do drop in as volunteers from time to time.

Maybe you are looking for