Connection to USB hub gets lost

Hello,
I recently switched to Maverick since then I had some problems with the connection to one of my external HDD.
It was connected via a USB hub from Konig.
Then more of my USB devices on the hub gave me problems (file index not found, device connection lost etc).
So I bought a new USB hub (compatible with Mac OS) and now after a few minutes all devices where gone.
When I plug them into my Mac Pro, the HDD work fine.
I never had this problem with my older OS (I only recenty switched from 10.6 to 10.8 - then my internal HDD crashed due to power cut) since then Maverick.
What is wrong?
I saw another thread on the community about similar problems with headsets.
Is Maverick unable to cope with several USB input?
Like to hear your input
Pjotr

Sorry for the late reply.
Yes, database is always available and online, not involved in Log Shipping or other things.
At the time of the connection failure I can find the following in the log of the application:
ProcessID:2452 ,ThreadID:4768 : NI-I - 24/08/2012-15:12:20 - \PCV/src/ni/src/pcvnireceive.cpp - 4741 - Thread 4768 - Receive Thread Started for Remote Node 043SBTMS10DRSP: In Thread index 1:
ProcessID:2452 ,ThreadID:4768 : NI-I - 24/08/2012-15:12:40 - \PCV/src/ni/src/pcvnireceive.cpp - 4968 - Thread 4768 - Receive Thread Ended for Remote Node 043SBTMS10DRSP: In Thread index 1:
ProcessID:2452 ,ThreadID:4768 : NI-I - 24/08/2012-15:12:40 - \PCV/src/ni/src/pcvnireceive.cpp - 115 - Thread 4768 - Merge Memory Usage: KB Allocated = 2186, KB in use = 889
ProcessID:2452 ,ThreadID:1408 : NiJ - E - 25/08/2012-19:35:29 - \PCV/src/ni/src/pcvnijournal.cpp - 2842 - PcvNiJournal::isRetrievePending() - DB Exception.Error: TCP Provider: The specified network name is no longer available.
Communication link failureQuery timeout expired - State:08S01,Native:64,Origin:[Microsoft][SQL Server Native Client 10.0] State:08S01,Native:64,Origin:Microsoft][SQL Server Native Client 10.0]
State:S1T00,Native:0,Origin:[Microsoft][SQL Server Native Client 10.0]

