View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
08996Bug reportsRemoteControlpublic2014-05-25 22:00
Reporterrgrela Assigned Toc_schmitz  
PrioritynormalSeverityblock 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.05+ 
Summary08996: Error 500 to get list_participants by API
Description

We get the following error in version 2.05+ to use api "list_participants"

2014-04-23-10.37.25 ERROR - XmlRpcException list_participants encuesta 14682: org.apache.xmlrpc.XmlRpcException: Failed to create input stream: Server returned HTTP response code: 500 for URL: http://encuestas.d.novagaliciabanco.es/index.php/admin/remotecontrol

This is working correctly in 2.00+ version. Url Remote control is accesible and is working ok. Can you say us about this error? do we have to make some change from 2.00 to 2.05 to do the "list_participants" work?

thanks

Additional Information

We have to change other methods too for example: in "list_questions" and "get_question_properties" we have to change cast type from String to Integer

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)Versión 2.05+ Build 140414
I will donate to the project if issue is resolvedNo
BrowserAPI
Database type & versionMysql
Server OS (if known)Linux
Webserver software & version (if known)Apache
PHP Version5.3.17

Relationships

related to 07754 closedtrougakoss Retrieving list of participants with additional token information 

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2014-04-24 21:48

administrator   ~29875

Last edited: 2014-04-25 08:47

Try to raise your PHP memory limit and report back if that helped.

rgrela

rgrela

2014-04-29 09:20

reporter   ~29901

We have raised the php memory limit and we get the same error.

Developers say us that:

  • This works:

Object[] params = new Object[] {sessionId, surveyId, inicio, numResultados, Boolean.FALSE};
aux = (Object) client.execute("list_participants", params);
result = (Object[]) aux;

  • But this doesn't work (extended attributes):

Object[] atributes = new Object[] {"attribute_1", "attribute_2", "attribute_3", "attribute_4"};
Object[] params = new Object[] {sessionId, surveyId, inicio, numResultados, Boolean.FALSE, atributes};

aux = (Object) client.execute("list_participants", params);
result = (Object[]) aux;

The error is:
28/04/2014 12:53:27,327 13361969 ERROR [WorkManager(4)-5] STDERR - org.apache.xmlrpc.XmlRpcException: Failed to create input stream: Server returned HTTP response code: 500 for URL: http://encuestas.d.novagaliciabanco.es/index.php/admin/remotecontrol
28/04/2014 12:53:27,327 13361969 ERROR [WorkManager(4)-5] STDERR - at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.getInputStream(XmlRpcSunHttpTransport.java:60)
28/04/2014 12:53:27,327 13361969 ERROR [WorkManager(4)-5] STDERR - at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:141)
28/04/2014 12:53:27,327 13361969 ERROR [WorkManager(4)-5] STDERR - at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:94)
28/04/2014 12:53:27,327 13361969 ERROR [WorkManager(4)-5] STDERR - at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:39)
28/04/2014 12:53:27,327 13361969 ERROR [WorkManager(4)-5] STDERR - at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
28/04/2014 12:53:27,327 13361969 ERROR [WorkManager(4)-5] STDERR - at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
28/04/2014 12:53:27,327 13361969 ERROR [WorkManager(4)-5] STDERR - at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)
28/04/2014 12:53:27,327 13361969 ERROR [WorkManager(4)-5] STDERR - at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)
28/04/2014 12:53:27,327 13361969 ERROR [WorkManager(4)-5] STDERR - at es.caixagalicia.ifai.batch.encuestas.servicios.impl.LimeSurveyServiceImpl.listParticipants(LimeSurveyServiceImpl.java:339)

28/04/2014 12:53:27,343 13361985 ERROR [WorkManager(4)-5] STDERR - Caused by:
28/04/2014 12:53:27,343 13361985 ERROR [WorkManager(4)-5] STDERR - java.io.IOException: Server returned HTTP response code: 500 for URL: http://encuestas.d.novagaliciabanco.es/index.php/admin/remotecontrol

This is working correctly in 2.00+ version.

Some idea?

c_schmitz

c_schmitz

2014-05-02 09:51

administrator   ~29919

Question is what the server really gives back as response. You are showing some error output by your software but not the raw server responses. Can you find that out?

