//home | tags | archives | about | grosu.nl | eulinux.org | RSS Feed

RWhoisd, indexer issue on Linux

floyd - Sat 05 December 2009 - network, linux

Getting `sort...` errors when running rwhois_indexer on Linux? (I was experiencing this on CentOS 5)

[root@server html]# /usr/local/rwhoisd/bin/rwhois_indexer -c /usr/local/rwhoisd/etc/rwhoisd.conf -v -A 203.23.23.0/22 -C network -s txt
sort: open failed: +4: No such file or directory
error: sort failed: Success
warning: could not delete temporary index file '': Success
warning: could not delete temporary index file '': Success
indexing failed

This is caused by the parameters used by the indexer when using the sort command.
In mkdb/index.c:

#ifdef NEW_STYLE_BIN_SORT
#define SORT_COMMAND "sort -o %s -k 5,5 -k 4,4n -t : %s"
#else
#define SORT_COMMAND "sort -o %s +4 +3 -t : %s "
#endif

Just add before those lines:

#define NEW_STYLE_BIN_SORT

Run a

make clean && make && make install