Posted by roberto.ch on November 3, 2008 at 3:24pm
Jump to:
| Project: | Sphinx search |
| Version: | 6.x-1.x-dev |
| Component: | Sphinx search indexer |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
how you authorize the indexer for requesting pages from drupal6-site?
[ROOT@psrLAMP01:/opt/sphinx] bin/indexer --all
Sphinx 0.9.8.1-release (r1533)
Copyright (c) 2001-2008, Andrew Aksyonoff
using config file '/opt/sphinx/etc/sphinx.conf'...
indexing index 'index_platforms_main0'...
ERROR: index 'index_platforms_main0': xmlpipe: expected '<document>', got 'Not authorized.
'.
total 0 docs, 0 bytes
total 0.010 sec, 0.00 bytes/sec, 0.00 docs/sec
indexing index 'index_platforms_main1'...
ERROR: index 'index_platforms_main1': xmlpipe: expected '<document>', got 'Not authorized.
'.
total 0 docs, 0 bytes
total 0.010 sec, 0.00 bytes/sec, 0.00 docs/sec
indexing index 'index_platforms_delta'...
ERROR: index 'index_platforms_delta': xmlpipe: expected '<document>', got 'Not authorized.
'.
total 0 docs, 0 bytes
total 0.010 sec, 0.00 bytes/sec, 0.00 docs/sec
distributed index 'index_platforms_join' can not be directly indexed; skipping.saluti
roberto
Comments
#1
Access to the XMLPipe generator is controlled by IP. Please, look at the Sphinx search settings panel, field "Sphinx indexer IP addresses".
#2
my entry in "Sphinx indexer IP addresses"
is same as in drupal-log (10.14.5.93).
i adjust the sphinxsearch.xmlpipe.inc
/* $access_xmlpipe = FALSE; */$access_xmlpipe = TRUE;
but that is not the best solution :-)
saluti
roberto
#3
When the indexer is executed and it founds that the requester's IP address does not match the rules in module settings, then a watchdog report is recorded for review.
Goto Administer > Reports > Recent log entries, then filter for message of type "sphinxsearch". Enter to see details of the reports "Not authorized.". The hostname row should tell you the IP address of the client who attempted to execute the XMLPipe generator.
If the Sphinx process runs on the same Apache box the site is installed, maybe you need to authorize 127.0.0.1 in the sphinxsearch settings panel?
#4
in sphinxsearch.xmlpipe.inc function named sphinxsearch_ip_check_cidr() there is a line:
$ip_mask = ~((1 << (32 - $mask)) - 1);Probably for working in 64 bit environment you need change int 32 to 64:
$ip_mask = ~((1 << (64 - $mask)) - 1);So, I think it is a bug because it prevent module to work in 64bit env.
#5
We can easily check is it 64 or 32 bit machine using PHP_INT_SIZE constant, so this code should works in both cases:
$ip_mask = ~((1 << ((PHP_INT_SIZE==8 ? 64 : 32) - $mask)) - 1);#6
premanup's solutions works well. Tested on both 32 and 64 systems.