Hi,

I tried to install this module but got this error: "0" Status: Communication Error while running the cron job.

This is my system's details:
- php 5.2.4
- apache 1.3.29
- apache tomcat 6.0
- apache solr 1.2.0

I have followed all the instructions, and I checked my solr is active at http://localhost:8080/solr/admin/

Since most people here seem to be able to install this module successfully, I was wondering if I have done something wrong in the installation process.

Please help!!

Comments

robertdouglass’s picture

Are you sure you updated the port on the apachesolr settings page? The default port is 8983 (for jetty) and you're using :8080

winarcht’s picture

Hi Robert, thank you for your reply.
I am using apache tomcat, not jetty. And the default port for it is 8080.
Did I do anything wrong?

winarcht’s picture

Ok, I have tried using tomcat and also jetty but still getting same error.
As an information, my solr is working. I can access http://localhost:8983/solr/admin/ without any problems.

But while trying to run cron job, I got the same error: "0" Status: Communication Error.
Can anybody please provide the step by step installation tutorial?

robertdouglass’s picture

Checklist:

1. Have you updated the settings here: q=admin/settings/apachesolr ?
2. Have you moved schema.xml from the ApacheSolr module into solr/conf of the solr download?
3. What PHP version are you using?

winarcht’s picture

Yes, I have done all of them.
In fact, the apache solr is running and can be pinged (I got this message from the status report located at q=admin/logs/status). This really makes me curious. All systems said okay, but the cron job failed to execute.

I am using Apache/1.3.29 (Win32) and PHP/5.2.4
Thx Robert.

robertdouglass’s picture

Huh. I don't really know what's going on =(

winarcht’s picture

Robert,

I have figured out what's going on here.
There is a code like this in service.php:
$response = new Apache_Solr_Response(@file_get_contents($url, false, $this->_postContext), $http_response_header);

To be able to use file_get_contents() in PHP,
the "allow_url_fopen" directive must be enabled.
Apparently, my server did not do that.

Sadly, I did not get any errors though that line failed to execute.
That's why I never realized the problem.

May I give you a suggestion?
Please include this problem in the README.TXT

This is how I solve the problem:
- Creating php.ini
- Fill it with these lines:
[PHP]
allow_url_fopen = On

robertdouglass’s picture

Category: support » task
Priority: Critical » Normal

Great information! Thanks for working through the problem and reporting the solution. I'll definitely add this to the documentation.

winarcht’s picture

Category: task » support
Priority: Normal » Critical
Status: Active » Fixed

You are welcome.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

francewhoa’s picture

I wrote a how-to handbook for absolute beginners at http://drupal.org/node/504558
This is for Ubuntu Server though not Tomcat.