Forums Register Login Forgot your login/password? Search
WARNING: could not open pipe (GetLastError()=2)
Common forum | 1 | 2 | 3 | 4 | 5 | ... | 450 | 451 | 452 | 453 | next »» | Create new thread
|
andre.maldonado
Name: André Almeida Maldonado |
2008-09-17 15:08:16
| reply! Hy all. When I try to run the indexer: indexer --all --config C:\busca\Sphinx\imoveis.conf --rotate I'm getting the error: WARNING: could not open pipe (GetLastError()=2) And the index isn't rotated. What can be wrong? Thank's |
|
Arantor
Name: Pete Spicer |
to: andre.maldonado, 2008-09-17 16:30:27
| reply! > Hy all. > > When I try to run the indexer: > > indexer --all --config C:\busca\Sphinx\imoveis.conf --rotate > > I'm getting the error: > > WARNING: could not open pipe (GetLastError()=2) > > And the index isn't rotated. What can be wrong? > > Thank's I suspect you're using a XMLPipe source and for whatever reason it is unable to open the connection to it. Under the source details in your configuration, do you have xmlpipe_command set, and does it have a command in it that you can run from the command line? For example, simply having "xmlpipe_command = C:\path\to\myindex.xml" won't work, you need to give it a command to run. If your source is a pre-made file, then something like: xmlpipe_command = type C:\path\to\myindex.xml would work. |
|
andre.maldonado
Name: André Almeida Maldonado |
to: Arantor, 2008-09-17 17:30:22
| reply! In fact I have a normal command. The only thing that the indexer can't do is rotate the index. When indexer finishes I got a few files with a "new" name, something like this: imoveis.new.spi What can I do? |
|
Arantor
Name: Pete Spicer |
to: andre.maldonado, 2008-09-17 18:30:46
| reply! > In fact I have a normal command. The only thing that the indexer can't do is rotate the > index. > > When indexer finishes I got a few files with a "new" name, something like this: > imoveis.new.spi > > What can I do? Well, what the rotate option is doing is switching the files (switching imoveis.new.spi to imoveis.spi etc) then quick-restarting searchd. In this case, the new index is ready to roll but isn't being switched in with the old ones being switched out. It is possible to do this yourself manually, however this isn't practical every time. All you need to do is stop searchd, rename all the files and then restart it. A couple of possibilities spring to mind as to why this is happening: 1. searchd has a query that is holding it up (or has hung) so the relevant files are locked. 2. File permissions for the user running indexer are not enough to delete and rename files in that folder. |
|
andre.maldonado
Name: André Almeida Maldonado |
to: Arantor, 2008-09-17 18:49:32
| reply! I'll try what you say, but I think that is possibly something with searchd.pid file. The only place in the code where this message can be returned is here: #if USE_WINDOWS char szPipeName [64]; sprintf ( szPipeName, "\\\\.\\pipe\\searchd_%d", iPID ); HANDLE hPipe = INVALID_HANDLE_VALUE; while ( hPipe == INVALID_HANDLE_VALUE ) { hPipe = CreateFile ( szPipeName, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL ); if ( hPipe == INVALID_HANDLE_VALUE ) { if ( GetLastError () != ERROR_PIPE_BUSY ) { fprintf ( stdout, "WARNING: could not open pipe (GetLastError()=%d)\n", GetLastError () ); break; } if ( !WaitNamedPipe ( szPipeName, 1000 ) ) { fprintf ( stdout, "WARNING: could not open pipe (GetLastError()=%d)\n", GetLastError () ); break; } } } Some clue? Thank's |
|
Arantor
Name: Pete Spicer |
to: andre.maldonado, 2008-09-17 19:11:45
| reply! > I'll try what you say, but I think that is possibly something with searchd.pid file. The > only place in the code where this message can be returned is here: Seems to be having trouble opening the PID file then, again possibly a permissions issue, since IIRC what happens is that the file is updated. When altering the service via the Services window (in MMC), it's running with the rights assigned under Windows, however when running as indexer, in all probability it's running a lower-privileged user that may not have rights to edit the PID file. Still, as an interim measure, stopping/renaming/restarting should get you going again but then we can investigate preventing it happening again. I'd never looked into the mechanics behind this too much; since on my Windows dev box, for reasons I won't go into, I still use FAT32 and thus all processes can access all files, and on my Linux production server, searchd and indexer run under a separate user account. > > #if USE_WINDOWS > char szPipeName [64]; > sprintf ( szPipeName, "\\\\.\\pipe\\searchd_%d", iPID ); > > HANDLE hPipe = INVALID_HANDLE_VALUE; > > while ( hPipe == INVALID_HANDLE_VALUE ) > { > hPipe = CreateFile ( szPipeName, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL ); > > if ( hPipe == INVALID_HANDLE_VALUE ) > { > if ( GetLastError () != ERROR_PIPE_BUSY ) > { > fprintf ( stdout, "WARNING: could not open pipe (GetLastError()=%d)\n", GetLastError () ); > break; > } > > if ( !WaitNamedPipe ( szPipeName, 1000 ) ) > { > fprintf ( stdout, "WARNING: could not open pipe (GetLastError()=%d)\n", GetLastError () ); > break; > } > } > } > > Some clue? > > Thank's |
Common forum | 1 | 2 | 3 | 4 | 5 | ... | 450 | 451 | 452 | 453 | next »» | Create new thread