Server for 2 clients at a time

Hi there. How can I create a server that accepts only 2 clients at a time? If one of these 2 should go down server should permit another connections that means total connections from clients shoud not be more than 2.
Here is my server.Have any ideas?
import java.net.*;
import java.io.*;
import java.util.*;
public class CollabServer {
public int contator;
public CollabServer() throws IOException{
ServerSocket server = new ServerSocket(5000);
System.out.println ("Accepting connections...");
while(true) {
Socket client = server.accept();
System.out.println ("Accepted from " + client.getInetAddress());
new CollabHandler(client).start();
public static void main(String args[]) throws IOException {
new CollabServer();

I did what you said but I don't know how to do the third step of yours. HOW can I do the server to not accept more tha 2 connections whitout server.close?
Did you mean something like that?
import java.net.*;
import java.io.*;
import java.util.*;
public class CollabServer {
public int contator;
public CollabServer() throws IOException{
ServerSocket server = new ServerSocket(5000);
System.out.println ("Accepting connections...");
while(true) {
if(contator < 4 ){
Socket client = server.accept();
System.out.println ("Accepted from " + client.getInetAddress());
new CollabHandler(client).start();
contator = CollabHandler.activeCount();
if ( contator == 3) {
server.close();//should I do this?
public static void main(String args[]) throws IOException {
new CollabServer();

Similar Messages

  • Certificates issued by communications server for client authentication

    Hi,
    we ran into problem with those certificates, that are being issued by the lync server itself.  In our enteprise we have CX600 and CX3000 phones, and i know that certificate authentication is required for the phones to work (both for registrar and webservice).
    However, now that users have lync installed, they have their communications server certificate assigned as well. The problem is when a user needs to sign a document with the certificate from our private CA, for most of the users, word or excel suggests to
    use a certificate issued by communications server, not our ent CA. Maybe there is a way for LYNC to trust private enteprise CA and not give out its own certificates and STILL use certificate authentication?
    Thanks!

    Facing almost the same issue, Lync (server) issues ClientAuth certs from "Communication Server", (btw
    is not trusted of course), and in turns forces users to make a selection of which VPN cert to use when dialing in, instead of only one ClientAuth cert installed, they now have 2 ClientAuth certs installed, which our internal CA's should care about and NOT
    the Lync (server).
    Don’t get how an MS product of this caliber can be built without proper PKI integration, how can it NOT utilize internally issued certs for client authentication???
    Not the first though, SCCM and OSD is another example....
    However, are you saying that Lync communication can’t be used without certificate authentication,
    without the user being spammed with credential prompts?
    Trying to get clarification on this…

  • Incremental Garbage Collector is halting my server for MINUTES at a time.

    I have a Java server which services hundreds (currently 300-700 on average, target of 2000+) of simultaneous client connections, with a staggering number of long lived (but not permanent) objects.
    The docs for incremental garbage collection state: "The incremental garbage collector, which is off by default, will eliminate occasional garbage-collection pauses during program execution." This is NOT true in my case. During peak load, the Server halts occasionally (once an hour or more) and entire MINUTES tick by. Average wait time is 2.5 - 3.5 minutes, the highest I have seen is 4 minutes, 10 seconds. This is entirely unnacceptable.
    The server is on Red Hat Linux 6.2, kernel 2.2.14-5.0, with a gig of RAM. My current command line options are
    java -server -Xincgc -Xms256M -Xmx900M
    And I have just added -verbose:gc to help analyze the gc performance. I have read the gc tuning guide at http://java.sun.com/docs/hotspot/gc/index.html but still feel rather clueless about what is the optimum setup for my particular application.
    I will of course start experimenting, but I was hoping to find a "wise old elf" who might give some useful pointers to accelerate the process, seeing as how the Server is already running in a production capacity, time is critical.

    Are you using a Java application server like Tomcat, Dynamo, WebLogic etc. ?
    In that case consider running several server instances on the machine, with the applicationserver's software load balancer. Find the amount of RAM allocated to the heap per serverinstance where garbage collection runs takes a couple of seconds, and don't allocate more than this to each server. Start as many servers as you have available RAM for.
    This is the approach recommended by application server vendors such as BEA http://edocs.bea.com/wls/docs61/perform/JVMTuning.html and ATG.
    A side benefit of this approach is that in case you get more concurrent users than your computer can handle, you already have the setup for spreading the load over several computers.

  • Garbage Collector pausing my Server for MINUTES at a time

    Garbage Collection pauses are really crippling my server. Here is a grep of Full GCs from the log file. (The lines following each Full GC have a timestamp, yymmdd:hhmmss.sss)
    [Full GC 876186K->169083K(222400K), 28.4152794 secs]
    011120:004809.413:
    [Full GC 883850K->214246K(259008K), 68.2294388 secs]
    011120:033449.558: *** RECLAIMED MemoryManager( Idle ) - Memory Usage: 209.2 MB/900.0 MB (Free: 43.7 MB, Allocated: 252.9 MB)
    [Full GC 881484K->300898K(347200K), 73.3787317 secs]
    011120:045927.680: *** RECLAIMED MemoryManager( Idle ) - Memory Usage: 293.8 MB/900.0 MB (Free: 45.2 MB, Allocated: 339.1 MB)
    [Full GC 886225K->269194K(317824K), 79.8212023 secs]
    011120:055800.166: *** RECLAIMED MemoryManager( Idle ) - Memory Usage: 262.9 MB/900.0 MB (Free: 47.5 MB, Allocated: 310.4 MB)
    [Full GC 890405K->261774K(338112K), 104.6192760 secs]
    011120:064350.312: *** RECLAIMED MemoryManager( Idle ) - Memory Usage: 255.6 MB/900.0 MB (Free: 74.5 MB, Allocated: 330.2 MB)
    [Full GC 893451K->306762K(361024K), 134.4052782 secs]
    011120:073523.335: *** RECLAIMED MemoryManager( Idle ) - Memory Usage: 299.6 MB/900.0 MB (Free: 53.0 MB, Allocated: 352.6 MB)
    [Full GC 896034K->286275K(350016K), 103.4689894 secs]
    011120:081636.710: *** RECLAIMED MemoryManager( Idle ) - Memory Usage: 279.6 MB/900.0 MB (Free: 62.2 MB, Allocated: 341.8 MB)
    [Full GC 882755K->260923K(310272K), 129.6787672 secs]
    011120:093812.612: *** RECLAIMED MemoryManager( Idle ) - Memory Usage: 254.8 MB/900.0 MB (Free: 48.2 MB, Allocated: 303.0 MB)
    You can see that between 12:48am and 9:38am, the Server is pausing for a combined total of TWELVE MINUTES! Often for 2 whole minutes at a time, during which the Server is completely unresponsive.
    I have read Sun's GC tuning guide at http://java.sun.com/docs/hotspot/gc/index.html but it is not much help:
    It says "Pauses can be minimized by using a small young generation and incremental collection, at the expense of throughput."
    Well, I AM using incremental collection, and the young generation is the default size, which is quite small I believe. (32 MB max?)
    It also says "Unless you have problems with pauses, try granting as much memory as possible to the JVM. The default size (64MB) is often too small."
    Well I DO have problems with pauses, but I HAVE to allocate a ton of memory. The Server must support hundreds of simultaneous users, each with hundreds of K's of personal, dynamic, temporary data.
    It also says "Unless you find problems with excessive major collection or pause times, grant plenty of memory to the young generation. The default MaxNewSize (32MB) is generally too small."
    I AM having problems with excessive major collections and pause times, so according to this I should NOT grant more memory to young generation (eden).
    What am I left with? Nothing! I am totally out to lunch here. The box this is running on is a dual P3-600 with a gig of RAM and Red Hat 6.2, with Sun JRE 1.3.1_02. My startup command line options are:
    java -server -Xincgc -verbose:gc -Xms256M -Xmx900M
    What should I do? The Tuning guide essentially says to screw around with generation sizes, but none of its specific tips seem to apply to me! This is a production server and I am worried about making things worse by playing around, so I was hoping someone out there might have some experience with this and concrete advice before I just start messing around with the memory map. Should I increase the young generation size? Decrease it? Something else altogether? HELP!

    With default settings, I am getting horrible performance, under peak load, 25%-50% of server time is being spent with GC, approx. 11,000 minor GCs per hour! And a Full GC every hour or two which takes up several minutes. On average, I am losing 13.09 minutes per hour due to minor GC, and 54.5 seconds to major GC.
    I tried your settings, Chuck, and they seemed to be working beautifully at first... minor GCs were now occuring once every few minutes for a couple seconds, instead of 3 times per second for a tenth of a second. Minor GC were now taking 1.06 minutes per hour instead of 13.09, more than a 1300% improvement!
    HOWEVER...
    After 7 hours, the Server started getting REALLY slow for no apparent reason. It seemed almost as if reading from sockets was suddenly becoming extremely time intensive. Then I got a HUGE minor GC that took 25.6 seconds. [GC 507410K->478034K(551296K), 25.6328459 secs], then a couple minutes later, the Server CRASHED with this output:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : 11 occurred at PC=0x40573aa7
    Function name=malloc
    Library=/lib/libc.so.6
    Current Java thread:
    Dynamic libraries:
    011121:231738.194: Search ( pizzala, lzh ) returned 50 results (28 ms)
    08048000-0804c000 r-xp 00000000 08:06 376904 /usr/local/java/jre1.3.1_01/bin/i386/native_threads/java
    0804c000-0804d000 rw-p 00003000 08:06 376904 /usr/local/java/jre1.3.1_01/bin/i386/native_threads/java
    40000000-40013000 r-xp 00000000 08:06 311298 /lib/ld-2.1.3.so
    40013000-40014000 rw-p 00012000 08:06 311298 /lib/ld-2.1.3.so
    40015000-40016000 r--p 00000000 08:06 2424834 /usr/share/locale/en_US/LC_MESSAGES/SYS_LC_MESSAGES
    40016000-40017000 r--p 00000000 08:06 2408452 /usr/share/locale/en_US/LC_MONETARY
    40017000-40018000 r--p 00000000 08:06 2408454 /usr/share/locale/en_US/LC_TIME
    40018000-40023000 r-xp 00000000 08:06 311344 /lib/libpthread-0.8.so
    40023000-4002a000 rw-p 0000a000 08:06 311344 /lib/libpthread-0.8.so
    4002b000-40034000 r-xp 00000000 08:06 1081477 /usr/local/java/jre1.3.1_01/lib/i386/native_threads/libhpi.so
    40034000-40035000 rw-p 00008000 08:06 1081477 /usr/local/java/jre1.3.1_01/lib/i386/native_threads/libhpi.so
    40035000-403b0000 r-xp 00000000 08:06 2769091 /usr/local/java/jre1.3.1_01/lib/i386/server/libjvm.so
    403b0000-403b1000 ---p 0037b000 08:06 2769091 /usr/local/java/jre1.3.1_01/lib/i386/server/libjvm.so
    403b1000-404fd000 rw-p 0037b000 08:06 2769091 /usr/local/java/jre1.3.1_01/lib/i386/server/libjvm.so
    40515000-40517000 r-xp 00000000 08:06 311314 /lib/libdl-2.1.3.so
    40517000-40519000 rw-p 00001000 08:06 311314 /lib/libdl-2.1.3.so
    4051a000-40607000 r-xp 00000000 08:06 311305 /lib/libc-2.1.3.so
    40607000-4060b000 rw-p 000ec000 08:06 311305 /lib/libc-2.1.3.so
    4060f000-40621000 r-xp 00000000 08:06 311318 /lib/libnsl-2.1.3.so
    40621000-40623000 rw-p 00011000 08:06 311318 /lib/libnsl-2.1.3.so
    40625000-40641000 r-xp 00000000 08:06 311316 /lib/libm-2.1.3.so
    40641000-40642000 rw-p 0001b000 08:06 311316 /lib/libm-2.1.3.so
    40642000-40676000 r-xp 00000000 08:06 704575 /usr/lib/libstdc++-2-libc6.1-1-2.9.0.so
    40676000-40682000 rw-p 00033000 08:06 704575 /usr/lib/libstdc++-2-libc6.1-1-2.9.0.so
    40684000-40695000 r-xp 00000000 08:06 1081479 /usr/local/java/jre1.3.1_01/lib/i386/libverify.so
    40695000-40697000 rw-p 00010000 08:06 1081479 /usr/local/java/jre1.3.1_01/lib/i386/libverify.so
    40697000-406b8000 r-xp 00000000 08:06 1081480 /usr/local/java/jre1.3.1_01/lib/i386/libjava.so
    406b8000-406ba000 rw-p 00020000 08:06 1081480 /usr/local/java/jre1.3.1_01/lib/i386/libjava.so
    406bb000-406cf000 r-xp 00000000 08:06 1081481 /usr/local/java/jre1.3.1_01/lib/i386/libzip.so
    406cf000-406d2000 rw-p 00013000 08:06 1081481 /usr/local/java/jre1.3.1_01/lib/i386/libzip.so
    406d2000-41400000 r--s 00000000 08:06 1081510 /usr/local/java/jre1.3.1_01/lib/rt.jar
    4142d000-416d2000 r--s 00000000 08:06 1081511 /usr/local/java/jre1.3.1_01/lib/i18n.jar
    416d2000-416e8000 r--s 00000000 08:06 1081498 /usr/local/java/jre1.3.1_01/lib/sunrsasign.jar
    77a9f000-77ab5000 r--p 00000000 08:06 2408451 /usr/share/locale/en_US/LC_CTYPE
    77ab5000-77abd000 r--p 00000000 08:06 2408450 /usr/share/locale/en_US/LC_COLLATE
    77abd000-77abe000 r--p 00000000 08:06 2408453 /usr/share/locale/en_US/LC_NUMERIC
    77abe000-77abf000 r-xp 00000000 08:06 1622117 /usr/lib/gconv/ISO8859-1.so
    77abf000-77ac0000 rw-p 00000000 08:06 1622117 /usr/lib/gconv/ISO8859-1.so
    77ac1000-77ac9000 r-xp 00000000 08:06 311336 /lib/libnss_files-2.1.3.so
    77ac9000-77aca000 rw-p 00007000 08:06 311336 /lib/libnss_files-2.1.3.so
    77b37000-77b40000 r-xp 00000000 08:06 1081484 /usr/local/java/jre1.3.1_01/lib/i386/libnet.so
    77b40000-77b41000 rw-p 00008000 08:06 1081484 /usr/local/java/jre1.3.1_01/lib/i386/libnet.so
    77b41000-77b45000 r-xp 00000000 08:06 1081513 /usr/local/java/jre1.3.1_01/lib/i386/libNBIO.so
    77b45000-77b46000 rw-p 00003000 08:06 1081513 /usr/local/java/jre1.3.1_01/lib/i386/libNBIO.so
    77b46000-77b4f000 r-xp 00000000 08:06 311342 /lib/libnss_nisplus-2.1.3.so
    77b4f000-77b51000 rw-p 00008000 08:06 311342 /lib/libnss_nisplus-2.1.3.so
    77b51000-77b59000 r-xp 00000000 08:06 311340 /lib/libnss_nis-2.1.3.so
    77b59000-77b5b000 rw-p 00007000 08:06 311340 /lib/libnss_nis-2.1.3.so
    77b5b000-77b5e000 r-xp 00000000 08:06 311334 /lib/libnss_dns-2.1.3.so
    77b5e000-77b5f000 rw-p 00002000 08:06 311334 /lib/libnss_dns-2.1.3.so
    77b5f000-77b6b000 r-xp 00000000 08:06 311346 /lib/libresolv-2.1.3.so
    77b6b000-77b6c000 rw-p 0000b000 08:06 311346 /lib/libresolv-2.1.3.so
    Local Time = Wed Nov 21 23:17:38 2001
    Elapsed Time = 26581
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Server VM (1.3.1_01 mixed mode)
    # An error report file has been saved as hs_err_pid20055.log.
    # Please refer to the file for further information.
    Yummy. Signal 11's really make my day fun :(. I tried restarting the Server, but it crashed again in the same way 15 minutes later. Then I switched back to default settings and it has run fine all weekend.
    The Sig11 makes me think either our C lib is buggy (our Linux distro is getting a bit old), or we have a physical memory problem. Odd that it only shows up when I tried your new settings though...

  • Shared external HDD minimum 2TB (or server) for 4 Macs with time machine backup?

    I work in a small design studio running 4 macs we need to put all of our work on one central harddrive that everyone can access. But then we would also like one Mac with an external harddrive attached to back up the contents of that shared drive. I have spoken with the people in the business centre But they dont seem to understand what I am trying to do.
    I appreciate any ideas you may have.
    So far what i have been sugested by the business centre is airport exterme with external HDD attached. But when i ask about using time machine to back up that HDD they get confused.

    I have found on my server log the following information:
    07/29 13:33:13  WDShareSpace daemon.warn afpd[3105]: volume "WD_Backup" does not support Extended Attributes, using ea:ad instead
    What is the "Extended Attributes" and how do I use "ea:ad" instead?

  • Can Mac OS Server limit up time for clients

    Can Mac OS Server limit up time for clients like a linksys router can? I want to base the time limit on mac addresses.

    what exactly do you want to limit?
    uptime is the time since the computer has been turned on (total time running), sounds more like you would like to limit internet acccess...??

  • New files and folders on a Linux client mounting a Windows 2012 Server for NFS share do not inherit Owner and Group when SetGID bit set

    Problem statement
    When I mount a Windows NFS service file share using UUUA and set the Owner and Group, and set the SetGID bit on the parent folder in a hierarchy. New Files and folders inside and underneath the parent folder do not inherit the Owner and Group permissions
    of the parent.
    I am given to understand from this Microsoft KnowledgeBase article (http://support.microsoft.com/kb/951716/en-gb) the problem is due to the Windows implmentation of NFS Services not supporting the Solaris SystemV or BSD grpid "Semantics"
    However the article says the same functionality can acheived by using ACE Inheritance in conjunction with changing the Registry setting for "KeepInheritance" to enable Inheritance propagation of the Permissions by the Windows NFS Services.
    1. The Precise location of the "KeepInheritance" DWORD key appears to have "moved" in  Windows Server 2012 from a Services path to a Software path, is this documented somewhere? And after enabling it, (or creating it in the previous
    location) the feature seems non-functional. Is there a method to file a Bug with Microsoft for this Feature?
    2. All of the references on demonstrating how to set an ACE to achieve the same result "currently" either lead to broken links on Microsoft technical websites, or are not explicit they are vague or circumreferential. There are no plain Examples.
    Can an Example be provided?
    3. Is UUUA compatible with the method of setting ACE to acheive this result, or must the Linux client mount be "Mapped" using an Authentication source. And could that be with the new Flat File passwd and group files in c:\windows\system32\drivers\etc
    and is there an Example available.
    Scenario:
    Windows Server 2012 Standard
    File Server (Role)
    +- Server for NFS (Role) << -- installed
    General --
    Folder path: F:\Shares\raid-6-array
    Remote path: fs4:/raid-6-array
    Protocol: NFS
    Authentication --
    No server authentication
    +- No server authentication (AUTH_SYS)
    ++- Enable unmapped user access
    +++- Allow unmapped user access by UID/GID
    Share Permissions --
    Name: linux_nfs_client.host.edu
    Permissions: Read/Write
    Root Access: Allowed
    Encoding: ANSI
    NTFS Permissions --
    Type: Allow
    Principal: BUILTIN\Administrators
    Access: Full Control
    Applies to: This folder only
    Type: Allow
    Principal: NT AUTHORITY\SYSTEM
    Access: Full Control
    Applies to: This folder only
    -- John Willis, Facebook: John-Willis, Skype: john.willis7416

    I'm making some "major" progress on this problem.
    1. Apparently the "semantics" issue to honor SGID or grpid in NFS on the server side or the client side has been debated for some time. It also existed as of 2009 between Solaris nfs server and Linux nfs clients. The Linux community defaulted to declaring
    it a "Server" side issue to avoid "Race" conditions between simultaneous access users and the local file system daemons. The client would have to "check" for the SGID and reformulate its CREATE request to specify the Secondary group it would have to "notice"
    by which time it could have changed on the server. SUN declined to fix it.. even though there were reports it did not behave the same between nfs3 vs nfs4 daemons.. which might be because nfs4 servers have local ACL or ACE entries to process.. and a new local/nfs
    "inheritance" scheme to worry about honoring.. that could place it in conflict with remote access.. and push the responsibility "outwards" to the nfs client.. introducing a race condition, necessitating "locking" semantics.
    This article covers that discovery and no resolution - http://thr3ads.net/zfs-discuss/2009/10/569334-CR6894234-improved-sgid-directory-compatibility-with-non-Solaris-NFS-clients
    2. A much Older Microsoft Knowledge Based article had explicit examples of using Windows ACEs and Inheritance to "mitigate" the issue.. basically the nfs client "cannot" update an ACE to make it "Inheritable" [-but-] a Windows side Admin or Windows User
    [-can-] update or promote an existing ACE to "Inheritable"
    Here are the pertinent statements -
    "In Windows Services for UNIX 2.3, you can use the KeepInheritance registry value to set inheritable ACEs and to make sure that these ACEs apply to newly created files and folders on NFS shares."
    "Note About the Permissions That Are Set by NFS Clients
    The KeepInheritance option only applies ACEs that have inheritance enabled. Any permissions that are set by an NFS client will
    only apply to that file or folder, so the resulting ACEs created by an NFS client will
    not have inheritance set."
    "So
    If you want a folder's permissions to be inherited to new subfolders and files, you must set its permissions from the Windows NFS server because the permissions that are set by NFS clients only apply to the folder itself."
    http://support.microsoft.com/default.aspx?scid=kb;en-us;321049
    3. I have set up a Windows 2008r2 NFS server and mounted it with a Redhat Enteprise Linux 5 release 10 x86_64 server [Oct 31, 2013] and so far this does appear to be the case.
    4. In order to mount and then switch user to a non-root user to create subdirectories and files, I had to mount the NFS share (after enabling Anonymous AUTH_SYS mapping) this is not a good thing, but it was because I have been using UUUA - Unmapped Unix
    User Access Mapping, which makes no attempt to "map" a Unix UID/GID set by the NFS client to a Windows User account.
    To verify the Inheritance of additional ACEs on new subdirectories and files created by a non-root Unix user, on the Windows NFS server I used the right click properties, security tab context menu, then Advanced to list all the ACEs and looked at the far
    Column reflecting if it applied to [This folder only, or This folder and Subdirectories, or This folder and subdirectories and files]
    5. All new Subdirectories and files createdby the non-root user had a [Non-Inheritance] ACE created for them.
    6. I turned a [Non-Inheritance] ACE into an [Inheritance] ACE by selecting it then clicking [Edit] and using the Drop down to select [This folder, subdirs and files] then I went back to the NFS client and created more subdirs and files. Then back to the
    Windows NFS server and checked the new subdirs and folders and they did Inherit the Windows NFS server ACE! - However the UID/GID of the subdirs and folders remained unchanged, they did not reflect the new "Effective" ownership or group membership.
    7. I "believe" because I was using UUUA and working "behind" the UID/GID presentation layer for the NFS client, it did not update that presentation layer. It might do that "if" I were using a Mapping mechanism and mapped UID/GID to Windows User SIDs and
    Group SIDs. Windows 2008r2 no longer has a "simple" Mapping server, it does not accept flat text files and requires a Schema extension to Active Directory just to MAP a windows account to a UID/GID.. a lot of overhead. Windows Server 2012 accepts flat text
    files like /etc/passwd and /etc/group to perform this function and is next on my list of things to see if that will update the UID/GID based on the Windows ACE entries. Since the Local ACE take precedence "over" Inherited ACEs there could be a problem. The
    Inheritance appears to be intended [only] to retain Administrative rights over user created subdirs and files by adding an additional ACE at the time of creation.
    8. I did verify from the NFS client side in Linux that "Even though" the UID/GID seem to reflect the local non-root user should not have the ability to traverse or create new files, the "phantom" NFS Server ACEs are in place and do permit the function..
    reconciling the "view" with "reality" appears problematic, unless the User Mapping will update "effective" rights and ownership in the "view"
    -- John Willis, Facebook: John-Willis, Skype: john.willis7416

  • Setting up a Mac OS 10.6 Server for the first time

    I'm new to servers, and I would like to set up a Mac Mini Server for my network. There would be 3 Windows clients running Vista Home Premium and 2 Mac OS 10.5 clients. I want to be able to log-in on any computer to an account from the server. Then I would like to have the server storing all of the files from all of the accounts. Also, I would like to be able to access these files from over the internet (I have a static IP address on my router). Also, I would like to host a website (I have a domain name through GoDaddy). How do I do all of those things? Also, do I need to upgrade to Windows Professional (Either Windows 7 or Vista)?
    I'm really new to this, so please explain this in great detail. Thank you.

    For file sharing, on the Mini, you just need to go to System Preferences -> Sharing and enable file sharing. You'll also want to create whatever accounts on the Mini that you want people to be able to log in with, that'll be in System Preferences -> Accounts.
    I don't have a lot of experience with Windows and Snow Leopard (much less Mac OS X Server), but at my wife's small business, they have a Mini running Tiger, and none of the Vista machines were able to connect to it. After some digging, I discovered Microsoft had disabled something critical to connecting to Macs in this way, and with Home Premium, you can't access that setting without some arcane hackery. Here's how you do it, if it turns out to still be needed:
    To set a Vista computer to access a Mac server:
    Go to the Start menu and go to All Programs -> Accessories -> Run
    Type "Regedit.exe" and press return
    Go to HKEYLOCALMACHINE\SYSTEM\CurrentControlSet\Control\Lsa
    Select Lsa, then choose Edit -> New -> Key
    Type "DWORD" (without quotes) as the name in the list
    Double-click the text "(Default)" in the right-hand pane
    Enter "1" (without quotes) as the value and press OK
    Quit Regedit and restart the machine
    Log in to the remote Mac using "ip_address\username" as the user name
    As to hosting your own web server... I wouldn't advise that, unless it's purely for internal use and not something aimed at potential customers. You don't want the hassle of being on-call 24-7 to restart the server if something goes wrong, and what will you do if the hard drive dies and has to be replaced? Let someone else deal with those issues. (Of course, GoDaddy isn't known for their reliability... if ensuring the server is up and running 99.9% of the time, you will probably want to go with a more respected company, like [pair Networks|http://promote.pair.com/direct.pl?reedcorner.net+134126].*)
    \* Note that clicking this link may give me compensation... if you wish to avoid that, just Google them.

  • How to get the user input while server is waiting for client's message

    I have a server/client program (using sockets)
    I used a thread to let a server always waiting for client's request, but how should I found that
    there is no message pass to server from client.
    public void run(){
    while (true){
    Socket server = serverP.accept();
    ObjectInputStream inFromClient = new ObjectInputStream(server.getInputStream());
    inMessage = (Message)inFromClient.readObject();
    System.out.println("Deadlock may occurred, please enter your command: ");
    BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in));
    String command = inFromUser.readLine();
    The server is waiting for the inMessage that is passed from multiple clients. But if the server
    received no message after some time, it will assume something is wrong (eg, there is a
    deadlock), then it will ask the user to input the command to execute the method.
    If I put
    "System.out.println("Do you want to take Snapshot: ");
    BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in));
    String command = inFromUser.readLine();"
    inside the while loop, it will keep asking user to enter the input when every time the client
    connect to the server. But I want to ask the user to enter the command only when the server
    can't get the response from clients.
    How should I do?
    Please help.

    Your statement:
    Socket server = serverP.accept();
    it will block until Server receive connect request from client.
    So, what u can do is, create a seperate Thread which check if server is idle (no client connect to it) for a certain time.
    public class xxxxx extends Thread {
    public void run(){
       (new WatcherThread()).start()
       while (true){
       Socket server = serverP.accept();
       WatcherThread.acceptFlag();  
       ObjectInputStream inFromClient = new ObjectInputStream(server.getInputStream());
       inMessage = (Message)inFromClient.readObject();
       Do something with client request ...
       I suggest you to create a WorkerThread for
       each client request.
       For example:
       new (WorkerThread(inMessage)).start();
       This way, your server thread will immediately serve
       the next client request ASAP.
    public class WatcherThread extends Thread {
       private static accept = false;
       public static void acceptFlag() {
            flag = true;
       public void run() {
           while(true) {
               try { sleep(10000); } catch (Exception ex) { }
               if (!accept) { // never accepted after 10000 msecs
                  ... do your System.in here ...
               flag=false;          
    }The idea is, your server notify WatcherThread if a client connect. WathcerThread runs at seperate thread. It waits for 10000 msecs and check if Server ever gets connect request from server. If it doesn't then you can do your System.in, otherwise, it will wait for 10000 again..
    FYI, next time, please use [ code ] and [ / code ] to format your code. It discourage me to read plain whole-left-aligned code like yours.
    See: http://forum.java.sun.com/features.jsp#Formatting
    rgds,
    Alex

  • Cisco Catalyst 6500 version 12.2(33)SXI13 configured as DHCP server for a VLAN responds to Windows 7 client with status code NOA

    Can anyone help figure out why the Catalyst 6509 is not able to assign an IPv6 address? Thank you.
    Cisco Catalyst 6500 version 12.2(33)SXI13 configured as DHCP server for a VLAN responds to Windows 7 client with status code NOADDRS-AVAIL(2). My configuration on the 6500 for the DHCPv6 server is:
    ipv6 dhcp database disk0://DHCPV6-DB
    ipv6 dhcp pool VLAN206IPV6
     prefix-delegation pool VLAN206IPV6-POOL
     dns-server 2620:B700:0:1001::53
     domain-name global.bio.com
    ipv6 local pool VLAN206IPV6-POOL 2620:B700:0:12C7::/65 65
    interface Vlan206
     description *** IPv6 Subnet ***  
     ip address 10.2.104.2 255.255.255.0
     ipv6 address 2620:B700:0:12C7::2/64
     ipv6 nd prefix 2620:B700:0:12C7::/64 14400 14400 no-autoconfig
     ipv6 nd managed-config-flag
     ipv6 dhcp server VLAN206IPV6
     standby version 2
     standby 0 ip 10.2.104.1
     standby 0 preempt
     standby 6 ipv6 2620:B700:0:12C7::1/64
     standby 6 preempt
    I'm getting a result from my debug as follows:
    Apr 10 16:28:02.873 PDT: %LINK-3-UPDOWN: Interface GigabitEthernet2/2, changed state to up
    Apr 10 16:28:02.873 PDT: %LINK-SP-3-UPDOWN: Interface GigabitEthernet2/2, changed state to up
    Apr 10 16:28:02.877 PDT: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet2/2, changed state to up
    Apr 10 16:28:03.861 PDT: IPv6 DHCP: Received SOLICIT from FE80::5D5E:7EBD:CDBF:2519 on Vlan206
    Apr 10 16:28:03.861 PDT: IPv6 DHCP: detailed packet contents
    Apr 10 16:28:03.861 PDT:   src FE80::5D5E:7EBD:CDBF:2519 (Vlan206)
    Apr 10 16:28:03.861 PDT:   dst FF02::1:2
    Apr 10 16:28:03.861 PDT:   type SOLICIT(1), xid 8277025
    Apr 10 16:28:03.861 PDT:   option ELAPSED-TIME(8), len 2
    Apr 10 16:28:03.861 PDT:     elapsed-time 101
    Apr 10 16:28:03.861 PDT:   option CLIENTID(1), len 14
    Apr 10 16:28:03.861 PDT:     00010001195FD895F01FAF10689E
    Apr 10 16:28:03.861 PDT:   option IA-NA(3), len 12
    Apr 10 16:28:03.861 PDT:     IAID 0x0FF01FAF, T1 0, T2 0
    Apr 10 16:28:03.861 PDT:   option UNKNOWN(39), len 32
    Apr 10 16:28:03.861 PDT:   option VENDOR-CLASS(16), len 14
    Apr 10 16:28:03.861 PDT:   option ORO(6), len 8
    Apr 10 16:28:03.861 PDT:     DOMAIN-LIST,DNS-SERVERS,VENDOR-OPTS,UNKNOWN
    Apr 10 16:28:03.861 PDT: IPv6 DHCP: Option IA-NA(3) is not supported yet
    Apr 10 16:28:03.861 PDT: IPv6 DHCP: Sending ADVERTISE to FE80::5D5E:7EBD:CDBF:2519 on Vlan206
    Apr 10 16:28:03.861 PDT: IPv6 DHCP: detailed packet contents
    Apr 10 16:28:03.861 PDT:   src FE80::21D:E6FF:FEE4:4400
    Apr 10 16:28:03.861 PDT:   dst FE80::5D5E:7EBD:CDBF:2519 (Vlan206)
    Apr 10 16:28:03.861 PDT:   type ADVERTISE(2), xid 8277025
    Apr 10 16:28:03.861 PDT:   option SERVERID(2), len 10
    Apr 10 16:28:03.865 PDT:     00030001001DE6E44400
    Apr 10 16:28:03.865 PDT:   option CLIENTID(1), len 14
    Apr 10 16:28:03.865 PDT:     00010001195FD895F01FAF10689E
    Apr 10 16:28:03.865 PDT:   option STATUS-CODE(13), len 15
    Apr 10 16:28:03.865 PDT:     status code NOADDRS-AVAIL(2)
    Apr 10 16:28:03.865 PDT:     status message: NOADDRS-AVAIL

    Hello,
    maybe hitting the following bug.
    Pv6 Address Assignment Support for IPv6 DHCP Server
    CSCse81385
    Hope this helps

  • Setting time or time server on clients with ARD

    Does anyone know what files need to be copied to OS X clients to set their time or time server? I know that time server info is stored in /etc/ntp.conf, but this isn't the only file that needs to be sent to set up a client to get its time from a time server. I haven't been able to find the correct .plist file that includes these settings and am not familiar enough with UNIX to know which other files are used for these settings.
    Thank you,
    Peggy

    Using the ARD Send Unix Command option send the following command to the workstations:
    systemsetup -settime <hh:mm:ss>
    where <hh:mm:ss> is the time you want the systems to have (don't include the brackets). Send the command as the root user (enter root in "send command as:")
    To set the time server to use, send:
    systemsetup -setnetworktimeserver <timeserver>
    substituting the domain name of the time server (again, no brackets).
    For more such commands, in Terminal enter:
    /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/netw orksetup -help
    /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/syst emsetup -help
    or from within the Remote Desktop Admin in the Send Unix Command window type:
    networksetup -help
    systemsetup -help
    Regards.

  • Time sync between server and client

    Hi guys,
    I have written a chess server and client. My next step is to implement a clock which will be used in timed games, however, I am not sure of the best solution. I can't think of a reliable method to keep the client's time in sync with the servers because the event latency varies between individual events and clients.
    My first idea was to send a 'tick' event every second but I dont think this the best solution. I have seen many applet based clients which have timers, such as Yahoo chess.
    I know this question is a little vague, I can give more detail if needed.
    Thanks,
    Alex

    To prevent client-side cheating, the server should keep the
    "official" clock. Every so often (perhaps when a move gets made?),
    notify both clients of the official time. Clients count seconds from
    that official time.
    This is a suboptimal solution because it leaves clients vulnerable
    to network lag. I can't think of any other solution that doesn't give
    clients some responsibility for tracking time, though, and that's a
    big security hole.
    If you're willing to open that hole, have each client report back to
    the server the elapsed local time from when they recieved the
    last move to when they made their move. Then update the other
    client's clock accordingly.

  • Setup Java system directory server 6 client for user authentication

    I am trying to set up a native LDAP client for sun directory server 6 for network based user authentication. I checked the sun doc for naming service (LDAP) and the documentation are for setting up LDAP client for directory server 5. Is there any documentation for setting up LDAP client for directory server 6? Or the documents for setting LDAP client for directory server 5 is still good for 6? Particularly, I want to use SSL communication between server and client.

    Hi,
    could be one of the other 'bad jokes' of DS/ldapclient because the documentation describes a lot of stuff about profiles etc. but: you need some special schema files to use the whole stuff and they are not installed with Solaris or DS (and they include the NisDomainObject). I had to search for them in the internet. They are also printed in the documentation. Save them in your server's config/schema directory as i.e. 61DUAConfigProfile.ldif and 62nisDomain.ldif and try idsconf again (maybe you have to cleanup something).
    I test and prepare DS6 here, and we will use it in production too. I hadn't any problem with it and it has some important advantages over DS5.2. But we won't have a huge directory so I can't tell you anything more about it.
    Regards
    Jochem Ippers
    Here are the ldifs:
    61DUAConfigProfile.ldif:
    dn: cn=schema
    attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.0 NAME 'defaultServerList' DESC 'Default LDAP server host address used by a DUA' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'user defined' )
    attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.1 NAME 'defaultSearchBase' DESC 'Default LDAP base DN used by a DUA' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE X-ORIGIN 'user defined' )
    attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.2 NAME 'preferredServerList' DESC 'Preferred LDAP server host addresses to be used by a DUA' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'user defined' )
    attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.3 NAME 'searchTimeLimit' DESC 'Maximum time in seconds a DUA should allow for a search to complete' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'user defined' )
    attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.4 NAME 'bindTimeLimit' DESC 'Maximum time in seconds a DUA should allow for the bind operation to complete' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'user defined' )
    attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.5 NAME 'followReferrals' DESC 'Tells DUA if it should follow referrals returned by a DSA search result' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE X-ORIGIN 'user defined' )
    attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.6 NAME 'authenticationMethod' DESC 'A keystring which identifies the type of authentication method used to contact the DSA' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'user defined' )
    attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.7 NAME 'profileTTL' DESC 'Time to live, in seconds, before a client DUA should re-read this configuration profile' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'user defined' )
    attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.14 NAME 'serviceSearchDescriptor' DESC 'LDAP search descriptor list used by a DUA' EQUALITY caseExactMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'user defined' )
    attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.9 NAME 'attributeMap' DESC 'Attribute mappings used by a DUA' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'user defined' )
    attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.10 NAME 'credentialLevel' DESC 'Identifies type of credentials a DUA should use when binding to the LDAP server' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE X-ORIGIN 'user defined' )
    attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.11 NAME 'objectclassMap' DESC 'Objectclass mappings used by a DUA' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'user defined' )
    attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.12 NAME 'defaultSearchScope' DESC 'Default search scope used by a DUA' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE X-ORIGIN 'user defined' )
    attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.13 NAME 'serviceCredentialLevel' DESC 'Identifies type of credentials a DUA should use when binding to the LDAP server for a specific service' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'user defined' )
    attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.15 NAME 'serviceAuthenticationMethod' DESC 'Authentication method used by a service of the DUA' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'user defined' )
    objectClasses: ( 1.3.6.1.4.1.11.1.3.1.2.4 NAME 'DUAConfigProfile' SUP top STRUCTURAL DESC 'Abstraction of a base configuration for a DUA' MUST ( cn ) MAY ( defaultServerList $ preferredServerList $ defaultSearchBase $ defaultSearchScope $ searchTimeLimit $ bindTimeLimit $ credentialLevel $ authenticationMethod $ followReferrals $ serviceSearchDescriptor $ serviceCredentialLevel $ serviceAuthenticationMethod $ objectclassMap $ attributeMap $ profileTTL ) X-ORIGIN 'user defined' )
    62nisDomain.ldif:
    dn: cn=schema
    attributeTypes: ( 1.3.6.1.1.1.1.30 NAME 'nisDomain' DESC 'NIS domain' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'user defined' )
    objectClasses: ( 1.3.6.1.1.1.2.15 NAME 'nisDomainObject' SUP top STRUCTURAL MUST nisDomain X-ORIGIN 'user defined' )

  • FDS for server push + client to client

    Just want to double check - if I was to create a chat like
    app in Flex - where new messages are "pushed" to clients, this
    would require FDS.

    Using FDS would be the far easiest way to implement a chat
    application.
    Theoretically you could implement a chat application without
    FDS by having each client poll the server for messages for new
    messages for that client using HTTPService or WebService.
    You can also do "poor man's data push" using a long-lasting
    HTTP request - in this pattern each client posts an HTTP request
    that it doesn't expect and immediate response to - when the server
    has a message for the client is sends the response (perhaps a long
    time later). In the client's event handler for the response the
    client posts another request (so that the server has a means of
    "pushing" data to the client). This is how Blackberry-style email
    works in Windows Mobile (in the absence of a proper data push
    protocol).
    Sean
    Neville's Introduction to the Flex Message Service has a good
    example of how to write a chat application in FDS.
    Graeme Harker's Flex.NET
    Blog

  • Time Machine AFP shares for client machines

    I have migrated a Mac Mini from 10.6 Server to 10.7 Server. This is my own internal mail server etc so it is not too critical.
    I have a DROBO connected to the mini and the DROBO has been partitioned into 4 partitions. Three of the partitions are shares which I used for the Time Machine (TM) backups on my MBP, my wife's iMac and the mini server. The fourth partition was for shared files. All this worked well in 10.6 but it seems broken with 10.7. I did this so I could limit how much space was available for each client machine's TM backup.
    First in the Server.app the TM service I though was just for the server but it seems that once you specify this it created a shared folder which serves as a target for client machine backups. There doesn't seem to be a way of designating specific shares for different client machines.
    Second, the shares that I used in 10.6 are still there and permissions are correct but even though I can connect to the share via the finder, TM on a client (MBP running 10.7) looks like it stalls during the preparing backup phase then fails.
    If you cannot specify individual shares for client TM backups this is huge step backwards! With little or no documentation and a ludicrous dumbing down of the Server management interface I can't see 10.7 server as anything but a toy. Not to mention the switch from MySQL and removal of pptp VPNs this product is just half baked. Sorry but the more I use 10.7 server the less I like it.

    Well, it appears to be working. I used the "Connect To Server" option from the "Go" menu of the Finder and connected via IP address. The Mini is set up with a static IP. I'm not sure if it is working consistently, yet. I got one good Time Machine backup so far.
    I do seem to be experiencing some inconsistent network behavior as far as seeing the Mini on the network via my Lion machines. It seems to drop off the Finder sidebar for no apparent reason. Will post another update later.

Maybe you are looking for