rgrela

rgrela

2014-05-02 10:16

reporter   ~29923

This is the limesurvey server error (500) for a request with extended attributes:

10.11.34.94 - - [28/Apr/2014:12:48:10 +0200] "POST /index.php/admin/remotecontrol HTTP/1.1" 500 - "-" "Apache XML RPC 3.0 (Sun HTTP Transport)"
10.11.34.94 - - [28/Apr/2014:12:48:11 +0200] "POST /index.php/admin/remotecontrol HTTP/1.1" 500 - "-" "Apache XML RPC 3.0 (Sun HTTP Transport)"

With other parameters, without extended attributes the response is correct (200):

10.11.34.94 - - [28/Apr/2014:12:47:58 +0200] "POST /index.php/admin/remotecontrol HTTP/1.1" 200 142 "-" "Apache XML RPC 3.0 (Sun HTTP Transport)"
10.11.34.94 - - [28/Apr/2014:12:48:00 +0200] "POST /index.php/admin/remotecontrol HTTP/1.1" 200 142 "-" "Apache XML RPC 3.0 (Sun HTTP Transport)"

Should we change the code is the new version 2.05+ for extended attributes?

Thank you very much,
Rocio

c_schmitz

c_schmitz

2014-05-02 10:36

administrator   ~29924

An error 500 could be anything.

You will need to check your server error logs why there is an error 500. You should also try to activate debug mode in /application/config/config.php and see if you get a more detailed error on raw output.

Please report back.

rgrela

rgrela

2014-05-02 13:10

reporter   ~29934

Hi:
We can see this php error (in call with extended attributes):

[Fri May 02 12:52:43 2014] [error] [client 172.16.56.240] PHP Fatal error: Call to undefined method Zend_XmlRpc_Server_Fault::printXml() in /opt/limesurvey/application/controllers/admin/remotecontrol.php on line 50
[Fri May 02 12:52:43 2014] [error] [client 172.16.56.240] PHP Fatal error: Call to undefined method Zend_XmlRpc_Server_Fault::printXml() in /opt/limesurvey/application/controllers/admin/remotecontrol.php on line 50

Thank you
Rocio Grela

c_schmitz

c_schmitz

2014-05-02 13:50

administrator   ~29940

Thank you - but that is still too little information. Can you activate debug mode as described so we can maybe see more what's going wrong?

rgrela

rgrela

2014-05-07 13:47

reporter   ~29965

Sorry, we can see only this error:

PHP Fatal error: Call to undefined method Zend_XmlRpc_Server_Fault::printXml() in /opt/limesurvey/application/controllers/admin/remotecontrol.php on line 50

rgrela

rgrela

2014-05-15 13:40

reporter   ~29971

Hi:
We had done a change in this script
/opt/limesurvey/application/controllers/admin/remotecontrol.php

This:
$result = $this->xmlrpc->handle();
$result->printXml();
By this:
echo $this->xmlrpc->handle();

And now we get the following error in our aplication:
2014-05-15-13.03.01 ERROR - XmlRpcException list_participants encuesta 35242: org.apache.xmlrpc.XmlRpcException: Calling parameters do not match signature
2014-05-15-13.03.01 ERROR - XmlRpcException list_participants encuesta 36767: org.apache.xmlrpc.XmlRpcException: Calling parameters do not match signature

2014-05-15-13.27.36 ERROR - XmlRpcException export_responses encuesta 34371: org.apache.xmlrpc.XmlRpcException: Failed to create input stream: Server returned HTTP response code: 500 for URL: http://encuestas.d.novagaliciabanco.es/index.php/admin/remotecontrol
2014-05-15-13.27.38 ERROR - XmlRpcException export_responses encuesta 34798: org.apache.xmlrpc.XmlRpcException: Failed to create input stream: Server returned HTTP response code: 500 for URL: http://encuestas.d.novagaliciabanco.es/index.php/admin/remotecontrol

An get this errors in the log file:

