Вопрос

I am having a problem with Apollo 1.3 running on Windows Server 2008 R2. I am sending STOMP-messages from a web-application (PHP using stomp-php) which are then processed with an application that's running as a Windows Service. This works fine for a while, but out of the blue I am getting the following error when pushing messages to Apollo: "Virtual Host stopped".

Apollo is still running and I can even access the Virtual Host from the Web Interface. The only way to get it running again (I found so far) is to stop the service delete everything in the broker's data-folder and start the service again. Simply restarting the service does not work.

Here is a snippet from apollo.log:

| WARN  | DB operation failed. (entering recovery mode): java.io.FileNotFoundException: C:\apache-apollo-1.3\mybroker\data\dirty.index\MANIFEST-000004 (Das System kann die angegebene Datei nicht finden) | org.apache.activemq.apollo.broker.store.leveldb.LevelDBClient | leveldb store io write
...
| WARN  | Could not recover snapshot of the index: java.io.IOException: Der Prozess kann nicht auf die Datei zugreifen, da ein anderer Prozess einen Teil der Datei gesperrt hat | org.apache.activemq.apollo.broker.store.leveldb.LevelDBClient | leveldb store io write

These are the only exceptions I can find.

I think it's rather a configuration error than a code problem, but here is the relevant code snippet:

$stomp = new \FuseSource\Stomp\Stomp('tcp://127.0.0.1:61613');
$stomp->connect('admin', 'password');

$message = array():

$stomp->send('/queue/messages', json_encode($message));

I am guessing this is triggered when the virtual host is inactive (i.e. receives no messages, no connections) for a certain amount of time. Therefore I was thinking about restarting the apollo-broker once in a while to keep this from triggering, but I am not sure whether this is actually what triggers the Virtual host to stop.

Can anyone tell me why the Virtual Host suddenly stops and what configuration changes I need to make to keep this from happening? I already searched in the documentation, but did not find anything about virtual host lifetime or something similar.

Это было полезно?

Решение

Users of Apollo 1.3 are encouraged to reconfigure the server to use the BDB since that is more stable. Apollo even logs a message on start up to let you know about this:

Using the pure java LevelDB implementation which is still experimental. If 
the JNI version is not available for your platform, please switch to the BDB 
store instead.

Now, just recently Apollo 1.5 was released with support for the JNI version of leveldb on windows. So if you feel like upgrading to 1.5, that should also fix the problem too.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top