error messages in error.log -> causes, solutions ?

Hi,

I often get the message underneath in the error.log file:

An IOException occurred. The message was: Connection reset
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source)
at sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at java.io.BufferedReader.fill(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at com.screenscraper.scraper.RemoteScrapingSessionHandler.run(RemoteScrapingSessionHandler.java:165)

Which connection is reset ? Is it while reading pages of a website, so connection with the website that's broken ? Or is the scraper server that crashed and doesn't answer to any other connections ? What causes this error to happen ?

And another question. Sometimes the scraper server seems to crash due to problems with the database connection. I installed a jdbc driver. I get the following error in the error.log file:

Sorry, screen-scraper will need to exit because it can't bind to the following port(s): 9001. Please see this page for more information: http://www.screen-scraper.com/support/faq/faq.php#PortBindingError

If this is the case I need to kill process java.exe before restarting the scraper server. My colleagues from the network team investigated this problem. There is no other application using that port 9001. There seems to be no reason for the scraper having problems with the sql server. One time I had also this error in the logfile:

An error occurred while executing the SQL statement. The error was Connection is broken.
java.sql.SQLException: Connection is broken
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.executeQuery(Unknown Source)
at com.screenscraper.util.DataMain.executeSelect(DataMain.java:330)
at com.screenscraper.util.DataMain.executeSelect(DataMain.java:345)
at com.screenscraper.data.DScrapingSession.getLE(DScrapingSession.java:923)
at com.screenscraper.business.BScrapingSession.getLE(BScrapingSession.java:661)
at com.screenscraper.util.General.ph(General.java:3343)
at com.screenscraper.util.General$1TeleThread.run(General.java:3299)

Is there anything I can check to discover what causes this database problem ? I found out the port 9001 is set in a properties file. Can I specify a range of ports there, so that if that port 9001 is not possible, other requests can be answered via another port ?

Thanks in advance !!
Tamara

error messages in error.log -> causes, solutions ?

Tamara,

Below is a link to a utility that may help you identify if another application is using a port that screen-scraper is set to use. This is a Windows utility.

http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx

I've put in a request to add timestamps to the log files (I've wanted this for a while, too).

-Scott

re: error messages in error.log -> causes, solutions ?

Hi Scott,

There is no anti-virus software running on that machine, so that's not possible. We will try to discover when these errors occur. Maybe at that moment there are other applications using the port. It's quite annoying that the error log, contains no timestamps. :-s

We did already upgrade to 4.0.

Kind regards,
Tamara Vos

error messages in error.log -> causes, solutions ?

tamara,

Otherwise, that might be caused by another program on your computer that is binding to the socket that screen-scraper is trying to use. Do you have any other programs running like anti-virus software that could be accessing ports?

Also, we'll be replying to your post regarding the differences between 3.0 & 4.0 and when you're comfortable in doing so upgrading to 4.0 will help solve these port binding issues more easily.

Thanks,
Scott

re: error messages in error.log -> causes, solutions ?

Hi,

My error.log file is again filled with the kind of statements here underneath. This time I did no interventions, so it cannot be due to relaunching screenscraper before the reset of the database connection.

An error occurred while executing the SQL statement. The error was Connection is broken: Software caused connection abort: socket write error.
java.sql.SQLException: Connection is broken: Software caused connection abort: socket write error
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.execute(Unknown Source)
at com.screenscraper.util.DataMain.executeDelete(DataMain.java:482)
at com.screenscraper.util.DataMain.executeDelete(DataMain.java:497)
at com.screenscraper.data.DScrapingSession.deleteExtractorPatternTokens(DScrapingSession.java:885)
at com.screenscraper.business.BScrapingSession.deleteExtractorPatternTokens(BScrapingSession.java:594)
at com.screenscraper.scraper.ExtractorPattern.save(ExtractorPattern.java:488)
at com.screenscraper.scraper.ScrapeableFile.save(ScrapeableFile.java:1911)
at com.screenscraper.scraper.ScrapingSession.save(ScrapingSession.java:2117)
at com.screenscraper.scraper.ScrapingSessionManager.save(ScrapingSessionManager.java:1107)
at com.screenscraper.model.ModelMainFrame.handleAppEvent(ModelMainFrame.java:188)
at com.screenscraper.controller.ControllerMainFrame.handleAppEvent(ControllerMainFrame.java:480)
at com.screenscraper.view.ViewMainFrame.promptForSave(ViewMainFrame.java:1778)
at com.screenscraper.view.ViewMainFrame.access$000(ViewMainFrame.java:41)
at com.screenscraper.view.ViewMainFrame$1.windowClosing(ViewMainFrame.java:140)
at java.awt.AWTEventMulticaster.windowClosing(Unknown Source)
at java.awt.Window.processWindowEvent(Unknown Source)
at javax.swing.JFrame.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Kind regards,
Tamara Vos

error messages in error.log -> causes, solutions ?

Tamara,

The first issue, when your connection is reset, the connection it's referring to is between screen-scraper and your Coldfusion application. screen-scraper is waiting for a signal from your app and if it doesn't get one within the timeout it generates that error. The solution is to increase the socket connection timeout within screen-scraper.

The second issue occurs when after screen-scraper crashes and you attempt to restart it that error indicates that the database process is still alive when you attempt to relaunch screen-scraper. Unfortunately, there is no elegant solution to this problem that we can provide. The workaround is to manually kill any java.exe processes before relaunching screen-scraper, just like you've been doing. Port 9001 is the port screen-scraper had been using to connect to its own database and since the database process has locked that port screen-scraper can't access it as it's been loaded.

The third and last issue is the first report we had for this. If it happens again let us know, but we think it might have been caused when you launched screen-scraper, closed it and relaunched it before the database connection could reset.

I hope this helps. Please let us know what other problems you may be having.

Thanks,
Scott