Multiple client single server problem(it hangs halfway)

TestThread Class
import java.io.*;
import java.net.*;
import java.awt.*;
import javax.swing.*;
import java.util.*;
import java.util.Timer;// for timer
import java.util.TimerTask;//for timer
public class TestThread {
  public static void main(String[] args) {
    DataInputStream inputFromClient1;
    DataOutputStream outputToClient1;
    DataInputStream inputFromClient2;
    DataOutputStream outputToClient2;
    ServerSocket serverSocket = null;
    System.out.println("MastermindServer started at " + new Date() + "\n");
    try {
      serverSocket = new ServerSocket(8000);
    } catch(IOException ex) {
      System.err.println(ex);
    try {
      Socket socket = serverSocket.accept();
      System.out.println("sc1 connected \n\n\n\n");
      inputFromClient1 = new DataInputStream(socket.getInputStream());
      outputToClient1 = new DataOutputStream(socket.getOutputStream());
      String startMessage = "Two players now,You can start multiGame!";
      outputToClient1.writeUTF(startMessage);
      outputToClient1.writeUTF("hehehe");
      outputToClient1.writeUTF("hahaha");
      Socket socket1 = serverSocket.accept();
      System.out.println("sc 2 connected \n\n\n\n");
      inputFromClient2 = new DataInputStream(socket1.getInputStream());
      outputToClient2 = new DataOutputStream(socket1.getOutputStream());
      outputToClient2.writeUTF(startMessage);
      outputToClient2.writeUTF("hehehe");
      outputToClient2.writeUTF("hahaha");
//problem starts here when both are not received
      System.out.println("Problem starts here");
      int y = new DataInputStream(socket.getInputStream()).readInt();
      System.out.println("message from client 1 : "+ y);
      int x = new DataInputStream(socket1.getInputStream()).readInt();
      System.out.println("message from client 2 : "+ x);
      outputToClient1.writeUTF("1  hehehe");
      outputToClient1.writeUTF("1  hahaha");
      outputToClient2.writeUTF("1  hehehe");
      outputToClient2.writeUTF("1  hahaha");
    } catch(IOException ex) {
      System.err.println(ex);
}testSocket class
import java.io.*;
import java.net.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.event.*;
import javax.swing.border.Border;//for borders
import javax.swing.border.LineBorder;//for border lines
import java.awt.event.ActionEvent;//for action event
import java.awt.event.ActionListener;//for action listener
import javax.swing.*;
import java.util.*;
import java.util.Timer;// for timer
import java.util.TimerTask;//for timer
public class testSocket {
  public static void main(String[] args) {
    new testSocket();
  public testSocket() {
       DataOutputStream outputToServer;
    DataInputStream inputFromServer;
    try {
      // Create a socket to connect to the server
      Socket socket = new Socket("localhost", 8000);
      inputFromServer = new DataInputStream(socket.getInputStream());
      outputToServer = new DataOutputStream(socket.getOutputStream());
      String message = inputFromServer.readUTF();
      System.out.println(message);//start mess
      message = inputFromServer.readUTF();
      System.out.println(message);//hehehe
      message = inputFromServer.readUTF();
      System.out.println(message);//hahaha
      message = inputFromServer.readUTF();
      new DataOutputStream(socket.getOutputStream()).writeInt(99);     
      System.out.println(message);
      message = inputFromServer.readUTF();
      System.out.println(message);
    } catch (IOException ex) {
      System.err.println(ex);
    System.out.println("connected liao");
}Problem description:-
I simplified this problem from my long code into 2 test files with the problem only.
TestThread.java is the server
testSocket.java is the client
Running TestThread.java first then run testSocket twice without closing any would only show that it executes till line 46 and refuses to run further
It would execute the TestThread till line 38 and not go further.
Any help with this problem? Say I delete line 38 of testSocket and line 49-52 of TestThread, it would work fine but wouldn't work with input from different clients which would result in the program to hang there. I need to have input and output from different clients to the server at different time and interchangeable from one client to the other. In my program, the clients does different jobs so use of threads is out of the question.

I found your mistake.
Your clients are trying to receive a message that server has not sent.
String message = inputFromServer.readUTF(); //read start message
System.out.println(message);//start mess
message = inputFromServer.readUTF(); //read hehehe message
System.out.println(message);//hehehe
message = inputFromServer.readUTF(); //read hahaha message
System.out.println(message);//hahaha
message = inputFromServer.readUTF(); //<<----- what message? hangs waiting a server message
new DataOutputStream(socket.getOutputStream()).writeInt(99);      //this is not executed
...And your server hangs wait your clients int.
Anyway, you should not recreate the DataOuputStream! use the objects you've already create.
Lines 49 to 52 on server should be:
int y = inputFromClient1.readInt();
System.out.println("message from client 1 : "+ y);
int x = inputFromClient2.readInt();
System.out.println("message from client 2 : "+ x);It also applies to your client, see line 40.
Regards,
Henrique Abreu

Similar Messages

  • Multiple client chat server

    Thanks to the help I got from the good people of this forum today I modified the chat server program which I am making and now it is working a bit better. Right now it can accept several (up to 8) clients and store their open sockets in a SocketCollection list which can later be accessed so that messages get sent to all of them. Problem is that when I send a message, it is displayed instantaneously on the client that sent that message (my machine), but is displayed only after the other clients press enter on the other clients' machines (for testing purposes it was the same machine, different port opened for communication with server which is also on the same machine). To clarify that - all clients and server are the same machine (that shouldn't be a problem, right?). Code for printing incoming data for client program is below:
    while ((fromServer = in.readLine()) != null) {
                if (fromServer!=null){
                       System.out.println(fromServer);
                       System.out.println("print on client screen msg received from server");
                fromUser = stdIn.readLine();
                if (fromUser != null) {
              System.out.println("Client: " + fromUser);
              out.println(fromUser);
    }Code to deliver the message to all clients from the server application is below as well:
    while ((inputLine = in.readLine()) != null) {
                     PrintWriter multiOut;
                   for (int x=0; x<8; x++){
                         System.out.println("INSIDE MULTI-TELL FOR LOOP");
                         if (socketCollection[x]!=null){
                               Socket c=socketCollection[x];
                               try{
                                   System.out.println("tried to send to all\nSocket c = " + c);
                                   out=new PrintWriter(c.getOutputStream(), true);
                                       out.println(c.getInetAddress() + inputLine);
                                catch(IOException ioe){}
    }In the server's DOS window I can clearly see that it enters to display the message to multiple clients and it should send it. The sockets are all different and they point to different ports on different clients' machines. Maybe the problem is just in the client program's code. If you could help me out, it will be greatly appreciated. Thank you very much.

    The sockets get created one by one when each client connects. Afterwards when the thread is made, that socket gets copied into the SocketCollection array which can afterwards be accessed in order for the server to distribute the message to all its connected clients.
    The for loop in the second code example where it takes SocketCollection[x] and gets its outputStream and all that is where it prints the message and sends it to each client (sends it but it is not displayed on the client side until the client sends a message to the server again). My question is how to make it so the client does not have to send a message in order to see the server message (message to all clients) that was sent before.

  • Multiple queues- single server

    I've 5 queues and a single server that needs to order all the rows of queues (by unique ID).
    I can have IDs that not already arrive at queues. I need to wait for them.
    What algorithm can I use to solve this problem?
    I think that is the same problem of Oracle recovery using archive log files. We have lot of files
    (with random SCNs) and we need to apply them to database.
    Thanks a lot
    André

    If i correctly understand it can be possible pseudocode as i described below:
    start with lowest ID
    do infinitely
    --for each queue
    --**search ID from queue
    **if found then
    ****process ID
    ****increment ID by one
    Reg.

  • Multiple-client, same server, different configurations

    Hi experts,
    Recently we have got a project of IS-U Electricity where it has been planned that the same server we used for the last project will be used for this upcoming project where the configurations are diffrent from each other but both of them will run together in same development, quality and production servers.
    My question is whether we would be able to configure sap as per the requirements for the upcoming project to a particular client whereas the rest of the clients will use old configurations for the existing project in the same server. Will there be any cross-client configuration conflicts?
    - Arghya

    Arghya:
    The answer to this question is unrelated the industry solution.  Multiple client scenarios are used in many solutions.  Some configuration is client dependent and so would be different in each client; other configuration is client independent and would be used in all clients.  That would be part of the analysis to determine if multiple clients or multiple systems is the correct approach.
    regards,
    bill.

  • File transfer to multiple clients from server socket

    I have multiple clients connected to my server socket and I need to copy more than 200mb documents from server to all clients over socket. Can we design the issue considering scalability and performance factor? What I am thinking of we should use thread for transferring file from server to client. But at the same time if we have large number of clients then we can't initialize a thread for each client. I think in this case we should initialize less than 10 threads in the pool as the file size is very large. If we keep number of threads in the pool low then probably we have to read multiple times the large server file (once for each group) which might again be a performance bottleneck. Please pour in your suggestions.

    File would be same for an instance only. For example say I have a "SEND File" button & �File Path� text box. In File Path suppose user enters the absolute path of the file and then clicks on Send File button. The responsibility of Send File button would be sending the file mentioned in the "File Path" text box to all connected client. But next time user can choose a different file.

  • Multiple Webapps Single Login  Problem

    Hi,
    I have several web apps that were all developed independently. The problem is whenever the end users go from one to the other they have to log in again. The security setting is set to custom as describe in the Oracle Jheadstart 10g foe ADF Developers Guide (release 10.1.3.2). I have also extended JhsModelService and overwritten the authenticate User to user our own tables for authentication. Is there away to get a signal sign on for all of the applications?
    Thanks
    Colum

    hi Colum
    Maybe this is something you could look at:
    "OC4J Java Single Sign-On"
    http://download.oracle.com/docs/cd/B32110_01/web.1013/b28957/javasso.htm
    "The OC4J 10.1.3.1 implementation packages an alternative Java single sign-on solution that does not rely on additional required infrastructure like other Oracle Application Server single sign-on products. This Java SSO, based on the OracleAS JAAS Provider identity management framework ... can be used across Web applications ..."
    success
    Jan Vervecken

  • Multiple clients with same account on a single IMAP server

    Hi,
    I am connecting to a IMAP server using same account but from 2 different machines. From one machine a mark a message as SEEN=FALSE. But on the second machine, the flag will still be TRUE.
    Is there any way to co-ordinate between multiple clients so that all the clients are in sync.
    Regards,
    Nitin.

    I was able to resolve the problem using addMessageCountListener and messagesAdded method, as suggested by you.
    I am now facing another problem. Whenever a new message is received, code inside messagesAdded method gets executed. Here I am trying to spawn another thread and do some stuff. But this new thread is not starting at all. It goes into some JavaMail:EventQueue and does nothing. What is the concept of EventQueue here? How can I get this new thread executed?
    Also will there be synchronization problems in messagesAdded method. Say I received a message and I am processing it in the messagesAdded method. In the mean time another message comes up. How will this behave.

  • How to control one server with multiple clients via TCP/IP

    I am wanting to control a single server with multiple clients.  Only one client would be active at a time, so there would be no conflict.  I want to use TCP/IP.  So far, I have programmed a cluster that passes data back to the server with no problems.  The challenge come in when a second client is added to the mix.  I have't been able to figure out how to turn each client on and send the appropriate data and then turn it off so it doesn't keep sending the same data to the server. 
    Here are the things that I have considered and did some preliminary testing, but don't really know how to impliment:
    1.  Send a numeric on the front of the cluster packet that tells the server that data is on the way.
    2.  Send a boolean on the front of the cluster packet to somehow turn the server TCP/IP on.
    The problem I have found is that LabVIEW TCP/IP doesn't like to be turned on and off.  If it doesn't get the data it expects, it goes into a reset mode and that kills the response time.
    Any help?

    You should consider implementing a set of simple one-byte commands that can be sent back and forth between the Server and the Clients. You can base all of these ideas off the example in the Example Finder under Networking >> TCP and UDP called Multiple Connections - Server.
    You will have two loops in the server VI: one to wait for new connections, and one to send and receive data from the existing connections. For instance, after one of the clients connects, it can request control of the server to send data to it by sending the character "R" for request. Every time the send/receive loop of the Server executes, the first thing it can do is to check all the existing connections to see if any of the clients have sent a control request ("R"). If so, it will create a buffer (array) of control requests. This could be in the form of Connection IDs or indexes in the array for a particular Connection ID. Your choice.
    After the Server receives a request for contol, if it is not already under control by another client, then it can send a response to the first client on the control request list. For instance, the server could send the first client a "S" command for send. Note that after the clients send their control request, they should execute a TCP Read and wait indefinitely for the server to respond with the one-byte "S" command. Then, once the client in control is finished sending data to the server, it could send the character "X" telling the Server to release it from control.
    The example I mentioned above already does a similar thing. Note how when a client wants to disconnect, they send the letter "Q". You can see this in the Multiple Connections - Client VI. The Server then checks each individual connection to see if it's received this one-byte command, and if it has, it closes the connection to the client. This is what you would want to implement, but instead of having just one command, you'll have to distinguish between a few and build up a buffer of control requests.
    Finally, if a client does decide to disconnect in your application, they could send the command "Q" just like the example above. At this point, close the connection and remove that Connection ID from the array of connections. You will also have to handle the case that this client was in the request control waiting line when it disconnected, in which case you need to delete it from that array as well.
    This will definitely work for you, but it will take some work. Best of luck!
    Jarrod S.
    National Instruments

  • Multiple Clients in Client/Server Program

    I'm currently trying to make a small Client/Server application that will mimic a very basic chat room program. The basic idea is that the Server side of the program is started and multiple Client programs can connect and communicate with each other. However, I'm having a few problems at the moment, mostly with figuring out how it can work.
    Firstly, I can communicate one to one with the server and the client as the client socket is stored in a variable. However, to make it possible to allow multiple connections I've used a thread for each new connection but I'm not sure how I can broadcast messages to every connection. Would it be safe enough to store each client socket in a list and then communicate that way? Not sure what will happen when the client disconnects though it seems to be an issue.
    I'm also not sure how every message can be broadcasted to every single connections to the server. The server program can send a message to every client but the clients message at the moment only goes to the server. Anyway here's a bit of my code so far:
    SwingWorker<Socket, Void> worker = new SwingWorker<Socket, Void>() {
            protected Socket doInBackground() throws Exception {
                // Client socket
                try {
                    while (!stopRequested) {
                        clientSocket = serverSocket.accept();
                        // Stop requested is checked twice because the accept() method
                        // waits for a connection
                        if (!stopRequested) {
                            HostFrame.getFeedbackTextArea().append("New Connection Found");
                            Thread clientThread = new HandlerThread(clientSocket);
                            clientThread.start();
                        else {
                            serverSocket.close();
                            clientSocket.close();
                catch (Exception e) {
                    HostFrame.getFeedbackTextArea().append("Failed to Connect with Client");
                    System.out.println(e.getMessage());
                return clientSocket;
        };The SwingWorker is used so that the GUI doesn't freeze when the server tries to find a connection. At the moment it just creates a thread for each new connection but I'm guessing this isn't what I'm going to be needing to handle more than one client. Also at the moment I have no way of directing a message to a specific socket I'm pretty much just using the standard method shown on the Sun website about Sockets. Any help would be much appreciated

    clientSocket = serverSocket.accept();'clientSocket' should be a local variable here.
    else {
    serverSocket.close();
    clientSocket.close();You shouldn't close 'clientSocket here'. All you're accomplishing is closing the most recently accepted client socket. What about the others? Generally speaking you should let the client-handling threads take care of their own sockets completely.
    return clientSocket;This return statement is meaningless. You may as well return null. SwingWorker doesn't care. Don't just return something because you've got it lying around. In this case you shouldn't have it lying around.
    At the moment it just creates a thread for each new connection but I'm guessing this isn't what I'm going to be needing to handle more than one client.That is exactly what you have to do to handle more than one client. Once you fix it as per above.
    Also at the moment I have no way of directing a message to a specific socket I'm pretty much just using the standard method shown on the Sun website about Sockets.You probably need to keep a Map of client sockets accepted, keyed by some client identifier.

  • One Search service application for multiple web applications in a single server

      We are planning to host 17 Web applications in a single Server. Do I need to create search service application for each web application or I need to create one  Search service application , create a Content source for each web
    application and create a Result source for filtering. Which is the best approach. And which approach takes more RAM memory.
       In my application I am using Search web part, "Recently Changed Items", "Popular Items" web parts. when I created only one one  Search Service application for all web applications and using Result sources ,
    I am not getting the results. What could be the problem.

    Hi,
    One SSA is ok, but you should think about access rights. If the access is clear cut between all the web apps you should be ok with one SSA. Multiple result sources limiting on content source also works, but could easily be bypassed.
    Multiple SSA's will eat up RAM/CPU like a mother :)
    As for popular etc.. it could be due to how those sources are set up, but haven't investigated or tested this much.
    Thanks,
    Mikael
    Search Enthusiast - SharePoint MVP/MCT/MCPD - If you find an answer useful, please up-vote it.
    http://techmikael.blogspot.com/
    Author of Working with FAST Search Server 2010 for SharePoint

  • What are the possible approches for hosting a product(custom SP application) for multiple clients on a single SharePoint farm?

    We have a product which is a custom application based on SharePoint Foundation 2010. Right now, for each of our client we create a dedicated server and host the application in the standalone deployment. Now, the requirement is to host multiple clients in a
    farm deployment.
    Challenges are: 1. The product has same name for the wsp that is deployed on different client servers as of now. How to distinguish for different clients on same farm
    Currently the product specific css and jquery is in 14 hive. These files will be of difefrent versions for different client. How to segregate that?
    How many web applications is recommend to be created in a single SPF 2010 farm? What are the challenges?
    There are a couple of DBs created in SQL for the application. What is the best way to separate those for the client?
    Essentially its the same product but with different versions for each client that we want to deploy in a single farm. What is the best practice to tackle this?

    For the most part, these are not SharePoint questions per se, but product-specific questions you'd better ask the vendor about. To get in some more detail:
    1. It totally depends on the scope of the solution. If its global, then you're out of luck and any changes you make affect all instances that use it. Better ask the vendor about it.
    2. Not that many, let's say < 10, assuming you're web applications have separate application pools. Check out  http://technet.microsoft.com/en-us/library/cc262787(v=office.14).aspx#WebApplication for
    more info.
    3. This is very application specific and really should be answered by the vendor. Not related to SharePoint at all.
    4. Again, really depends on the product so better ask the vendor.
    Good luck!
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • Saving string  from multiple clients on a server data structue

    I have a server which receives updates from multiple clients ( in this example, football scores which are updated periodically by the clients.)
    When the server receives the scores it needs to store them and at certain time intervals send the complete list of scores to multiple terminals at various locations.
    I am approaching this task in stages...
    stage 1.
    ..create the clients and server ...test the clients can send the data and the server can receive the data and output to screen..
    this is completed
    stage 2...
    a/ on the server side store the received scores in a data structure (ArrayList<String> is what I'm thinking.)
    b/ periodically output all scores to the screen (maybe every 30 seconds) and empty the ArrayList..am looking at the Timer class for this part..
    stage 3
    create the monitors and output scores to monitors periodically..
    ======================================================
    right now I'm at stage 2a ie trying to store the received scores in a data structure.
    i've created a method saveScore in the StoreScore class which is called by the StoreScore run method...
    The saveScore method creates an ArrayList and adds the score to it...
    Question
    does every thread create a new instance of storedScores and therefore the scores are stored in a multitude of data structures?
    I think the answer is yes and if so then this is not the solution...
    What I'm thinking is , as all scores can be outputted to the server screen via System.out.println, is there not a way of saving all these scores in a single data structure?
    The code below is the server code..
    any advice much appreciated....thank you
    /*=============================================================== */
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.util.concurrent.*;
    class ScoresServer1{
    final static int portNum = 1234; // any number > 1024
    final static int numThreads = 10;
    static ExecutorService pool;
    public static void main(String[] args){
    pool = Executors.newFixedThreadPool(numThreads);
    System.out.println("Server running ...");
    try{  
    ServerSocket servesock = new ServerSocket(portNum);
    // for service requests on port
    while (true){ 
    // wait for a service request on port portNum
    Socket socket = servesock.accept();
    // submit request to pool
    pool.submit(new StoreScore(socket));
    }catch(IOException e){}
    class StoreScore implements Runnable {
    BufferedReader reader;
    Socket sock;
    public StoreScore(Socket clientSOcket) {
    try {
    sock = clientSOcket;
    InputStreamReader isReader = new InputStreamReader(sock.getInputStream());
    reader = new BufferedReader(isReader);
    } catch (Exception ex) { ex.printStackTrace(); }
    public void run() {
    String message;
    try {
    while ((message = reader.readLine()) != null) {
    // System.out.println("latest score: " + message);
    saveScore(message);
    } catch (Exception ex) { ex.printStackTrace(); }
    public void saveScore(String message){
         ArrayList<String> storedScores = new ArrayList<String>();
         storedScores.add(message);
         Iterator<String> t = storedScores.iterator();
              while(t.hasNext()){
                   String s = t.next();
                   System.out.println(s);
    }

    does every thread create a new instance of storedScores and therefore the scores are stored in a multitude of data structures?
    I think the answer is yes and if so then this is not the solution...The answer is yes. However, threads can share data, if they were properly synchronized. You should read the threading tutorial before creating a lot of hard to debug mistakes.
    [http://java.sun.com/docs/books/tutorial/essential/concurrency/]

  • How can I connect multiple clients to a single client ?

    I am currently developing an instant messaging program.I created a server and connected multiple clients to it by using thread logic.However I do not know how to connect multiple client to a single client.
    What shall I do for that?Does anybody know a good tutorial or sample program?Or shall anybody explain me what I shall do for building the Instant Messaging part of my chat program?
    Thank u in advance.

    You may use UDP multicast socket. But since you are using the UDP protocol you might risk losing the data that you send since UDP does not guarantee the safe transfer of data.
    Alternately, you might create a server that allows multiple client to connect to it whose connection Socket objects are then stored in a Vector <Socket> object. The server then sends back data to the connected client about the other clients connected to it. Now when the client wants to send data (like an IM) to another connected client, it has to send a request to the server specifying the client login name and the server in turn streams that particular client's Address and Port to the requesting client. The requesting client then initiates the connection with the other client and then starts a conversation. One more thing, when the client communicates it needs to send information to the server like the name by which it likes to be referenced. In this scenario the server acts like a central repository for clients to query the existence of other clients in the chat room. Each client here runs a thread that listens to incoming connections and when a connection is established, may be opens a IM window or something.
    The third option is to make the server to relay the information from one client to another. Like say, I'm connected to whoopy server and i want to send "Hello" to jackson, then i send the message (ie, Hello) along with the name of the client to which i wish to send it to (ie, jackson). The server then performs a lookup in its Vector <Socket> object and then initiates a connection with jackson and sends the information. However, this method is pretty costly in that you will be wasting a lot of processing behind the server.
    --Subhankar
    P.s. If you stumble upon any other brilliant ideas let me know.

  • Intermittend DNS resolution, timeserver, group policy updates errors in client logs in Win 2012 R2 single server environement

    We recently switched hardware and server software Win SBS 2008 to 2012R2 for a small network roughly 40 clients (Win7 Pro / Win 8.1 Pro) about 16 running concurrently at a given time and one network printer with the printer queue residing on the DC as well.
    I read that a single server environment might not be ideal in particular no fail-over but that is an accepted risk in this particular network here.
    Errors:
    Error 1043: Timeout during name resolution request
    Error 1129: Group policy updates could not be processed due to DC not available
    Error 5719: Could not establish secure connection to DC, DC not available
    Occasionally but disappears after a while
    Error 134: As a result of a DNS resolution timeout could not reach time server
    Symptoms
    On Win 7 Clients
    Network shares added through Group Policy will not show sometimes
    Network shares disconnect (red X) and when accessed return access authorization error after one or two clicks on the share finally grant access again
    When the issue with accessing network shares occurs, it usually also affects Internet access meaning a 'server not responding' error appears in the browser windows when trying to open just any web page
    nslookup during the incident returns cannot resolve error
    ipconfig on client shows correct default router (VDSL Router) and DHCP / DNS Domain Controller
    Also, the Win system log shows the above errors during these incidents, however, the nuimber of incidents vary from 20-30
    On Win 8.1 Clients
    Same as above with the slight variation for network shares apparently due to Server 2012 and Win 8.1 clients managing drive shares differently. However, network share refresh does not work with this clients. In most cases only a gpupdate /force returns
    drive shares but usually only for the active session. After logoff / logon the shares are gone again.
    The issue does appear to be load related since it occurs even if there are only one or two workstations active.
    Server Configuration
    Dell R320 PowerEdge 16GB / 4TB 7200RPM RAID10 / GBitEthernet
    Zyxel 1910-48 Port Switch
    VDSL 50Mbps Down / 20Mbps Up
    Since the DC is the only local DNS and there are no plans to add another one or move DNS to another server, the DNS server is configured with this own address as preferred DNS with three DNS forwarders 1) VDSL Router 2) ISP DNS1 3) ISP DNS2
    Currently only one Network card is active for problem determination reasons.
    There appears to be no consensus concerning IPV6 enabled or disabled, I tried both with no apparent effect
    I have set all network cards server and client to Full Duplex and the same speed, also disabled Offload functions within the adapter settings. Some but no consistent improvements.
    Best Practice Analyzer Results
    DNS server scavening not enabled
    Root hint server XYZ must respond to NS queries for the root zone
    More than one forwarding server should be configured (although 3 are configured)
    NIC1 should be configured to use both a preferred and alternate DNS (there is only one DNS in this network)
    I have found some instructions to apply changes to the clients through a host file but I would rather like to understand whether this DNS response time issue can be resolved on the server for example timing setting perhaps. Currently the DNS forwarders are
    set to 3 second.
    Since a few people have reported issues with DNS but most are working with multi DNS, DC environment I could not really apply any suggestions made there. perhaps there is anyone like me who is running a single server who has overcome or experience the same
    issues. Any help would be appreciated

    Hello Milos thx for your reply.. my comments below
    1. What does it "switched"? You may mean migration or new installation. We do not know...
    >> Switched is probably the incorrect term, replaced would be the appropriate wording. Before, there was a HP Proliant Server with SBS 2008 with distinct domain and now there is a Dell Server with MS 2012 R2 with a distinct domain. Client were
    removed from one (SBS) domain and added to the new Server 2012 domain. Other components did not change for example same Network Switch or VDSL Router, Workstations and Printer
    2. Two DCs are better alternative. Or backup very frequently. There are two groups of administrators. Those who have lost DC and those who will experience this disaster in near future.
    >> Correct, and I am aware of that
    3. NIC settings in W 7 and W 8.1, namely DNS points to DC (...and NOTHING else. No public IP or that of router DNS.))
    >> Correct, this is how it's currently implemented. Clients point to DC for DHCP and DNS and Default Router, no public IP or DNS. The only references to ISP DNS exist on the VDSL Router itself as provided through ISP when establishing VDSL
    Link and the list of Forwarders in the DNS Server configuration. However, I have just recently added the ISPs DNS as forwarders for test purposes and will probably learn tomorrow morning whether this had any effect for better or worse.
    4. Do nslookup to RR on clients. RR branch is saying client basic info on LDAP parameters of AD.
    >> Will post as soon as available
    5. I do not use forwarders and the system works
    >> Ok, does this mean it works for you in a similar or the same infrastructure setup or are you saying it is not required at all and I can remove any forwarder in a scenario like mine? If not required can you explain a bit more why it is not
    required apart from that it does work for you that way?
    6. DHCP should sit on DC (DHCP on router is disabled)
    >> Correct, no other device is configured to provide DHCP service other than DC and DHCP is currently running on DC
    7. NIC settings in DC points to itself (loopback address 127.0.0.1)
    >> Are you sure this is still correct and does apply to Server 2012? I am reading articles stating that it should be the servers own IP but local loop or should this be added as alternate DNS in addition to the servers own IP?
    8. Use IPCONFIG /FLUSHDNS whenever you change DNS settings.
    >> OK, that was not done every time I changed some settings but I can do that next week. Reboot alone would not suffice, correct?
    9. Test your system with dcdiag.
    >> See result below
    10. Share your findings.
    Regards
    Milos
    Directory Server Diagnosis
    Performing initial setup:
       Trying to find home server...
      Home Server = GSERVER2
       * Identified AD Forest.
       Done gathering initial info.
    Doing initial required tests
    Testing server: Default-First-Site-Name\GSERVER2
          Starting test: Connectivity
             ......................... GSERVER2 passed test Connectivity
    Doing primary tests
       Testing server: Default-First-Site-Name\GSERVER2
          Starting test: Advertising
             ......................... GSERVER2 passed test Advertising
          Starting test: FrsEvent
             ......................... GSERVER2 passed test FrsEvent
          Starting test: DFSREvent
             ......................... GSERVER2 passed test DFSREvent
          Starting test: SysVolCheck
             ......................... GSERVER2 passed test SysVolCheck
          Starting test: KccEvent
             ......................... GSERVER2 passed test KccEvent
          Starting test: KnowsOfRoleHolders
             ......................... GSERVER2 passed test
             KnowsOfRoleHolders
          Starting test: MachineAccount
             ......................... GSERVER2 passed test MachineAccount
          Starting test: NCSecDesc
             ......................... GSERVER2 passed test NCSecDesc
          Starting test: NetLogons
             ......................... GSERVER2 passed test NetLogons
          Starting test: ObjectsReplicated
             ......................... GSERVER2 passed test
             ObjectsReplicated
          Starting test: Replications
             ......................... GSERVER2 passed test Replications
          Starting test: RidManager
             ......................... GSERVER2 passed test RidManager
          Starting test: Services
             ......................... GSERVER2 passed test Services
          Starting test: SystemLog
             ......................... GSERVER2 passed test SystemLog
          Starting test: VerifyReferences
             ......................... GSERVER2 passed test VerifyReferences  
       Running partition tests on : ForestDnsZones
          Starting test: CheckSDRefDom
             ......................... ForestDnsZones passed test CheckSDRefDom
          Starting test: CrossRefValidation
             ......................... ForestDnsZones passed test
             CrossRefValidation
       Running partition tests on : DomainDnsZones
          Starting test: CheckSDRefDom
             ......................... DomainDnsZones passed test CheckSDRefDom
          Starting test: CrossRefValidation
             ......................... DomainDnsZones passed test
             CrossRefValidation
       Running partition tests on : Schema
          Starting test: CheckSDRefDom
             ......................... Schema passed test CheckSDRefDom
          Starting test: CrossRefValidation
             ......................... Schema passed test CrossRefValidation
       Running partition tests on : Configuration
          Starting test: CheckSDRefDom
             ......................... Configuration passed test CheckSDRefDom
          Starting test: CrossRefValidation
             ......................... Configuration passed test CrossRefValidation
       Running partition tests on : GS2
          Starting test: CheckSDRefDom
             ......................... GS2 passed test CheckSDRefDom
          Starting test: CrossRefValidation
             ......................... GS2 passed test CrossRefValidation  
       Running enterprise tests on : GS2.intra
          Starting test: LocatorCheck
             ......................... GS2.intra passed test LocatorCheck
          Starting test: Intersite
             ......................... GS2.intra passed test Intersite
    Server:  gserver2.g2.intra
    Address:  192.168.240.6
    *** gserver2.g2.intra can't find g2: Non-existent domain
    > gserver2
    Server:  gserver2.g2.intra
    Address:  192.168.240.6
    g2.intra
            primary name server = gserver2.g2.intra
            responsible mail addr = hostmaster.g2.intra
            serial  = 443
            refresh = 900 (15 mins)
            retry   = 600 (10 mins)
            expire  = 86400 (1 day)
            default TTL = 3600 (1 hour)
    > wikipedia.org
    Server:  gserver2.g2.intra
    Address:  192.168.240.6
    Non-authoritative answer:
    wikipedia.org   MX preference = 10, mail exchanger = polonium.wikimedia.org
    wikipedia.org   MX preference = 50, mail exchanger = lead.wikimedia.org
    polonium.wikimedia.org  internet address = 208.80.154.90
    polonium.wikimedia.org  AAAA IPv6 address = 2620:0:861:3:208:80:154:90
    lead.wikimedia.org      internet address = 208.80.154.89
    lead.wikimedia.org      AAAA IPv6 address = 2620:0:861:3:208:80:154:89
    Final benchmark results, sorted by nameserver performance:
     (average cached name retrieval speed, fastest to slowest)
      192.168.240.  6 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|
      ----------------+-------+-------+-------+-------+-------+
      + Cached Name   | 0,001 | 0,002 | 0,003 | 0,001 | 100,0 |
      + Uncached Name | 0,027 | 0,076 | 0,298 | 0,069 | 100,0 |
      + DotCom Lookup | 0,041 | 0,048 | 0,079 | 0,009 | 100,0 |
      ---<-------->---+-------+-------+-------+-------+-------+
                 gserver2.g2.intra
                    Local Network Nameserver
      195.186.  4.162 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|
      ----------------+-------+-------+-------+-------+-------+
      - Cached Name   | 0,022 | 0,023 | 0,025 | 0,000 | 100,0 |
      - Uncached Name | 0,025 | 0,071 | 0,274 | 0,065 | 100,0 |
      - DotCom Lookup | 0,039 | 0,040 | 0,043 | 0,001 | 100,0 |
      ---<-------->---+-------+-------+-------+-------+-------+
                         cns8.bluewin.ch
               BLUEWIN-AS Swisscom (Schweiz) AG,CH
      195.186.  1.162 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|
      ----------------+-------+-------+-------+-------+-------+
      - Cached Name   | 0,022 | 0,023 | 0,026 | 0,001 | 100,0 |
      - Uncached Name | 0,025 | 0,072 | 0,299 | 0,066 | 100,0 |
      - DotCom Lookup | 0,039 | 0,042 | 0,049 | 0,003 | 100,0 |
      ---<-------->---+-------+-------+-------+-------+-------+
                         cns7.bluewin.ch
               BLUEWIN-AS Swisscom (Schweiz) AG,CH
        8.  8.  8.  8 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|
      ----------------+-------+-------+-------+-------+-------+
      - Cached Name   | 0,033 | 0,040 | 0,079 | 0,011 | 100,0 |
      - Uncached Name | 0,042 | 0,113 | 0,482 | 0,097 | 100,0 |
      - DotCom Lookup | 0,049 | 0,079 | 0,192 | 0,039 | 100,0 |
      ---<-------->---+-------+-------+-------+-------+-------+
                 google-public-dns-a.google.com
                     GOOGLE - Google Inc.,US
      UTC: 2014-11-03, from 14:33:12 to 14:33:29, for 00:17,648
    15: 40
    192.168.240.  6 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|
      ----------------+-------+-------+-------+-------+-------+
      + Cached Name   | 0,001 | 0,002 | 0,004 | 0,000 | 100,0 |
      + Uncached Name | 0,025 | 0,074 | 0,266 | 0,063 | 100,0 |
      + DotCom Lookup | 0,042 | 0,048 | 0,075 | 0,007 | 100,0 |
      ---<-------->---+-------+-------+-------+-------+-------+
                 gserver2.g2.intra
                    Local Network Nameserver
      195.186.  1.162 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|
      ----------------+-------+-------+-------+-------+-------+
      - Cached Name   | 0,022 | 0,024 | 0,029 | 0,001 | 100,0 |
      - Uncached Name | 0,024 | 0,073 | 0,289 | 0,067 | 100,0 |
      - DotCom Lookup | 0,039 | 0,041 | 0,043 | 0,001 | 100,0 |
      ---<-------->---+-------+-------+-------+-------+-------+
                         cns7.bluewin.ch
               BLUEWIN-AS Swisscom (Schweiz) AG,CH
      195.186.  4.162 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|
      ----------------+-------+-------+-------+-------+-------+
      - Cached Name   | 0,022 | 0,024 | 0,029 | 0,001 | 100,0 |
      - Uncached Name | 0,025 | 0,073 | 0,286 | 0,065 | 100,0 |
      - DotCom Lookup | 0,041 | 0,066 | 0,180 | 0,037 | 100,0 |
      ---<-------->---+-------+-------+-------+-------+-------+
                         cns8.bluewin.ch
               BLUEWIN-AS Swisscom (Schweiz) AG,CH
        8.  8.  8.  8 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|
      ----------------+-------+-------+-------+-------+-------+
      - Cached Name   | 0,033 | 0,038 | 0,077 | 0,009 | 100,0 |
      - Uncached Name | 0,042 | 0,105 | 0,398 | 0,091 | 100,0 |
      - DotCom Lookup | 0,049 | 0,066 | 0,141 | 0,025 | 100,0 |
      ---<-------->---+-------+-------+-------+-------+-------+
                 google-public-dns-a.google.com
                     GOOGLE - Google Inc.,US
      UTC: 2014-11-03, from 14:39:59 to 14:40:12, for 00:13,363

  • Multiple database in single server

    Hi experts,
    Please tell me how to configure multiple SID with single listener.
    I configured the DR setup of two databases in single server. Now the problem is, if I start one listener from orapm1(CRM), my data is replicating only for CRM, and if I am going to start my listener from oraPE2 user (DBM), error is coming u201C listener is already startu201D but DBM is not replicating with DR site.
    And when I stop the listener from oraPM1, and start listener from user oraPE2(DBM), my DBM is replicating properly, I want to start both in parallel with one listener.
    Right now I have only one port for both database (1527) and only one LISTENER, should I need to change the port for one server e.g DBM (primary and standby), and then change in listener files. For both side (primary and standby)
    If I am correct please let me know the steps, what precautions we need to take.
    And what change I need to do in listener file.
    2nd) Can I work on same port for both SIDs, if yes please tell me the steps.
    My CRM is working properly so I need to change in DBM part.
    I am attaching listener file from both users in same server (10.11.230.12)
    ADMIN_RESTRICTIONS_LISTENER = on
    LISTENER_PE2 =
    (ADDRESS_LIST =
    (ADDRESS =
    (PROTOCOL = IPC)
    (KEY = PE2.WORLD)
    (ADDRESS=
    (PROTOCOL = IPC)
    (KEY = PE2)
    (ADDRESS =
    (COMMUNITY = SAP.WORLD)
    (PROTOCOL = TCP)
    (HOST = 10.11.230.12)
    (PORT = 1527)
    STARTUP_WAIT_TIME_LISTENER = 0
    CONNECT_TIMEOUT_LISTENER = 10
    TRACE_LEVEL_LISTENER = OFF
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PE2)
    (ORACLE_HOME = /oracle/PE2/102_64)
    pm1 listener file
    ADMIN_RESTRICTIONS_LISTENER = on
    LISTENER =
    (ADDRESS_LIST =
    (ADDRESS =
    (PROTOCOL = IPC)
    (KEY = PM1.WORLD)
    (ADDRESS=
    (PROTOCOL = IPC)
    (KEY = PM1)
    (ADDRESS =
    (COMMUNITY = SAP.WORLD)
    (PROTOCOL = TCP)
    (HOST = 10.11.230.12)
    (PORT = 1527)
    STARTUP_WAIT_TIME_LISTENER = 0
    CONNECT_TIMEOUT_LISTENER = 10
    TRACE_LEVEL_LISTENER = OFF
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PM1)
    (ORACLE_HOME = /oracle/PM1/102_64)
    Thanks in advance.

    Dear Experts,
    please tell me is it ok or i need to change something else?
    this example is for only one listener, and i put both SID details in same LISTENER, or i need to change the listener name for another server. it is very confusing...
    ADMIN_RESTRICTIONS_LISTENER = on
    LISTENER =
      (ADDRESS_LIST =
            (ADDRESS =
              (PROTOCOL = IPC)
              (KEY = PM1.WORLD)
            (ADDRESS=
              (PROTOCOL = IPC)
              (KEY = PM1)
            (ADDRESS =
              (COMMUNITY = SAP.WORLD)
              (PROTOCOL = TCP)
              (HOST = 10.11.230.12)
              (PORT = 1527))
    LISTENER =
      (ADDRESS_LIST =
            (ADDRESS =
              (PROTOCOL = IPC)
              (KEY =PE2.WORLD)
            (ADDRESS=
              (PROTOCOL = IPC)
              (KEY = PE2)
            (ADDRESS =
              (COMMUNITY = SAP.WORLD)
              (PROTOCOL = TCP)
              (HOST = 10.11.230.12)
              (PORT = 1528))
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PM1)
          (ORACLE_HOME = /oracle/PM1/102_64)
    STARTUP_WAIT_TIME_LISTENER = 0
    CONNECT_TIMEOUT_LISTENER = 10
    TRACE_LEVEL_LISTENER = ON
    SID_LIST_LISTENER  =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PE2)
          (ORACLE_HOME = /oracle/PE2/102_64)
    Rishi

Maybe you are looking for

  • How do I use autofill with my Iphone?

    I have Itunes 10.7 on windows and have watched a few videos on how to use autofill, but it is not appearing on my screen when my Iphone 4s is connected. I have also tried changing the settings in my Iphone by opening the device and going into the sum

  • Can anyone give a list of upgradeable performance parts for a mid 2012 macbook pro 13"?

    I have a non Retina display mid 2012 macbook pro that I want to do a home refurbishment and mass upgrade on, the processor and graphics cards are both good as is but RAM gets a bit bottlenecked with only 8gb, Id like to be able to replace the built i

  • Can't change font in imovie

    can't change font in new version of imovie

  • Validation of attribute in Entity Object with List Rule Type

    hi all I have an entity "currncy" and I want to make a validation in entity level on its attribute "Isdefaultcurrency" which is boolean. Entity Object : Currency attributes : 1. Currencyid DBsequence 2. Currencyname String 3. Isdefaultcurrency, Boole

  • Related to service

    HI, i have created a service po with service documnet type.after saving this po once click on  service tab page in item details system throughing a meesage  Customizing incorrectly maintained Message no. SE729. please guide me how to solve this probl