172.16.56.240 - - [15/May/2014:13:27:37 +0200] "POST /index.php/admin/remotecontrol HTTP/1.1" 500 24963 "-" "Apache XML RPC 3.0 (Sun HTTP Transport)"
172.16.56.240 - - [15/May/2014:13:27:38 +0200] "POST /index.php/admin/remotecontrol HTTP/1.1" 200 228 "-" "Apache XML RPC 3.0 (Sun HTTP Transport)"
172.16.56.240 - - [15/May/2014:13:27:38 +0200] "POST /index.php/admin/remotecontrol HTTP/1.1" 500 27093 "-" "Apache XML RPC 3.0 (Sun HTTP Transport)"

c_schmitz

c_schmitz

2014-05-20 13:21

administrator   ~29997

The description of the function is

list_participants($sSessionKey, $iSurveyID, $iStart=0, $iLimit=10, $bUnused=false)

You are trying to add an array of attributes, which obviously does not work because it is not supported.

rgrela

rgrela

2014-05-20 13:50

reporter   ~30000

Have you changed the Api in the Limesurvey 2.05+? in 2.00 it was working correctly.
The official manual seems that the extended attributes are supported.
Does this functionality will be added to version 2.05 ? Otherwise we will have to remove our developments

http://manual.limesurvey.org/RemoteControl_2_API#list_participants
list_participants

Parameters:

sSessionKey (string) - Auth credentials
iSurveyID (int) - Id of the survey to list participants
iStart (int) - Start id of the token list
iLimit (int) - Number of participants to return
bUnused (bool) - If you want unused tokensm, set true
aAttributes(bool|array) An array of extended attributes that can be requested, besides the default ones (default value to false)

c_schmitz

c_schmitz

2014-05-20 15:23

administrator   ~30009

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=14218

c_schmitz

c_schmitz

2014-05-20 15:24

administrator   ~30010

Looks like this was a fix in 2.00 that was not ported to 2.05. Will be fixed in next build.

Related Changesets

LimeSurvey: master 05827188

2014-05-20 13:24:29

c_schmitz

Details Diff
Fixed issue 08996: Retrieving list of participants with additional token information not possible Affected Issues
08996
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File

Issue History

Date Modified Username Field Change
2014-04-24 10:54 rgrela New Issue
2014-04-24 21:48 c_schmitz Note Added: 29875
2014-04-25 08:47 c_schmitz Assigned To => c_schmitz
2014-04-25 08:47 c_schmitz Status new => feedback
2014-04-25 08:47 c_schmitz Note Edited: 29875
2014-04-29 09:20 rgrela Note Added: 29901
2014-04-29 09:20 rgrela Status feedback => assigned
2014-05-02 09:51 c_schmitz Note Added: 29919
2014-05-02 09:51 c_schmitz Status assigned => feedback
2014-05-02 10:16 rgrela Note Added: 29923
2014-05-02 10:16 rgrela Status feedback => assigned
2014-05-02 10:36 c_schmitz Note Added: 29924
2014-05-02 10:36 c_schmitz Status assigned => feedback
2014-05-02 13:10 rgrela Note Added: 29934
2014-05-02 13:10 rgrela Status feedback => assigned
2014-05-02 13:50 c_schmitz Note Added: 29940
2014-05-02 13:50 c_schmitz Status assigned => feedback
2014-05-07 13:47 rgrela Note Added: 29965
2014-05-07 13:47 rgrela Status feedback => assigned
2014-05-15 13:40 rgrela Note Added: 29971
2014-05-20 13:21 c_schmitz Note Added: 29997
2014-05-20 13:21 c_schmitz Status assigned => closed
2014-05-20 13:21 c_schmitz Resolution open => not fixable
2014-05-20 13:50 rgrela Note Added: 30000
2014-05-20 13:50 rgrela Status closed => feedback
2014-05-20 13:50 rgrela Resolution not fixable => reopened
2014-05-20 15:22 c_schmitz Relationship added related to 07754
2014-05-20 15:23 c_schmitz Changeset attached => LimeSurvey master 05827188
2014-05-20 15:23 c_schmitz Note Added: 30009
2014-05-20 15:24 c_schmitz Note Added: 30010
2014-05-20 15:24 c_schmitz Status feedback => resolved
2014-05-20 15:24 c_schmitz Fixed in Version => 2.05+
2014-05-20 15:24 c_schmitz Resolution reopened => fixed
2014-05-25 22:00 c_schmitz Status resolved => closed