Cannot upload forms using ODK-X-SuiteCase 2.1.6


I have successfully installed ODK-X 2.1.6 on AWS following up the guidelines here

I could login web ui with ldap user. I could authenticate ldap user on ODK-X Table 2.1.6 installed on my android phone. However, I could not upload my forms using ODK-X-Suitecase 2.1.6 by executing this command: java -jar ./bin/ODK-X_Suitcase_v2.1.6.jar -cloudEndpointUrl $AGGREGATE_URL -username $AGGREGATE_USERNAME -password $AGGREGATE_PASSWORD -appId $AGGREGATE_APP_ID -dataVersion 2 -upload -path <PATH_TO_TABLES> -tableId <TABLE_ID>

This is output log of the command:

Uploading tables: adult_release
getTables: agg uri is
getTables: result is {“tables”:,“hasMoreResults”:false,“webSafeResumeCursor”:null,“webSafeRefetchCursor”:null,“webSafeBackwardCursor”:null,“appLevelManifestETag”:null,“hasPriorResults”:false}
getPrivilegesInfo: agg uri is
getPrivilegesInfo: result is
getTables: agg uri is
getTables: result is {“tables”:,“hasMoreResults”:false,“webSafeResumeCursor”:null,“webSafeRefetchCursor”:null,“webSafeBackwardCursor”:null,“appLevelManifestETag”:null,“hasPriorResults”:false}
createTable: agg_uri is
createTable: with object {“orderedColumns”:[{“elementKey”:“data”,“elementType”:“string(5000)”,“elementName”:“data”,“listChildElementKeys”:""},{“elementKey”:“edp_version”,“elementType”:“string”,“elementName”:“edp_version”,“listChildElementKeys”:""}],“tableId”:“adult_release”,“schemaETag”:""}
createTable: result is for tableId adult_release is <!doctype html>HTTP Status 405 ? Method Not Allowedbody {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}

HTTP Status 405 ? Method Not Allowed

Type Status Report

Description The method received in the request-line is known by the origin server but not supported by the target resource.

Apache Tomcat/8.5.55

Error: Please visitCloud Endpointweb interface for error detail.
org.apache.wink.json4j.JSONException: Error occurred during input read.
at org.apache.wink.json4j.internal.Parser.parse(
at org.apache.wink.json4j.internal.Parser.parse(
at org.apache.wink.json4j.JSONObject.(
at org.opendatakit.sync.client.SyncClient.createTable(
at org.opendatakit.sync.client.SyncClient.createTableWithCSVProcessing(
at org.opendatakit.sync.client.SyncClient.createTableWithCSV(
at org.opendatakit.sync.client.SyncClient.pushAllDataToUri(
at javax.swing.SwingWorker$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: Unexpected character ‘<’ on line 1, column 1
at org.apache.wink.json4j.internal.Parser.parse(

This is tomcat access log of sync endpoint:
root@85c76e7a20df:/usr/local/tomcat/logs# cat localhost_access_log.2020-06-03.txt - - [03/Jun/2020:03:19:43 +0000] “GET /odktables/default/privilegesInfo HTTP/1.0” 200 153 - - [03/Jun/2020:03:19:44 +0000] “GET /odktables/default/tables HTTP/1.0” 200 129 - - [03/Jun/2020:03:19:44 +0000] “PUT /odktables/default/tables/adult_release HTTP/1.0” 405 681

This is nginx logs: - - [03/Jun/2020:03:19:43 +0000] “GET /odktables/default/tables HTTP/1.1” 401 746 “-” “Apache-HttpClient/4.5.9 (Java/1.8.0_162)” “-” - tran.bui [03/Jun/2020:03:19:43 +0000] “GET /odktables/default/tables HTTP/1.1” 200 129 “-” “Apache-HttpClient/4.5.9 (Java/1.8.0_162)” “-” - tran.bui [03/Jun/2020:03:19:43 +0000] “GET /odktables/default/privilegesInfo HTTP/1.1” 200 153 “-” “Apache-HttpClient/4.5.9 (Java/1.8.0_162)” “-” - tran.bui [03/Jun/2020:03:19:44 +0000] “GET /odktables/default/tables HTTP/1.1” 200 129 “-” “Apache-HttpClient/4.5.9 (Java/1.8.0_162)” “-” - tran.bui [03/Jun/2020:03:19:44 +0000] “PUT /odktables/default/tables/adult_release HTTP/1.1” 405 681 “-” “Apache-HttpClient/4.5.9 (Java/1.8.0_162)” “-”

It seems that PUT request was rejected by sync endpoint.

Hi @Thien_Mai! As you are new to the community, when you get a chance, please introduce yourself here. I’d also encourage you to add a real picture as your avatar because it helps build community!

So it looks like you are trying to upload data using suitcase. Did you already reset the app server to have these tables? See instructions here:

Thanks @elmps2018. I realized that I uploaded the tables using ROLE_SYNCHRONIZE_TABLES user. When I tried with ROLE_ADMINISTER_TABLES, it worked.

1 Like