Similar Messages

  • Windows can't find harddisk (connected through usb-hub to airport extreme) although airport utility can

    windows can't find harddisk (connected through usb-hub to airport extreme) although airport utility can

    There are a number of posts related to copying issues between Windows Vista / 7 and AirPort Disks. Two potential solutions being forwarded are: 1) Changing the LAN Manager authentication level, and/or 2) Disabling the Windows Search feature.
     To change the LAN Manager authentication level:
    From the Windows Vista / 7 desktop, click Start
    Search for: security
    Click 'Local Security Policy'
    Goto Local Policies > Security Options
    Under Policy, double-click 'Network security: LAN Manager authentication level'
    Change level to: Send LM & NTLM responses
    Under Policy, double-click 'Network security: Minimum session security for NTLM SSP based (including RPC) clients'
    De-select 'Require 128-bit encryption'
    Click OK
     To disable Windows Search:
    Start > Control Panel > Programs > Programs & Features
    On the right-hand side, click "Turn Windows features on/off"
    Scroll down, and de-select "Windows Search".
    Press OK, close all windows and restart.
     A third "solution," that has worked for me, is verify that both the AirPort base station and the Win7 PC are using the exact same Workgroup Name. In my case, I use "WORKGROUP" (without the quote marks) for this name. From the AirPort Utility, you would enter this value on the Disks > File Sharing tab. On Win7, Start > Control Panel > System and Security > System > Change Settings > Change > Workgroup

  • Flash drive only mounts when connected through USB hub

    I have a PNY 32gb USB 2.0 flash drive, when trying to connect the drive directly to my Mid 2012 MBP (specs attached) the drive never mounts, doesn't list in diskutil as an unmounted drive either, however when I plug the drive into a Micro Innovations USB Hub (old ~ 2002) the drive mounts (albeit slowly).
    On my iMac (Mid 2010 I7) the drive works perfectly in the machine or through Apple USB Keyboard.
    Any help?

    Is that the only USB drive that doesn't work with your MBP ?
    Everything else works fine?

  • Jetpack 5510l has no wifi signal - can only connect via usb to get Internet.

    Bought this device on a Thursday and it worked flawlessly - until Saturday.  The device has had a consistent connection to Verizon, but on Saturday the wifi began to 'go out.'  The device showed everything was working, but the wifi radio seems to have just turned off (after intermittently failing for a period of a couple hours).  We tried several different devices, none showed a working wifi signal coming from the mifi by the end of the day.
    What we have done so far:
    Rebooted.
    Removed battery (after shutting down), restarted.
    Used hard-reset button.
    Used web intefrace to turn wifi on and off - and on, changed ssid, passphrase, reset again (after each phase we also gave it an hour to see if the signal would return).
    Nothing has gotten the wifi from the device back online - it's as if either the radio or wifi antenna is completely broken.  We attempt to connect using 3 or 4 different devices - so it is most certainly the mifi.  There are no errors from the device - is there a debug / test mode?
    Our current workaround is to connect via usb to a Macbook and just share the internet connection - which works great, but makes travel a bit more difficult if a computer has to be connected to allow us to have a wifi signal (not from the mifi).
    Regards.

    Taking the Jetpack apart is going to void your warranty.  I would not suggest going down that road until your warranty is up.  Instead give VZW a call and have them ship you a replacement under the warranty service agreement. You have done a perfect job of isolating the problem to a wifi radio issue.  Its easy to recreate and confirm which will make the phone call fairly quick.  Unless you got sold on some kind of Best Buy warranty and prefer to go through them, VZW is going to be your best bet at getting a speedy replacement.

  • HP Photosmart C3180 connected via USB hub

    I am using an HP C3180 printer connected via USB to a Mac PowerBook G4. When connected directly to the PowerBook G4 the printer works just fine. Trying to connect it via a Belkin 4 port USB (1.1) hub ----the printer is not seen when connected via the hub. Can the C3180 be connected via a hub ? Must it be USB 2.0 if it is a hub ?

    I have the HPC309a, but had the same problem with my airport a while back.
    If you have a password on your airport network and try to print, if this works and you want to put the password back on, you'll have to go through a setup process, that is a pain, but at least you'll know what the hold up is.
    Also: Check your firmware on your airport and see what version you have. The new 7.5.2 is giving people problems. You can downgrade firmware and try that. I am running 7.5.1 and all is well.
    Finally, I dumped all HP downloaded software (uninstalled it all, this did it in the end for me) as Apple has their own. http://support.apple.com/kb/ht3669

  • Linksys EA3500 - ho to connect to USB HUB

    I recently bought EA3500 router. I am not able to hook up 2 storage external HDD and 1 USB printer usnig the router.I am connecting all 3 to a USB hub which i am connecting to the router. If somebody knows how to do this setup please reply to this post.

    According to the scenario that you mentioned will not be possible to share a USB port with the USB hub for sharing multiple devices..

  • Connectivity with SQL server getting lost

    Hi,
    When the SQL database is restarted, the connection of the web application gets lost and the tomcat has to be restarted manually in order to reset connection with the database. Please let me know if there is a way by which the connection can be re-establised without manually restarting the tomcat.
    Thanks and regards
    Lipi

    I am using oracle 11gR1 on windows 2003.
    This is my initaccessdb.ora(Path HS/ADMIN)
    HS_FDS_CONNECT_INFO = ACCESSDB
    HS_FDS_TRACE_LEVEL = OFF
    Listner File
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = APPSERVER)(PORT = 1521))
    SID_LIST_LISTENER=
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=PLSExtProc)
    (ORACLE_HOME=E:\app\Administrator\product\11.1.0\db_1)
    (PROGRAM=extproc)
         (SID_DESC =
         (SID_NAME = accessdb)
    (ORACLE_HOME = E:\app\Administrator\product\11.1.0\db_1)
    (PROGRAM = ACCESSDB)
         (ENVS=LD_LIBRARY_PATH=D:\)      
    TNSNAME.ORA
    ORCL =
    (DESCRIPTION =
         (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.0.14)(PORT = 1521))
         (CONNECT_DATA =
              (SERVER = DEDICATED)
              (SERVICE_NAME= ORCL)
    ACCESSDB =
    (DESCRIPTION=
         (ADDRESS =(PROTOCOL = TCP)(HOST=172.16.0.14)(PORT=1521))
              (CONNECT_DATA =
              (SERVICE_NAME=ACCESSDB))
                   (HS = OK)
    I successfully completed all steps as mentioned in your sending links documents but when i test my dblink query it gives the error message
    SQL> conn sys as sysdba
    Enter password:
    Connected.
    SQL> conn ahmed
    Enter password:
    Connected.
    SQL> drop database link test;
    Database link dropped.
    SQL> create database link test using 'ACCESSDB';
    Database link created.
    SQL> SELECT * FROM EMPLOYEE@TEST;
    SELECT * FROM EMPLOYEE@TEST
    ERROR at line 1:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from TEST
    Note: Please tell me that should i install ODBC driver ("Microsoft Access Driver *.mdb).If this should be installed then i have done correctly.
    Thanks

  • Losing connection to USB hub devices

    I have more than 4 USB devices to connect to my iMac so I bought a D-Link powered USB Hub.  Over time, maybe when the iMac goes to sleep, it loses connection to the devices plugged into the hub.  I have to unplug the power and plug it back in to reestablish the connection.  Is there any way to keep this from happening? OS X 10.7.4.  D-Link model DUB-H7.

    Yes it is. Shows up everywhere just under preferences in Audio/MIDI it says 0 MIDI detected. But when I take the USB out of the mic and put it back it has the pop up "disconnected USB mic" and same when I do with computer, but still not registering sound.  Mute on mic is fine. Nothing changed. Just stopped. This happened to me a few times before and rebooting worked. So far not so much. Nothings working.

  • IPods won't connect with USB hub

    I have a 7-port powered Trust USB 2.0 hub, in which my keyboard, EyeTV, printer, and two HDDs work perfectly. However my iPods are, at best, finicky with it. I have an 80GB 6th gen classic, which some of the time will connect happily and other times won't be recognised. Even more strangely, my shuffle (latest gen 1GB) will barely ever be recognised. When it is, iTunes may or may not be willing to try and sync it, but then the whole app will just hang until I physically remove the shuffle, at which point it instantly starts working again. What's more, these issues can be replicated even if each is the only device plugged in to the hub, and both are absolutely fine if plugged in to their very own port. I have tried restoring the shuffle many many times.
    It's mightily frustrating, and I'd appreciate some guidance on how to rid myself of the issue!

    Well my Shuffle got nicked, so never mind...

  • NullPointerException when connection to my WebServer get lost!

    I have write a simple web server which implements HTTP/1.1 based on David Brown's A Simple, Multithreaded Web Server: http://developer.java.sun.com/developer/technicalArticles/Networking/Webserver/
    Since the web server implement HTTP/1.1, the connection will be a persistent connection. When the server send the response to the client, it will wait for a while(a timeout period) to close the socket. socket.setSoTimeout(WebServer.timeout) will setup the timeout period and throw a exception when times out. I use:
    try{
    }catch(InterruptedIOException e){           
    inFromClient.close();
    outToClient.close();
    s.close();
    to catch the read time out and then close
    BufferedReader(inFromClient), DataOutputStream (outToClient) and Socket(socket).
    So now run the webserver, when there is no more request from the client, the server will idle for a while until the timeout happens. However at this right moment a NullPointerException was throwed. And it keeps pumping out this exception. Could anyone help me? Thanks ahead.

    Manuel,
    Thanks so much for your information. The runtime message I got is:
    java.lang.NullPointerException:
    At java.lang.Throwable.<init>(compiled code)
    At java.lang.exception.<init>(compiled code)
    At java.lang.RuntimeException.<init>(compiled code)
    At java.lang.NullPointerException.<init>(compiled code)
    At java.io.FileInputStream.<init>(compiled code)
    At java.net.SocketInputStream.<init>(compiled code)
    At java.net.PlainSocketImpl.getInputStream.<init>(compiled code)
    At java.net.socket.getInputStream.<init>(compiled code)
    At worker.handleClient.(compiled code)
    At worker.run.(compiled code)
    At java.lang.thread.run.(compiled code)
    You might be right when talking about that not initialised some variables correctly. Could you help me more about this problem.
    My code is quite like the URL(A simple,Multithread WebServer) I gave in my question message. Worker is a class implements HttpConstants, Runnable(multithread). worker calls handleClient() to parse client request and give corresponding response. Here is my modified handleClient(), followed will be my whole file code(WebServer.java):
    void handleClient() throws IOException, NullPointerException {
    String requestMessageLine;
    StringTokenizer tokenizedLine;
    BufferedReader inFromClient = new BufferedReader (
    new InputStreamReader ( s.getInputStream() ));
    DataOutputStream outToClient = new DataOutputStream(
    s.getOutputStream());
    String connection=null;
    boolean connExist=false;
    /* we will only block in read for this many milliseconds before we fail with
    * java.io.SocketTimeoutException, at which point we will abandon the connection.
    * This is how we implement persistent connection as specified in http/1.1, where
    * the server will block for a while(timeout) when reading from a client
    * connection. Different from http/1.0, where the server close the connection after
    * sending each object.
    s.setSoTimeout(WebServer.timeout);
    try{
    /* Handle the request line (first line) of the client request message */
    requestMessageLine = inFromClient.readLine();
    p(requestMessageLine);
    tokenizedLine = new StringTokenizer (requestMessageLine);
    String requestMethod = tokenizedLine.nextToken();
    if (requestMethod.equals("GET")) {
              isGet = true; }
    else if (requestMethod.equals("HEAD")) {
              isGet = false; }
    else {
         /* We do not support this method */     
    outToClient.writeBytes("HTTP/1.1 " + HTTP_BAD_METHOD + " unsupported method type: ");
    outToClient.writeBytes (requestMethod);
    outToClient.writeBytes (CRLF);
    outToClient.flush();
    return;
    String fileName=tokenizedLine.nextToken();
    if (fileName.startsWith("/") == true) {
    fileName = fileName.substring(1);
    File targ = new File(WebServer.root, fileName);
    if (targ.isDirectory()) {
    File ind = new File(targ, "index.html");
    if (ind.exists()) {
    targ = ind;
    String requestHeaderLine=null;
    String ct=(String)map.get(fileName.substring(fileName.lastIndexOf(".")));
    String tokenString;
    String firstToken;
    boolean acceptable=true;
    boolean acceptExist=false;
    /* Handle the rest lines (header lines) of the client request message */     
    while((requestHeaderLine=inFromClient.readLine()).length()!=0) {
              p(requestHeaderLine);
              tokenizedLine = new StringTokenizer(requestHeaderLine);
         firstToken = tokenizedLine.nextToken();
    /* Find the ACCEPT headerline from the client, if exists, handle it. */     
              if (firstToken.indexOf("Accept:")>=0) {
              acceptExist=true;
              String type= requestHeaderLine.substring(8);
    /* If the client won't accept any type, then try to find out if
    * the request entity is a acceptable type. */
              if(type.indexOf("*/*")<0) {                      
                   if(type.indexOf(ct)<0) {
                   acceptable=false; }
    /* Find value of the CONNECTION headerline from the client. */
              if (firstToken.indexOf("Connection")>=0) {
              connExist=true;
              connection=tokenizedLine.nextToken();
    if (isGet) {
         if(acceptable==true||acceptExist==false){
              /* If acceptable or there is no Accept header, send the file. */          
                   boolean OK = printHeaders(targ, outToClient);
                   if (OK) { 
                   sendFile(targ, outToClient); }
    else {  send404(targ, outToClient);     }
              /* if isGet is false, then handle the HEAD method */
              else if(acceptable==false){
              /* If unacceptable, send 406 client error information. */
              outToClient.writeBytes("HTTP/1.1 " + HTTP_NOT_ACCEPTABLE +
    " unacceptable media-type: ");
    outToClient.writeBytes ("*."+fileName.substring(fileName.lastIndexOf(".")+1));
    outToClient.writeBytes (CRLF);
    outToClient.flush();
    return;
    } else {  boolean OK = printHeaders(targ, outToClient);  }
    if(connExist==true){
    if(connection.equals("close")==true) {
    s.close();
    return;
    }catch(InterruptedIOException e){
    // inFromClient.close();
    //outToClient.close();
    s.close();
    }catch(NullPointerException e){         
         inFromClient.close();
    outToClient.close();
    s.close();
    ******** WebServer.java
    /* A multi-threaded HTTP/1.1 web server */
    import java.io.*;
    import java.net.*;
    import java.util.*;
    class WebServer implements HttpConstants {
    /* static class data/methods */
    /* print to stdout */
    protected static void p(String s) {
    System.out.println(s);
    static DataOutputStream log = null;
    /* print to the log file */
    protected static void log(String s) throws IOException{
    synchronized (log) {
    log.writeBytes(s+"\r\n");
    log.flush();
    /* our server's configuration information
    * is stored in these properties
    protected static Properties props = new Properties();
    /* Where worker threads stand idle */
    static Vector threads = new Vector();
    /* the web server's virtual root */
    static File root;
    /* timeout on client connections */
    static int timeout = 0;
    /* max # worker threads */
    static int workers = 5;
    /* load www-server.properties from java.home */
    static void loadProps() throws IOException { 
    File f = new File(System.getProperty("java.home")+File.separator+
    "lib"+File.separator+"www-server.properties");
    if (f.exists()) {
    InputStream is =new BufferedInputStream(new FileInputStream(f) );
    props.load(is);
    is.close();
    String r = props.getProperty("root");
    p("Root:"+r);
    if (r != null) {
    root = new File(r);
    if (!root.exists()) {
    throw new Error(root + " doesn't exist as server root");
    r = props.getProperty("timeout");
    if (r != null) {
    timeout = Integer.parseInt(r);
    r = props.getProperty("workers");
    if (r != null) {
    workers = Integer.parseInt(r);
    r = props.getProperty("log");
    /* if no properties were specified, choose defaults */
    if (root == null) {
    root = new File(System.getProperty("user.dir"));
    if (timeout < 20000) {
    timeout = 20000;
    if (workers > 25) {
    workers = 5;
    static void printProps() {
    p("root="+root);
    p("timeout="+timeout);
    p("workers="+workers);
    public static void main(
    String[] a) throws Exception {
    int port = 7700;
    if (a.length > 0) {
    port = Integer.parseInt(a[0]);
    loadProps();
    printProps();
    /* start worker threads */
    for (int i = 0; i < workers; ++i) {
    Worker w = new Worker();
    (new Thread(w, "worker #"+i)).start();
    threads.addElement(w);
    ServerSocket ss = new ServerSocket(port);
    while (true) {
    Socket s = ss.accept();
    Worker w = null;
    synchronized (threads) {
    if (threads.isEmpty()) {
    Worker ws = new Worker();
    ws.setSocket(s);
    (new Thread(ws, "additional worker")).start();
    } else {
    w = (Worker) threads.elementAt(0);
    threads.removeElementAt(0);
    w.setSocket(s);
    class Worker extends WebServer implements HttpConstants, Runnable {
    final static int BUF_SIZE = 2048;
    static final String CRLF="\r\n";
    boolean isGet;
    /* buffer to use for requests */
    byte[] buf;
    /* Socket to client we're handling */
    private Socket s;
    Worker() {
    buf = new byte[2048];
    s = null;
    synchronized void setSocket(Socket s) {
    this.s = s;
    notify();
    public synchronized void run() {
    while(true) {
    if (s == null) {
    /* nothing to do */
    try {          
    wait();
    } catch (InterruptedException e) {
    /* should not happen */
    continue;
    // while(true) {
    try {
    handleClient();
    } catch (Exception e) {
    e.printStackTrace();
    void handleClient() throws IOException, NullPointerException {
    String requestMessageLine;
    StringTokenizer tokenizedLine;
    BufferedReader inFromClient = new BufferedReader (
    new InputStreamReader ( s.getInputStream() ));
    DataOutputStream outToClient = new DataOutputStream(
    s.getOutputStream());
    String connection=null;
    boolean connExist=false;
    /* we will only block in read for this many milliseconds before we fail with
    * java.io.SocketTimeoutException, at which point we will abandon the connection.
    * This is how we implement persistent connection as specified in http/1.1, where
    * the server will block for a while(timeout) when reading from a client
    * connection. Different from http/1.0, where the server close the connection after
    * sending each object.
    s.setSoTimeout(WebServer.timeout);
    try{
    /* Handle the request line (first line) of the client request message */
    requestMessageLine = inFromClient.readLine();
    p(requestMessageLine);
    tokenizedLine = new StringTokenizer (requestMessageLine);
    String requestMethod = tokenizedLine.nextToken();
    if (requestMethod.equals("GET")) {
              isGet = true; }
    else if (requestMethod.equals("HEAD")) {
              isGet = false; }
    else {
         /* We do not support this method */     
    outToClient.writeBytes("HTTP/1.1 " + HTTP_BAD_METHOD + " unsupported method type: ");
    outToClient.writeBytes (requestMethod);
    outToClient.writeBytes (CRLF);
    outToClient.flush();
    return;
    String fileName=tokenizedLine.nextToken();
    if (fileName.startsWith("/") == true) {
    fileName = fileName.substring(1);
    File targ = new File(WebServer.root, fileName);
    if (targ.isDirectory()) {
    File ind = new File(targ, "index.html");
    if (ind.exists()) {
    targ = ind;
    String requestHeaderLine=null;
    String ct=(String)map.get(fileName.substring(fileName.lastIndexOf(".")));
    String tokenString;
    String firstToken;
    boolean acceptable=true;
    boolean acceptExist=false;
    /* Handle the rest lines (header lines) of the client request message */     
    while((requestHeaderLine=inFromClient.readLine()).length()!=0) {
              p(requestHeaderLine);
              tokenizedLine = new StringTokenizer(requestHeaderLine);
         firstToken = tokenizedLine.nextToken();
    /* Find the ACCEPT headerline from the client, if exists, handle it. */     
              if (firstToken.indexOf("Accept:")>=0) {
              acceptExist=true;
              String type= requestHeaderLine.substring(8);
    /* If the client won't accept any type, then try to find out if
    * the request entity is a acceptable type. */
              if(type.indexOf("*/*")<0) {                      
                   if(type.indexOf(ct)<0) {
                   acceptable=false; }
    /* Find value of the CONNECTION headerline from the client. */
              if (firstToken.indexOf("Connection")>=0) {
              connExist=true;
              connection=tokenizedLine.nextToken();
    if (isGet) {
         if(acceptable==true||acceptExist==false){
              /* If acceptable or there is no Accept header, send the file. */          
                   boolean OK = printHeaders(targ, outToClient);
                   if (OK) { 
                   sendFile(targ, outToClient); }
    else {  send404(targ, outToClient);     }
              /* if isGet is false, then handle the HEAD method */
              else if(acceptable==false){
              /* If unacceptable, send 406 client error information. */
              outToClient.writeBytes("HTTP/1.1 " + HTTP_NOT_ACCEPTABLE +
    " unacceptable media-type: ");
    outToClient.writeBytes ("*."+fileName.substring(fileName.lastIndexOf(".")+1));
    outToClient.writeBytes (CRLF);
    outToClient.flush();
    return;
    } else {  boolean OK = printHeaders(targ, outToClient);  }
    if(connExist==true){
    if(connection.equals("close")==true) {
    s.close();
    return;
    }catch(InterruptedIOException e){
    // inFromClient.close();
    //outToClient.close();
    s.close();
    }catch(NullPointerException e){         
         inFromClient.close();
    outToClient.close();
    s.close();
    /* Server Response Header */
    boolean printHeaders(File targ, DataOutputStream outToClient) throws IOException {
    boolean ret = false;
    int rCode = 0;
    /* Implement section 3.1 HTTP version */
    if (!targ.exists()) {
    rCode = HTTP_NOT_FOUND;
    outToClient.writeBytes("HTTP/1.1 " + HTTP_NOT_FOUND + " not found");
    outToClient.writeBytes (CRLF);
    ret = false;
    } else {
    rCode = HTTP_OK;
    outToClient.writeBytes ("HTTP/1.1 " + HTTP_OK+" OK");
    outToClient.writeBytes (CRLF);
    ret = true;
    String doingMethod=null;
    if (isGet==true) { doingMethod=" GET "; }
    else { doingMethod=" HEAD "; }
    if (log == null) {
    p("logging to stdout");
    p("From " s.getInetAddress().getHostAddress()doingMethod +
    targ.getAbsolutePath()+"-->"+rCode); }
         else {
         log("From " s.getInetAddress().getHostAddress()doingMethod +
    targ.getAbsolutePath()+"-->"+rCode); }
    outToClient.writeBytes ("Server:Multithreaded WebServer(HTTP/1.1, Port 5278)");
    outToClient.writeBytes (CRLF);
    /* Implement section 3.3-- Date/Time format: asctime-date */
    outToClient.writeBytes ("Date: " + ((new Date()).toString()).substring(0, 20)+
    ((new Date()).toString()).substring(24, 28));
    outToClient.writeBytes(CRLF);
    if (ret) {
    if (!targ.isDirectory()) {
    outToClient.writeBytes ("Content-length: "+targ.length());
    outToClient.writeBytes (CRLF);
    outToClient.writeBytes ("Last Modified: " + (new Date(targ.lastModified())));
    outToClient.writeBytes (CRLF);
    String name = targ.getName();
    int ind = name.lastIndexOf('.');
    String ct = null;
    if (ind > 0) {
    ct = (String) map.get(name.substring(ind));
    if (ct == null) {
    ct = "unknown/unknown";
    outToClient.writeBytes ("Content-type: " + ct);
    outToClient.writeBytes (CRLF);
    } else {
    outToClient.writeBytes ("Content-type: text/html");
    outToClient.writeBytes (CRLF);
    outToClient.writeBytes (CRLF);
    return ret;
    void send404(File targ, DataOutputStream outToClient) throws IOException {
    outToClient.writeBytes (CRLF);
    outToClient.writeBytes (CRLF);
    outToClient.writeBytes ("Not Found\n\n"+"The requested resource was not found.\n");
    void sendFile(File targ, DataOutputStream outToClient) throws IOException {
    InputStream inFile = null;
    outToClient.writeBytes (CRLF);
    if (targ.isDirectory()) {
    /* here, we take advantage of the fact that FileURLConnection will
    * parse a directory listing into HTML for us.
    File ind = new File(targ, "index.html");
    if (ind.exists()) {
    targ = ind;
    inFile = new FileInputStream(ind);
    } else {
    URL u = new URL("file", "", targ.getAbsolutePath());
    inFile = u.openStream();
    } else {
    inFile = new FileInputStream(targ.getAbsolutePath());
    int numofBytes = (int) targ.length();
    byte[] b=new byte[numofBytes];
    try {
    int n;
    while ((n = inFile.read(b)) > 0) {
    outToClient.write(b, 0, n);
    } finally {
    inFile.close();
    /* mapping of file extensions to
    content-types /
    static java.util.Hashtable map =
    new java.util.Hashtable();
    static {
    fillMap();
    static void setSuffix(String k, String v) {
    map.put(k, v);
    static void fillMap() {
    setSuffix("", "content/unknown");
    setSuffix(".uu", "application/octet-stream");
    setSuffix(".exe", "application/octet-stream");
    setSuffix(".ps", "application/postscript");
    setSuffix(".zip", "application/zip");
    setSuffix(".sh", "application/x-shar");
    setSuffix(".tar", "application/x-tar");
    setSuffix(".snd", "audio/basic");
    setSuffix(".au", "audio/basic");
    setSuffix(".wav", "audio/x-wav");
    setSuffix(".gif", "image/gif");
    setSuffix(".jpg", "image/jpeg");
    setSuffix(".jpeg", "image/jpeg");
    setSuffix(".htm", "text/html");
    setSuffix(".html", "text/html");
    setSuffix(".text", "text/plain");
    setSuffix(".c", "text/plain");
    setSuffix(".cc", "text/plain");
    setSuffix(".c++", "text/plain");
    setSuffix(".h", "text/plain");
    setSuffix(".pl", "text/plain");
    setSuffix(".txt", "text/plain");
    setSuffix(".java", "text/plain");
    interface HttpConstants {
    /** 2XX: generally "OK" */
    public static final int HTTP_OK = 200;
    public static final int HTTP_CREATED = 201;
    public static final int HTTP_ACCEPTED = 202;
    public static final int HTTP_NOT_AUTHORITATIVE = 203;
    public static final int HTTP_NO_CONTENT = 204;
    public static final int HTTP_RESET = 205;
    public static final int HTTP_PARTIAL = 206;
    /** 3XX: relocation/redirect */
    public static final int HTTP_MULT_CHOICE = 300;
    public static final int HTTP_MOVED_PERM = 301;
    public static final int HTTP_MOVED_TEMP = 302;
    public static final int HTTP_SEE_OTHER = 303;
    public static final int HTTP_NOT_MODIFIED = 304;
    public static final int HTTP_USE_PROXY = 305;
    /** 4XX: client error */
    public static final int HTTP_BAD_REQUEST = 400;
    public static final int HTTP_UNAUTHORIZED = 401;
    public static final int HTTP_PAYMENT_REQUIRED = 402;
    public static final int HTTP_FORBIDDEN = 403;
    public static final int HTTP_NOT_FOUND = 404;
    public static final int HTTP_BAD_METHOD = 405;
    public static final int HTTP_NOT_ACCEPTABLE = 406;
    public static final int HTTP_PROXY_AUTH = 407;
    public static final int HTTP_CLIENT_TIMEOUT = 408;
    public static final int HTTP_CONFLICT = 409;
    public static final int HTTP_GONE = 410;
    public static final int HTTP_LENGTH_REQUIRED = 411;
    public static final int HTTP_PRECON_FAILED = 412;
    public static final int HTTP_ENTITY_TOO_LARGE = 413;
    public static final int HTTP_REQ_TOO_LONG = 414;
    public static final int HTTP_UNSUPPORTED_TYPE = 415;
    /** 5XX: server error */
    public static final int HTTP_SERVER_ERROR = 500;
    public static final int HTTP_INTERNAL_ERROR = 501;
    public static final int HTTP_BAD_GATEWAY = 502;
    public static final int HTTP_UNAVAILABLE = 503;
    public static final int HTTP_GATEWAY_TIMEOUT = 504;
    public static final int HTTP_VERSION = 505;

  • Connecting to USB hub

    Hey folks,
    Running iPhone 3G 3.0.1. I more USB space; can the iPhone sync and charge off a hub?

    Maybe, depends on the hub. Some have reported no problems with a hub, others have reported the opposite. You may have better luck with a powered hub.
    I would try to plug it directly into your computer if possible.

  • Why does my 23 ACD go black  when its USB-hub cord is connected to computer

    When I connect the USB - hub cord of my 23 ACD to the back USB port of my G5 quad, the display instantly goes black (shuts of) and back on and to normal operation again, when USB is disconnected. Why is that ? When I start up the computer with the displays USB cord connected and display powered, it turns off when computer starts. Does anyone know
    any reason for this or, better still, a fix to this problem ?
    G5 quad   Mac OS X (10.4.10)   23 ACD

    I have this exact same problem. It is only a recent occurrence and my screen is just about 1 year old. When the USB cord from the ACD is plugged into the back of my Mini, the screen goes black. When the USB cord is removed, the screen powers on as normal. I do get the device removal warning when I remove the USB cord, but other than that, nothing. I've seen in a couple of other posts that this isn't an unusual problem and maybe it's not worth getting it fixed. Is this the consensus? I'm planning to get a USB hub anyway.

  • Can I use a USB hub to connect to multiple USB ports from one GPIB-USB-HS?

    I have one instrument which has a GPIB-USB-HS connected and the USB cable is connected to a USB hub. Can I have multiple PCs to connect using USB hub at their respective USB ports? If so, how many PCs can I connect using the USB cable?
    I have downloaded the latest NI-VISA from the website.
    Solved!
    Go to Solution.

    You would first need a hub that allows you to switch between multiple pc's and then only one pc at a time would be connected and in control.
    When you buy this special type of hub, one of the specs is how many pc connections it has.

  • IMac 2012 OS's not loading while USB-Hub pugged in. Why?

    So i have a problem. I have a new iMac 21,5. I plugged in my iMac through my Smart-UPS and It has an USB control. SO i turn to iMac USB-Hub with 3 USB and card reader in it and to this USB-Hub i have connect USB cable going from Smart-UPS.
    When i turning on my iMac its stop loading and i see white screen which goes before screen with Apple logo. As soon as i remove USB cable USB-Hub from iMac its going loading good and then i connect USB-Hub again and it works well. Why it can happen?

    ok just did it.
    So right now all USB prots on iMac are busy.
    - USB Wacom Wirless connection kit
    - USB-Hub with cardreader
    - UPS directly to iMac
    - Wacom tablet.
    Turn on iMac and system starting and loading quick
    SO looks like trouble was that i had connect UPS through the USB-Hub? Why it could be? Just early when i have this connection of UPS through USB-Hub i notfied that in task bar(or how it called on iMac where clock, menu at the top) there are icon with power pluged to UPS showinig percentage of battery loaded. And sometime its appear and then disappear and jumping here and there. Now when it connected directly i see this icons always appeared.
    So it looks like it lost connection sometime and this USB-Hub only for turning usb flash, some low power stuff and memry sticks only?

  • Airport Extreme and USB hub

    Okay I connected a hub to my USB on the airport extreme. Now I can see both hard drives however I get an IP address conflict and the network basically shuts down. Is there something I am missing here?

    Try reading the entire conversation, Duane, and you'll realize that I'm fully aware of the fact that he's talking about a USB hub. And let me point out the fact that your misunderstanding makes no sense because even if I had thought he was talking about an ethernet hub, an ethernet hub has no IP address of its own.
    His problem is that he gets an error message indicating that an IP that has already been allocated is being used by another device. A USB hub gets no IP nor does a simple USB external drive. Still, when he plugs in the hub that error message pops up. Why? The only explanation I could come up with is that one of the drives he is attaching to the USB hub isn't a standard external USB drive.
    Have I connected all the dots for you okay?

Maybe you are looking for

  • Automator crashes in OS 10.6.8

    Running OS 10.6.8 on my late 2006, 13 in macbook2,1. Last few weeks have had multiple applications crash unexpectedly. Have verified and repaired disk permissions numerous times, verified hard drive a few times too. Took macbook to Genius Bar where t

  • Can't Stick Order Form onto Catalog

    This is a simple problem, but I can't figure out how to do it. I have a catalog. I created an interactive Order Form in LiveCycle 7.0. I can't put the two together through "create pdf from multiple files." The LiveCycle form is protected. How can I -

  • DMS Server Specs

    Can anybody provide a doc with the correct server specs? I'm looking for the actual C210 server. Specifically, is it an M1 or M2? What amount of memory is installed in the DMM and SnS? What CPU? Heat? Power? Dimensions? Etc. Last document I saw on co

  • Can't Pair Phone with Macbook Air with Yosemite

    I just upgraded to Yosemite and now I can't pair my iPhone 6 with my Macbook Air. I believe, and I may be wrong, that I have to have the devices paired via Bluetooth to have the features such s being able to answer my phone on my MacBook Air, or usin

  • Best Practice in Scenario

    I am currently trying to accomplish the following: get the Last Weekstamp for the last 6 Months, the following ilustrates how the end result might look like: Month   | Weekstamp | 2013-12|  2013-52    | 2014-01|  2014-05    | .... and so on I have a