- more logging in server process

- fix for bas ascii in comment

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6084 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent b5bc399cea
commit fd31a3616a

@ -770,40 +770,34 @@ public final class serverCore extends serverAbstractBusyThread implements server
} }
if (terminate) break; if (terminate) break;
} catch (final InvocationTargetException ite) { } catch (final InvocationTargetException e) {
System.out.println("ERROR A " + this.userAddress.getHostAddress()); log.logSevere("command execution, target exception " + e.getMessage() + " for client " + this.userAddress.getHostAddress(), e);
// we extract a target exception and let the thread survive // we extract a target exception and let the thread survive
writeLine(this.commandObj.error(ite.getTargetException())); writeLine(this.commandObj.error(e.getTargetException()));
} catch (final NoSuchMethodException nsme) { } catch (final NoSuchMethodException e) {
System.out.println("ERROR B " + this.userAddress.getHostAddress()); log.logSevere("command execution, method exception " + e.getMessage() + " for client " + this.userAddress.getHostAddress(), e);
if (!this.userAddress.isSiteLocalAddress()) { if (!this.userAddress.isSiteLocalAddress()) {
if (serverCore.this.denyHost != null) { if (serverCore.this.denyHost != null) {
serverCore.this.denyHost.put((""+this.userAddress.getHostAddress()), "deny"); // block client: hacker attempt serverCore.this.denyHost.put((""+this.userAddress.getHostAddress()), "deny"); // block client: hacker attempt
} }
} }
break; break;
// the client requested a command that does not exist } catch (final IllegalAccessException e) {
//Object[] errorParameter = { nsme }; log.logSevere("command execution, illegal access exception " + e.getMessage() + " for client " + this.userAddress.getHostAddress(), e);
//writeLine((String) error.invoke(this.cmdObject, errorParameter));
} catch (final IllegalAccessException iae) {
System.out.println("ERROR C " + this.userAddress.getHostAddress());
// wrong parameters: this an only be an internal problem // wrong parameters: this an only be an internal problem
writeLine(this.commandObj.error(iae)); writeLine(this.commandObj.error(e));
} catch (final java.lang.ClassCastException e) { } catch (final java.lang.ClassCastException e) {
System.out.println("ERROR D " + this.userAddress.getHostAddress()); log.logSevere("command execution, cast exception " + e.getMessage() + " for client " + this.userAddress.getHostAddress(), e);
// ?? // ??
writeLine(this.commandObj.error(e)); writeLine(this.commandObj.error(e));
} catch (final Exception e) { } catch (final Exception e) {
System.out.println("ERROR E " + this.userAddress.getHostAddress()); log.logSevere("command execution, generic exception " + e.getMessage() + " for client " + this.userAddress.getHostAddress(), e);
// whatever happens: the thread has to survive! // whatever happens: the thread has to survive!
writeLine("UNKNOWN REASON:" + this.commandObj.error(e)); writeLine("UNKNOWN REASON:" + this.commandObj.error(e));
} }
} // end of while } // end of while
} /* catch (java.lang.ClassNotFoundException e) { } catch (final IOException e) {
System.out.println("Internal error: Wrapper class not found: " + e.getMessage()); log.logSevere("command execution, IO exception " + e.getMessage() + " for client " + this.userAddress.getHostAddress(), e);
System.exit(0);
} */ catch (final java.io.IOException e) {
// connection interruption: more or less normal
} }
//announceMoreExecTime(System.currentTimeMillis() - this.start); //announceMoreExecTime(System.currentTimeMillis() - this.start);
} }

@ -5,7 +5,7 @@
// //
// This is a part of YaCy, a peer-to-peer based web search engine // This is a part of YaCy, a peer-to-peer based web search engine
// //
// $LastChangedDate: 2009-03-30 17:31:25 +0200 (Mo, 30. Mär 2009) $ // $LastChangedDate: 2009-03-30 17:31:25 +0200 (Mo, 30. March 2009) $
// $LastChangedRevision: 5756 $ // $LastChangedRevision: 5756 $
// $LastChangedBy: orbiter $ // $LastChangedBy: orbiter $
// //

Loading…
Cancel
Save