When I try to connect to the screen-scraper server from my application it refuses connections. How do I fix this?
screen-scraper can deny access to external applications when you're running a proxy session, accessing it in server mode, connecting via the SOAP protocol, or accessing the web interface. Only external applications originating from specific IP addresses are allowed to connect. If screen-scraper is denying access, see below for possible reasons and remedies.
If you're running a proxy session, first ensure that the proxy session is actually running (click the "Start Proxy Server" button under the "General" tab). If you're trying to access the web interface or the screen-scraper server, check to ensure that the server is running. Details on doing that can be found here.
This may also be occurring because the IP address of the machine that is connecting to screen-scraper isn't listed in screen-scraper's list of allowed hosts. You can correct this in one of two ways:
- If the machine running screen-scraper can launch the workbench (e.g., it's running Windows or Linux with Xwindows) or you get the error 'Access is denied for host:', you can adjust the security settings by opening the "Settings" window (click the wrench icon), clicking on the "Servers" icon, then entering the IP address (or a portion of the IP address) of the machine you want to allow to connect to screen-scraper in the box labeled "Hosts to allow to connect".
- If the computer running screen-scraper can't launch the workbench (e.g., it's running Linux without Xwindows installled), you can adjust the security settings by stopping the server, altering the "resource/conf/screen-scraper.properties" file, and starting the server back up. Add the IP address (or a portion of the IP address) of the machine you want to allow to connect to the "IPAddressesToAllow" property (it's comma-delimited).
If adjusting that setting doesn't seem to help, you can also try emptying out the value for the setting, which will allow all clients to connect.
If that still doesn't solve the problem, check to ensure that you're trying to connect to screen-scraper using the port on which screen-scraper is listening. The default for the screen-scraper server is 8777, and the default for the SOAP and web server is 8779. These port numbers can both be altered via the "Settings" dialog box in the workbench (click the wrench icon), under the "Servers" section.
If you're running Linux, it may also be that you need to indicate the IP address of the machine when connecting to it instead of "localhost". For example, if you're connecting to screen-scraper via PHP, your "initialize" call may look like this:
$session->initialize( "Hello World", "192.168.1.111", 8778 );
where "192.168.1.111" is the IP address of the machine running screen-scraper.