Uncaught exception 'Zend\XmlRpc\Client\Exception\FaultException' with message 'BAD_NAME: workers:worker_1' when using stop/start from Process object #17
Comments
DId you try any other connector? In my experience Zend XML-RPC is quite buggy. |
Problem also exist with other connectors such as fXmlRpc\Client. |
Hm. And are you sure you have a workers group and a process worker_1 in it? |
Yup, I'm sure of it - otherwise I wouldn't get it in object. I can get info about it but any other action like stop/start won't work. |
Ok, just checked. I will try to look into this in the next fews days, I will keep you posted. Just for curiousity: which is your preferred connector? I am asking because I am going to release an adapter pacakge for http client libraries with custom parser/serializer logic which will probably replace the current fXmlRpc connector and eventually Zend connector as well. |
I'm more attached to Zend Connector right now. |
Thanks. Zend connector is there because it uses both Zend HTTP and XML-RPC component. As soon as the adapter package will be able to use Zend HTTP as a client adapter and Zend XML-RPC as parser (so can use the two decoupled from each other) the direct Zend connector will probably be gone, but that is at least from 2-3 releases from now (also not sure about completely removing it). However always make sure that a popped error appears with other connectors as well, because Zend XML-RPC has some incompatibility issues (like client side variable compatibility check which is clearly a server side task). Also Zend parser is MUCH MORE slower than the ones provided by fXmlRpc. The more you know... |
Good to know - thanks for info :) |
@mostonek Did you solve this? If not, can you please share your configuration with me? (Make sure that any credentials are removed) |
BTW start/stop/etc responsibility has been removed from the I suggest you checking the new version as the old code base was a bit ugly. It is much more clearer now. |
@sagikazarmark no, I had to come around that problem by making that call from my conf go something like that $client = new Zend\XmlRpc\Client(SUPERVISOR_HOST);
$connector = new Indigo\Supervisor\Connector\ZendConnector($client);
$connector->setCredentials(SUPERVISOR_USER, SUPERVISOR_PASS);
$this->supervisor = new Supervisor($connector); and this wont work: $process = $this->supervisor->getProcess('workers:worker_1');
$process->stop(); and I had to do it like that in order to make it run properly: $this->supervisor->stopProcess('workers:worker_1', $wait) I will check new code later when I come back to refactor of my written class :) |
Actually I was curious about your supervisor config. :) I couldn't reproduce this so far, so I thought exactly the same environment could help. Also, can you please give me your supervisor version? This package is compatible with >3.0, but even with 3.0 I encounter issues which occur because of the differences between the docs and the API itself. |
Sorry, little misunderstanding ;) this is supervisor conf:
|
I am not sure that it is possible to start processes like whis. According to this issue it is not obvious for me. I will look into it. Also, your supervisor version, please. |
3.1.3 |
@mostonek I asked about this feature in the referenced issue and @mnaberez answered it. It seems to work fine with his configuration. Based on your configuration you have to start/stop Could you please try this out? Even with the old implementation of the client library (version < 3.0.0), it should work. |
I am closing this issue for now. If the issue still exists, please open it at https://github.com/supervisorphp/supervisor |
// returns Process object
$process = $supervisor->getProcess('workers:worker_1');
$process->stop();
generates this:
PHP Fatal error: Uncaught exception 'Zend\XmlRpc\Client\Exception\FaultException' with message 'BAD_NAME: workers:worker_1' in /home/moston/web/indigophp/vendor/zendframework/zend-xmlrpc/Zend/XmlRpc/Client.php:323
Stack trace:
#0 /home/moston/web/indigophp/vendor/indigophp/supervisor/src/Connector/ZendConnector.php(83): Zend\XmlRpc\Client->call('supervisor.getP...', Array)
#1 /home/moston/web/indigophp/vendor/indigophp/supervisor/src/Process.php(63): Indigo\Supervisor\Connector\ZendConnector->call('supervisor', 'getProcessInfo', Array)
#2 /home/moston/web/indigophp/vendor/indigophp/supervisor/src/Supervisor.php(173): Indigo\Supervisor\Process->construct('workers:worker...', Object(Indigo\Supervisor\Connector\ZendConnector))
#3 /home/moston/web/indigophp/test.php(19): Indigo\Supervisor\Supervisor->getProcess('workers:worker...')
#4 {main}
Next exception 'Indigo\Supervisor\Exception\SupervisorException' with message 'BAD_NAME: workers:worker_1' in /home/moston/web/indigophp/vendor/indigophp/supervisor/src/Connector/ZendCon in /home/moston/web/indigophp/vendor/indigophp/supervisor/src/Connector/ZendConnector.php on line 85
The text was updated successfully, but these errors were encountered: