Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
- new icon for OAI-PMH loading action - added many stack trace outputs for exceptions in crawl profile handler to find the 'missing profile handle' bug - catched one more timeout exception in httpd file loader
orbitere3025ee69187
diff --git a/htroot/IndexImportOAIPMHList_p.java b/htroot/IndexImportOAIPMHList_p.javaindex 7ff7592d6..33454e3b8 100644--- a/htroot/IndexImportOAIPMHList_p.java+++ b/htroot/IndexImportOAIPMHList_p.java@@ -67,7 +67,7 @@ public class IndexImportOAIPMHList_p {int cnt = 0;for (OAIPMHImporter job: jobs) {prop.put("import_table_" + cnt + "_dark", (dark) ? "1" : "0");- prop.put("import_table_" + cnt + "_thread", (job.isAlive()) ? "<img src=\"/env/grafics/crawl.gif\" alt=\"running\" />" : "finished");+ prop.put("import_table_" + cnt + "_thread", (job.isAlive()) ? "<img src=\"/env/grafics/loading.gif\" alt=\"running\" />" : "finished");prop.put("import_table_" + cnt + "_source", job.source());prop.put("import_table_" + cnt + "_chunkCount", job.chunkCount());prop.put("import_table_" + cnt + "_recordsCount", job.count());diff --git a/htroot/env/grafics/loading.gif b/htroot/env/grafics/loading.gifnew file mode 100644index 000000000..da8e1c645Binary files /dev/null and b/htroot/env/grafics/loading.gif differdiff --git a/source/de/anomic/crawler/CrawlProfile.java b/source/de/anomic/crawler/CrawlProfile.javaindex 942a573ac..9279eb87a 100644--- a/source/de/anomic/crawler/CrawlProfile.java+++ b/source/de/anomic/crawler/CrawlProfile.java@@ -101,6 +101,7 @@ public class CrawlProfile {try {return new profileIterator(up);} catch (final IOException e) {+ e.printStackTrace();return new HashSet<entry>().iterator();}}@@ -117,6 +118,7 @@ public class CrawlProfile {try {return handleIterator.hasNext();} catch (final kelondroException e) {+ e.printStackTrace();clear();return false;}@@ -126,6 +128,7 @@ public class CrawlProfile {lastkey = new String(handleIterator.next());return getEntry(lastkey);} catch (final kelondroException e) {+ e.printStackTrace();clear();return null;}@@ -134,6 +137,7 @@ public class CrawlProfile {if (lastkey != null) try {removeEntry(lastkey);} catch (final kelondroException e) {+ e.printStackTrace();clear();}}@@ -141,8 +145,10 @@ public class CrawlProfile {public void removeEntry(final String handle) {try {- profileTable.remove(handle);- } catch (final IOException e) {}+ profileTable.remove(handle);+ } catch (final IOException e) {+ e.printStackTrace();+ }}public entry newEntry(final Map<String, String> mem) {@@ -218,6 +224,7 @@ public class CrawlProfile {try {return profileTable.has(handle);} catch (final IOException e) {+ e.printStackTrace();return false;}}@@ -227,6 +234,7 @@ public class CrawlProfile {try {m = profileTable.get(handle);} catch (final IOException e) {+ e.printStackTrace();return null;}if (m == null) return null;@@ -384,6 +392,7 @@ public class CrawlProfile {try {return Integer.parseInt(r);} catch (final NumberFormatException e) {+ e.printStackTrace();return 0;}}@@ -393,6 +402,7 @@ public class CrawlProfile {try {return Integer.parseInt(r);} catch (final NumberFormatException e) {+ e.printStackTrace();return CACHE_STRATEGY_IFFRESH;}}@@ -405,6 +415,7 @@ public class CrawlProfile {final long l = Long.parseLong(r);return (l < 0) ? 0L : l;} catch (final NumberFormatException e) {+ e.printStackTrace();return 0L;}}@@ -419,6 +430,7 @@ public class CrawlProfile {if (i < 0) return Integer.MAX_VALUE;return i;} catch (final NumberFormatException e) {+ e.printStackTrace();return Integer.MAX_VALUE;}}@@ -432,6 +444,7 @@ public class CrawlProfile {if (i < 0) return Integer.MAX_VALUE;return i;} catch (final NumberFormatException e) {+ e.printStackTrace();return Integer.MAX_VALUE;}}@@ -529,7 +542,7 @@ public class CrawlProfile {ey = domnamesi.next();i++;}- if(domnamesi.hasNext()){+ if (domnamesi.hasNext()) {ey = domnamesi.next();dp = ey.getValue();domname = ey.getKey() + ((attr) ? ("/r=" + dp.referrer + ", d=" + dp.depth + ", c=" + dp.count) : " ");diff --git a/source/de/anomic/http/server/HTTPDFileHandler.java b/source/de/anomic/http/server/HTTPDFileHandler.javaindex 0b3464b0c..adc26a378 100644--- a/source/de/anomic/http/server/HTTPDFileHandler.java+++ b/source/de/anomic/http/server/HTTPDFileHandler.java@@ -1049,14 +1049,14 @@ public final class HTTPDFileHandler {} else {if ((errorMsg != null) &&(- errorMsg.contains("Broken pipe") ||+ errorMsg.contains("Broken pipe") ||errorMsg.contains("Connection reset") ||+ errorMsg.contains("Read timed out") ||+ errorMsg.contains("Connection timed out") ||errorMsg.contains("Software caused connection abort"))) {// client closed the connection, so we just end silentlyerrorMessage.append("Client unexpectedly closed connection while processing query.");- } else if ((errorMsg != null) && (errorMsg.startsWith("Connection timed out"))) {- errorMessage.append("Connection timed out.");} else {errorMessage.append("Unexpected error while processing query.");httpStatusCode = 500;diff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.javaindex 3e2066de4..2d89a2f3c 100644--- a/source/de/anomic/server/serverCore.java+++ b/source/de/anomic/server/serverCore.java@@ -42,6 +42,7 @@ import java.net.NetworkInterface;import java.net.ServerSocket;import java.net.Socket;import java.net.SocketException;+import java.net.SocketTimeoutException;import java.nio.channels.ClosedByInterruptException;import java.security.KeyStore;import java.util.ArrayList;