Two server sockets on the same machine, one not working.

Dear forum users.
I'm currently having a problem with running two server sockets on the same computer.
It gives no exceptions or anything, just that if i connect with another machine, the last serversocket that started,
will not accept connections..
Scenario:
Computer 1: Main server.
Computer 1: Game server.
Computer 2: Client
Computer 2 connects first to the main server (lets say port 13371)
Then connects to game server (port 6112).
Computer 2 failes to connect to the Game server for some reason.
But if i open a client at Computer 1, connects to main server, and then game server, it
works fine.
And if I put computer 2 as a Game server,
then everything works fine.
Working scenario:
Computer 1: Main server.
Computer 2: Game server
Computer 2: Client
Computer 1: Client
Now, however many that wants to connect to game server, works.
I have gone through the code 100 times now it feels like. And still dont see why this happends.
Anyone know if it is "working as intended"? Or just me doing something completely wrong that i cant see myself?
Sorry for not posting code, its too much code to post.

Oh, sorry.
TCPServer:
protected ServerSocket serverSocket;
public abstract void processConnection(Socket client);
    public void listen() {
        try {
            report("Listening to clients on port: " + portNumber);
            while (serverSocket != null && acceptConnections) {
                processConnection(serverSocket.accept());
                report("Client accepted on serverSocket.");
        } catch (SocketException e) {
            report("TCPServer/listenForClients : SocketException.", e);
        } catch (Exception e) {
            report("TCPServer/listenForClients : Unknown Exception.", e);
        cleanUp();
        report("Stopped listening on port: " + portNumber);
    }MainServer extends the TCPServer:
    public void processConnection(Socket client) {
        try {
            MainServer_Client tmp = new MainServer_Client(client, this);
            synchronized (clients) {
                clients.add(tmp);
            Thread th = new Thread(tmp);
            th.start();
        } catch (Exception e) {
            report("MainServer/processConnection : Unknown Exception", e);
    }GameServer extends TCPServer
    public void processConnection(Socket client) {
        try {
            client.setTcpNoDelay(true);
            GameServer_ServerClient tmp = new GameServer_ServerClient(client, this);
            synchronized(clients) {
                clients.add(tmp);
            Thread th = new Thread(tmp);
            th.start();
        } catch(Exception e) {
            report("GameServer_Host/processConnection : Unknown Exception",e);
            e.printStackTrace();
    }Edited by: Lgeee on Apr 30, 2010 2:57 AM

Similar Messages

  • When you install Premiere Pro as the admin on an iMac the audio functionalities work well but a second admin account on the same machine does not work. What can I do to fix this?

    When you install Premiere Pro as the admin on an iMac the audio functionalities work well but a second admin account on the same machine does not work. What can I do to fix this?

    It is a bad idea to hack computer passwords when you don't own the computer
    Good luck with the school and the parents.

  • Developer 1.6, 2.1 and 6i on the same machine does not work

    I have installed the three versions on the same machine against Oracle 7.3.4 in another node. Each one is installed in a different OracleHome. Version 2.1 and 6i works fine but when I run Forms 1.6 I get a message telling me that it cannot find the fmcus.msb.
    Is trying to find it in the path of the Developer 2.1 and of course it does not work.
    The Oracle Home selector only shows me those corresponding to 2.1 and 6i.
    It is possible some workaround even if running one version at a time.
    Thanks.

    I have installed the three versions on the same machine against Oracle 7.3.4 in another node. Each one is installed in a different OracleHome. Version 2.1 and 6i works fine but when I run Forms 1.6 I get a message telling me that it cannot find the fmcus.msb.
    Is trying to find it in the path of the Developer 2.1 and of course it does not work.
    The Oracle Home selector only shows me those corresponding to 2.1 and 6i.
    It is possible some workaround even if running one version at a time.
    Thanks.

  • Communication between Two WebLogic instances on the same machine

    Hi,
    We're having a problem with communication between two copies of Weblogic on
    the same machine. They are configured with seperate ports (regular and SSL).
    Independantly, they run fine. I can access EJBs running on either of them.
    The problem is that a bean in one of them has code which attempts to access
    an EJB on the other one. The procude fails when trying to obtain the initial
    context. This same code works if compilied independantly of WebLogic on the
    same machine.
    Are there any known issues regards communication between two running
    instances of Weblogic on the same machine?
    Thanks in advance,
    Randy Yarger
    marchFIRST
    [email protected]

    Thanks for the prompt reply.
    There is one IP address (internal address 10.227.1.34) one the machine. WLS1
    is set up at ports 7001 and 5133. WLS2 is setup at ports 7004 and 7005.
    When WLS1 attempts to obtain a context to WLS2 with the URL
    t3://10.227.1.34:7004/ it pauses for a long period of time. Running truss
    on the both WLS processes shows communication occuring between the two
    followed by long periods of silence. Finally WLS2 spits out the error
    ConnectionException[7001,7001,5133,5133,7001,7001] (paraphrased, I can get
    the entire error if it would help).
    After another long pause, WLS1 quits trying with the error 'Server
    10.227.1.34:7004 not found' (again paraphrased).
    Among the things we've tried:
    * Changing the URL from the IP to 127.0.0.1
    * Enabling/disabling SSL on either or both WLSs.
    * Changing the server name in WLS2's copy of weblogic.properties from
    'myserver' to 'myserver2' (previously they were both 'myserver')
    * Upgrading WLS2 to 5.1.0sp5 (Tried upgrading WLS1, but was getting class
    not found errors and quit because that WLS is being used by other people)
    This is a Solaris server. WLS1 is running 5.1.0 and WLS2 is running 5.1.0sp5
    Any suggestions would be appreciated.
    Best,
    Randy Yarger
    marchFIRST
    [email protected]
    "Michael Girdley" <[email protected]> wrote in message
    news:[email protected]...
    >
    >
    There should not be. What is your network configuration? Are they on
    separate IP addresses?
    Thanks,
    Michael
    Michael Girdley
    BEA Systems Inc
    "Randy Jay Yarger" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    We're having a problem with communication between two copies of Weblogicon
    the same machine. They are configured with seperate ports (regular andSSL).
    Independantly, they run fine. I can access EJBs running on either of
    them.
    The problem is that a bean in one of them has code which attempts toaccess
    an EJB on the other one. The procude fails when trying to obtain theinitial
    context. This same code works if compilied independantly of WebLogic onthe
    same machine.
    Are there any known issues regards communication between two running
    instances of Weblogic on the same machine?
    Thanks in advance,
    Randy Yarger
    marchFIRST
    [email protected]

  • In outlook 2013 Add-In, Adding dynamic menu to splitButton idMso="DialMenu" is working and the same code is not working in outlook 2010 Add-In.

    In outlook 2013 Add-In, Adding dynamic menu to <splitButton idMso="DialMenu"> is working and the same code is not working in outlook
    2010 Add-In. please let me know, if i am missing something. Below is the xml and screen shot
    <contextMenu idMso="ContextMenuFlaggedContactItem">
     <splitButton idMso="DialMenu">
              <menu>
                <dynamicMenu id="CallContactwithFreedomvoice
    " label="CallContactwithFreedomvoice" 
                            getContent="OnGetContenttest"                           insertAfterMso="Call"/> 
            </menu>       </splitButton>    </contextMenu> 

    Hi Narasimha prasad2,
    Based on the description, the context menu for the flagged contact doen't work in Outlook. I am tring to rerpoduce this issue however failed.
    I suggest that you check the state of the add-in first to see wether the add-in was loaded successfully.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • HT4061 My phone can't turned on. I tried to press the home button and main button at the same time, but not working. what should I do?

    Iphone 4s can't turned on, goes total black. Tried to press button and main button at the same time, but not working. what should I do?

    recovery mode
    open itunes on computer
    plug cable into computer not iOS device
    turn phone off
    hold home button and plug cable into phone.  do not release home button until an itunes graphic appears on device.
    look to computer should have message about recovery mode click ok and restore
    Peace, Clyde
    if u need an article see
    http://support.apple.com/kb/HT1808

  • Need help:server client in the same machine

    hello all,
    i want to install oracle client and server on the same machine(cause i only have got one)
    to do that,
    for server installation i did the following:
    # mkdir /u01
    ; /u01
    # cd /u01
    # mkdir -p app/oracle/oradata
    # groupadd dba
    # groupadd oinstall
    # groupadd oracle
    # useradd -g dba -G oinstall,oracle -m oracle -d /u01/app/oracle
    ; risumi des caractiristiques du compte Linux oracle
    ; user : oracle
    ; groupe principal: dba
    ; groupe secondaire: oinstall, oracle
    ; ripertoire par difaut: /u01/app/oracle
    # cd /u01
    # chown -R oracle.dba /u01
    ; virification des droits
    # ls -l /u01/app/oracle
    # ls -l /u01/oradata
    # passwd oracle
    # more /etc/passwd
    # more /etc/group
    ; sortie de votre session root
    # exit
    $ su - oracle
    in .bash_profile(file) i wrote the follwing parameters :
    export DISPLAY=localhost:0.0
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=$ORACLE_BASE/product/8.1.6
    export PATH=$PATH:$ORACLE_HOME/bin
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
    export ORACLE_SID=TEST
    export ORACLE_TERM=vt100
    export NLS_LANG=french_france.WE8DEC
    export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
    the oracle server works fine!
    So, the server installation directory is /u01/app/oracle/product/8.1.6
    what i have to do for client installation in the same machine:
    do i have to create a new groups(dba,oinstall...)?
    do i have a new directory to install oracle client?
    can somebody give me any information?
    Thank's a lot in advance
    null

    You can install your client parts in the same ORACLE_HOME as the server as long as they are of the same version. In fact, a lot of the client has already been installed, since it is part of the server installation.
    If your client is of a different version than your server you will have to install it in a different ORACLE_HOME. You can do this using the same oracle user.

  • Install two oracle8i database on the same machine

    Hi
    I am currently running oracle 8i on hp unix 11i.
    I would like to ask whether I could run another instance(another oracle 8i database ) on the same machine.
    In another word can I run two database on the same machine?
    Is there any implication by doing so?
    Thanks in advance

    Hi
    I am currently running oracle 8i on hp unix 11i.
    I would like to ask whether I could run another instance(another oracle 8i database ) on the same machine.
    In another word can I run two database on the same machine?
    Is there any implication by doing so?
    Thanks in advance Hi,
    You can create multiple databases on the same machine, if you have sufficient resources.

  • How do we Install Forms 6i and Server 8i on the same machine (PC)

    Well i am Trying to Install Forms6i and Oracle 8i Server on the same PC and not succeeding. Can anyone help.

    Follow below steps
    1. Remove all Oracle versions in your machine. In NT, To Delete Oracle, delete HKEYLocalMachine/software/oracle , HKEYLocalMachine/software/services/oracle* registry keys, restart m/c and delete all oracle home directories.
    2. Install Forms 6i Server in the default home directory. If you want to develop forms in same m/c, use custom installation and select forms server, forms developer and webdb listner ( if needed ).
    3. Install Oracle 8i in a different oracle home.
    4. configure oracle forms server and webdb listner. ( See Note:107596.7 in matalink)

  • How to run two WebLogic server instances on the same machine

    The setup is to run server instance A with all EJBs and server instance
    B with all servlets.
    I edited the weblogic.properties under myserver to include all EJBs and
    create server2 under \weblogic parallel to myserver and put a new
    weblogic.properties under server2 that has all the servlets aliases.
    Is this the right way?
    two server ran but I cannot hit the servlet.

    The setup is to run server instance A with all EJBs and server instance
    B with all servlets.
    I edited the weblogic.properties under myserver to include all EJBs and
    create server2 under \weblogic parallel to myserver and put a new
    weblogic.properties under server2 that has all the servlets aliases.
    Is this the right way?
    two server ran but I cannot hit the servlet.

  • Two different projects in the same machine sharing some objects

    Hello dear all
    I got this scenario:
    Same machine;
    2 clients (70 and 80);
    2 Projects
    -     AR Payment Process (prototype) for an existing company
    -     New company configuration
    Coding Block (e.g.: for experiences in AR - prototype )
    In the end - same Production machine
    Projects running simultaneously
    AR payment project (prototype) > New company configuration (in terms of duration)
    Description
    I got 2 projects running at the same time. At least somewhere in the time they will run simultaneously. One will consist in a new AR-Payment process for an existing company, and another one consisting in a creation of a new company.
    So, Iu2019m afraid that those projects cannot run simultaneously once for payment process we will use coding block for sure.
    We will have to change some standard tables (e.g. SPL Table) with different fields (two, to be more precise) u2026.. We do not have time to make one, and after another one, and then put them together and adjust it.
    So, at this point Iu2019m not pretty sure about the direct influences, and in case of influence occur, what can be the solutions to avoid them.
    Is there any way of controlling all the possible changes that will be made in the shared objects?
    We really need to run these projects.
    Thank you all in advance

    The fastest way I can advice is...
    1. edit your credits sequence (the clips you want to keep going as your credits roll)
    2. nest the clips in a new sequence then you have a timeline with a nested sequence in your track 1...
    3. Select your nested sequence in the track 1 and use the motion tab to scale/rotate/crop/move your image wherever you want in the canvas...
    3. create a second track for your rolling credits...
    4. create your rolling credits
    5. if you have different clips for your rolling credits you may want to nest these too...
    6. select your rolling credits and use the motion tab again to scale/crop/rotate/move your credits wherever you want in the canvas
    Hope this help...

  • Can two server farm share the same VIP?

    Hello,
    Can i create two server farm and share the same VIP? for example:
    is posible this configuration?
    rserver host des1
      ip address 10.24.18.34
      inservice
    rserver host des2
      ip address 10.24.18.35
      inservice
    rserver host was1
      ip address 10.24.18.10
      inservice
    rserver host was2
      ip address 10.24.18.11
      inservice
    serverfarm host farm1
      rserver des1
        inservice
      rserver des2
        inservice
    serverfarm host farm2
      rserver was1
        inservice
      rserver was2
        inservice
    class-map type http loadbalance match-all Check-Headers-10
      2 match http url .*
      3 match http header Host header-value "10.24.16.*"
      4 match http header User-Agent header-value ".*MSIE.*"
    class-map type http loadbalance match-all Check-Headers-s-10
      2 match http url .*
      3 match http header Host header-value "10.24.16.*"
      4 match http header User-Agent header-value ".*MSIE.*"
    class-map type http loadbalance match-all other-http-10
      2 match http url .*
    class-map type http loadbalance match-all other-http-s-10
      2 match http url .*
    class-map match-all server-vlan-vip-10-http
      2 match virtual-address 10.24.16.10 tcp eq www
    class-map match-all server-vlan-vip-10-https
      2 match virtual-address 10.24.16.10 tcp eq https
    policy-map type loadbalance first-match http-10-lb
      class Check-Headers-10
        serverfarm farm2
      class other-http-10
        serverfarm farm2
    policy-map type loadbalance first-match http-10-s-lb
      class Check-Headers-s-10
        serverfarm farm1
      class other-http-s-10
        serverfarm farm1
    policy-map type loadbalance first-match lb-logic-10
      class class-default
        serverfarm farm2
    policy-map type loadbalance first-match lb-logic-s-10
      class class-default
        serverfarm farm1
    policy-map multi-match server-vip-service-policy-10
      class server-vlan-vip-10-http
        loadbalance vip inservice
        loadbalance policy http-10-lb
        loadbalance policy http-10-s-lb
        loadbalance vip icmp-reply
      class server-vlan-vip-10-https
        loadbalance vip inservice
        loadbalance policy lb-logic-10
        loadbalance policy lb-logic-s-10
        loadbalance vip icmp-reply
    interface vlan 233
      description Servidores_Balanceados_outside
      peer ip address 10.24.16.7 255.255.255.0
      access-group input anyone
      access-group output anyone
      service-policy input client-vips
      no shutdown
    interface vlan 242
      description Servidores_desarrollo1
      peer ip address 10.24.18.33 255.255.255.240
      access-group input anyone
      access-group output anyone
      service-policy input server-vip-service-policy-10
      no shutdown

    Hello gdufour,
    Actually i've got this configuration:
    1.) One serverfarm (farm1).
    2.) In this serverfarm, i have two real servers des1 and des2.
    3.) The real servers are using VIP 10.24.16.10.
    4.) The loadbalance is roundrobin using http with headers.
    I want to have:
    1.) One new server (a.b.c.d), it can be in the same subnett.
    2.) This server don't know if can belong to serverfarm farm1.
    2.) When i reach to http://index/url/url1, this has to be to VIP 10.24.16.10.
    3.) When i reach the link, the VIP 10.24.16.10 redirect to server a.b.c.d.
    4.) When the server a.b.c.d down, the serverfarm farm1 have to take the load of the url.
    Is posible this configuration?
    Thank you.
    Best Regards

  • Two runtime engienes on the same machines?

    Just wonder if anybody know if it's ok to install two owb runtime servers on the same unix box (of course different homes)
    TIA

    If you wonder if it is possible to install multiple Runtime Repositories on one single server the answer is yes. I'm currently developing on a server where we have 12 different projects. Each project has multiple runtime repos to deploy the tables and process data for different stages of a DWH.
    How to manage the server exactly I really do not know... Sorry...!
    Regards,
    Moscowic

  • How to run two vi's at the same time, one uses an AI task with 8 AI channels the other a single AI and AO channel???

    Hello Everyone,
    Here is my situation.  I have one vi that is reading an AI task of 8 channels AI0 --> AI7 (one sample on demand) and also has control of all of the digital outputs on the board.  My problem is that I want to run another vi that will use the last AI channel AI8 and an AO channel AO0.  These two vi's do not need to know anything about one another but I do need them both to be running at the same time.  Currently when I try running the two vi's together both vi's crash and I get an error message stating that the AI8 pin is reserved.  AI8 is not part of the task and is not refrenced anywere in the larger vi.  I am assuming that this problem is do to the fact that the larger vi is occupying the DAQ board, cycling through the task when the smaller vi is requesting data from AI8 and the DAQ board cannot do two things at once.  The sampling rate on the smaller vi is not really that important.  Is there anyway I can get the smaller vi to read from AI8 and not crash??? Software and Hardware listed below.  Thanks in advance for any suggestions.
    PCI-6221
    Labview 7.1 

    Hi steve ,
    Sorry to say that you cannot configure and acquire from AI channels on a   Device simultaineously from 2 seperate VI's.
    regards
    Dev

  • Iphoto shows two photo libraries with the same name, one in small letters the other in all capital letters. they both open the same library and the only one in my computer. How do delete the capital letrs one as the one in the pictures folder is in

    In my  iPhoto application when I select switch libraries It shows 2 libraries with the same name, but one has the name is in Capital letters.
    They both open the same library which is in the Pictures folder. This is the only library I can see and the name is not in capital letters?
    How do I get rid of the one in capital letters

    What is your iPhoto version?
    when I select switch libraries It shows 2 libraries with the same name, but one has the name is in Capital letters.
    In the Library Chooser Panel look for the pathes to the two duplicate libraries. You will see the location of the libraries in the path bar at the bottom of the window when you select one of the libraries. Does it show both libraries in the same folder?

Maybe you are looking for