{"action":"created","issue":{"url":"https://api.github.com/repos/wtsi-npg/baton/issues/140","repository_url":"https://api.github.com/repos/wtsi-npg/baton","labels_url":"https://api.github.com/repos/wtsi-npg/baton/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/wtsi-npg/baton/issues/140/comments","events_url":"https://api.github.com/repos/wtsi-npg/baton/issues/140/events","html_url":"https://github.com/wtsi-npg/baton/issues/140","id":127449965,"number":140,"title":"\"Failed to pack replicate object\" error","user":{"login":"colin-nolan","id":1138107,"avatar_url":"https://avatars.githubusercontent.com/u/1138107?v=3","gravatar_id":"","url":"https://api.github.com/users/colin-nolan","html_url":"https://github.com/colin-nolan","followers_url":"https://api.github.com/users/colin-nolan/followers","following_url":"https://api.github.com/users/colin-nolan/following{/other_user}","gists_url":"https://api.github.com/users/colin-nolan/gists{/gist_id}","starred_url":"https://api.github.com/users/colin-nolan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colin-nolan/subscriptions","organizations_url":"https://api.github.com/users/colin-nolan/orgs","repos_url":"https://api.github.com/users/colin-nolan/repos","events_url":"https://api.github.com/users/colin-nolan/events{/privacy}","received_events_url":"https://api.github.com/users/colin-nolan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wtsi-npg/baton/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/wtsi-npg/baton/milestones/5","html_url":"https://github.com/wtsi-npg/baton/milestones/0.16.2","labels_url":"https://api.github.com/repos/wtsi-npg/baton/milestones/5/labels","id":1676054,"number":5,"title":"0.16.2","description":"Hotfix release branched from master to fix #140 for HGI","creator":{"login":"keithj","id":102847,"avatar_url":"https://avatars.githubusercontent.com/u/102847?v=3","gravatar_id":"","url":"https://api.github.com/users/keithj","html_url":"https://github.com/keithj","followers_url":"https://api.github.com/users/keithj/followers","following_url":"https://api.github.com/users/keithj/following{/other_user}","gists_url":"https://api.github.com/users/keithj/gists{/gist_id}","starred_url":"https://api.github.com/users/keithj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keithj/subscriptions","organizations_url":"https://api.github.com/users/keithj/orgs","repos_url":"https://api.github.com/users/keithj/repos","events_url":"https://api.github.com/users/keithj/events{/privacy}","received_events_url":"https://api.github.com/users/keithj/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2016-03-31T13:36:53Z","updated_at":"2016-03-31T16:33:28Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2016-01-19T13:47:31Z","updated_at":"2016-04-01T16:44:01Z","closed_at":null,"body":"As discussed in person earlier, I am encountering a problem where baton is raising a \"Failed to pack replicate object\" error when used to get information about replicas (using `--replicates`). This error appears in the setup I am using if any of the replica's checksums are not stored on iRODS. \r\n\r\n[iRODS v3.3.1 iCAT server](https://hub.docker.com/r/agaveapi/irods/) running in Docker container:\r\n`docker run -d -p 1247:1247 agaveapi/irods:3.3.1`\r\n```\r\nirodsUserName rods\r\nirodsHost <your_docker_ip>\r\nirodsPort 1247\r\nirodsZone iplant\r\n# Password: rods\r\n```\r\n\r\nMWE (ran in [dockerised build of baton](https://github.com/wtsi-hgi/docker-baton) from wtsi-npg master branch):\r\n```\r\nroot@5d09b5ae5dde:/scripts# iput test\r\nroot@5d09b5ae5dde:/scripts# ils -L\r\n/iplant/home/rods:\r\n  rods              0 demoResc                        0 2016-01-19.13:13 & test\r\n            generic    /data/home/rods/test\r\nroot@5d09b5ae5dde:/scripts# jq -n '{\"collection\": \"/iplant/home/rods\", \"data_object\": \"test\"}' | baton-list --replicate --debug | jq \".\"\r\n2016-01-19T13:13:45 DEBUG Preparing a query to select 2 columns.\r\n2016-01-19T13:13:45 DEBUG Adding condition 1 of 2: COLL_NAME = /iplant/home/rods.\r\n2016-01-19T13:13:45 DEBUG Made string 0 of 2: op: = value: /iplant/home/rods, len 17, total len 22 [= '/iplant/home/rods'].\r\n2016-01-19T13:13:45 DEBUG Adding condition 1 of 2: DATA_NAME = test.\r\n2016-01-19T13:13:45 DEBUG Made string 1 of 2: op: = value: test, len 4, total len 9 [= 'test'].\r\n2016-01-19T13:13:45 DEBUG Adding condition 1 of 1: DATA_REPL_STATUS = 1.\r\n2016-01-19T13:13:45 DEBUG Made string 0 of 1: op: = value: 1, len 1, total len 6 [= '1'].\r\n2016-01-19T13:13:45 DEBUG Running query ....\r\n2016-01-19T13:13:45 DEBUG Attempting to get chunk 0 of query.\r\n2016-01-19T13:13:45 DEBUG Successfully fetched chunk 0 of query.\r\n2016-01-19T13:13:45 DEBUG Converting 1 rows of results to JSON.\r\n2016-01-19T13:13:45 DEBUG Converting row 0 of 1 to JSON.\r\n2016-01-19T13:13:45 DEBUG Encoding column 0 'collection' value '/iplant/home/rods' as JSON.\r\n2016-01-19T13:13:45 DEBUG Encoding column 1 'data_object' value 'test' as JSON.\r\n2016-01-19T13:13:45 DEBUG Obtained a total of 1 JSON results in 1 chunks.\r\n2016-01-19T13:13:45 DEBUG Preparing a query to select 5 columns.\r\n2016-01-19T13:13:45 DEBUG Adding condition 1 of 2: COLL_NAME = /iplant/home/rods.\r\n2016-01-19T13:13:45 DEBUG Made string 0 of 2: op: = value: /iplant/home/rods, len 17, total len 22 [= '/iplant/home/rods'].\r\n2016-01-19T13:13:45 DEBUG Adding condition 1 of 2: DATA_NAME = test.\r\n2016-01-19T13:13:45 DEBUG Made string 1 of 2: op: = value: test, len 4, total len 9 [= 'test'].\r\n2016-01-19T13:13:45 DEBUG Using zone hint '/iplant/home/rods/test'.\r\n2016-01-19T13:13:45 DEBUG Running query ....\r\n2016-01-19T13:13:45 DEBUG Attempting to get chunk 0 of query.\r\n2016-01-19T13:13:45 DEBUG Successfully fetched chunk 0 of query.\r\n2016-01-19T13:13:45 DEBUG Converting 1 rows of results to JSON.\r\n2016-01-19T13:13:45 DEBUG Converting row 0 of 1 to JSON.\r\n2016-01-19T13:13:45 DEBUG Encoding column 0 'valid' value '1' as JSON.\r\n2016-01-19T13:13:45 DEBUG Encoding column 1 'number' value '0' as JSON.\r\n2016-01-19T13:13:45 DEBUG Encoding column 2 'checksum' value '' as JSON.\r\n2016-01-19T13:13:45 DEBUG Encoding column 3 'resource' value 'demoResc' as JSON.\r\n2016-01-19T13:13:45 DEBUG Encoding column 4 'location' value 'docker.example.com' as JSON.\r\n2016-01-19T13:13:45 DEBUG Obtained a total of 1 JSON results in 1 chunks.\r\n2016-01-19T13:13:45 ERROR Failed to list replicates of '/iplant/home/rods/test': error -1 Failed to pack replicate object.\r\n2016-01-19T13:13:45 ERROR Failed to pack replicate object.\r\n2016-01-19T13:13:45 DEBUG Processed 1 items with 1 errors.\r\n{\r\n  \"collection\": \"/iplant/home/rods\",\r\n  \"data_object\": \"test\",\r\n  \"error\": {\r\n    \"message\": \"Failed to pack replicate object\",\r\n    \"code\": -1\r\n  }\r\n}\r\nroot@5d09b5ae5dde:/scripts# ichksum test\r\n    test                              d41d8cd98f00b204e9800998ecf8427e\r\nTotal checksum performed = 1, Failed checksum = 0\r\nroot@5d09b5ae5dde:/scripts# ils -L\r\n/iplant/home/rods:\r\n  rods              0 demoResc                        0 2016-01-19.13:13 & test\r\n    d41d8cd98f00b204e9800998ecf8427e        generic    /data/home/rods/test\r\nroot@5d09b5ae5dde:/scripts# jq -n '{\"collection\": \"/iplant/home/rods\", \"data_object\": \"test\"}' | baton-list --replicate --debug | jq \".\"\r\n2016-01-19T13:14:06 DEBUG Preparing a query to select 2 columns.\r\n2016-01-19T13:14:06 DEBUG Adding condition 1 of 2: COLL_NAME = /iplant/home/rods.\r\n2016-01-19T13:14:06 DEBUG Made string 0 of 2: op: = value: /iplant/home/rods, len 17, total len 22 [= '/iplant/home/rods'].\r\n2016-01-19T13:14:06 DEBUG Adding condition 1 of 2: DATA_NAME = test.\r\n2016-01-19T13:14:06 DEBUG Made string 1 of 2: op: = value: test, len 4, total len 9 [= 'test'].\r\n2016-01-19T13:14:06 DEBUG Adding condition 1 of 1: DATA_REPL_STATUS = 1.\r\n2016-01-19T13:14:06 DEBUG Made string 0 of 1: op: = value: 1, len 1, total len 6 [= '1'].\r\n2016-01-19T13:14:06 DEBUG Running query ....\r\n2016-01-19T13:14:06 DEBUG Attempting to get chunk 0 of query.\r\n2016-01-19T13:14:06 DEBUG Successfully fetched chunk 0 of query.\r\n2016-01-19T13:14:06 DEBUG Converting 1 rows of results to JSON.\r\n2016-01-19T13:14:06 DEBUG Converting row 0 of 1 to JSON.\r\n2016-01-19T13:14:06 DEBUG Encoding column 0 'collection' value '/iplant/home/rods' as JSON.\r\n2016-01-19T13:14:06 DEBUG Encoding column 1 'data_object' value 'test' as JSON.\r\n2016-01-19T13:14:06 DEBUG Obtained a total of 1 JSON results in 1 chunks.\r\n2016-01-19T13:14:06 DEBUG Preparing a query to select 5 columns.\r\n2016-01-19T13:14:06 DEBUG Adding condition 1 of 2: COLL_NAME = /iplant/home/rods.\r\n2016-01-19T13:14:06 DEBUG Made string 0 of 2: op: = value: /iplant/home/rods, len 17, total len 22 [= '/iplant/home/rods'].\r\n2016-01-19T13:14:06 DEBUG Adding condition 1 of 2: DATA_NAME = test.\r\n2016-01-19T13:14:06 DEBUG Made string 1 of 2: op: = value: test, len 4, total len 9 [= 'test'].\r\n2016-01-19T13:14:06 DEBUG Using zone hint '/iplant/home/rods/test'.\r\n2016-01-19T13:14:06 DEBUG Running query ....\r\n2016-01-19T13:14:06 DEBUG Attempting to get chunk 0 of query.\r\n2016-01-19T13:14:06 DEBUG Successfully fetched chunk 0 of query.\r\n2016-01-19T13:14:06 DEBUG Converting 1 rows of results to JSON.\r\n2016-01-19T13:14:06 DEBUG Converting row 0 of 1 to JSON.\r\n2016-01-19T13:14:06 DEBUG Encoding column 0 'valid' value '1' as JSON.\r\n2016-01-19T13:14:06 DEBUG Encoding column 1 'number' value '0' as JSON.\r\n2016-01-19T13:14:06 DEBUG Encoding column 2 'checksum' value 'd41d8cd98f00b204e9800998ecf8427e' as JSON.\r\n2016-01-19T13:14:06 DEBUG Encoding column 3 'resource' value 'demoResc' as JSON.\r\n2016-01-19T13:14:06 DEBUG Encoding column 4 'location' value 'docker.example.com' as JSON.\r\n2016-01-19T13:14:06 DEBUG Obtained a total of 1 JSON results in 1 chunks.\r\n2016-01-19T13:14:06 DEBUG Obtained replicates of '/iplant/home/rods/test'.\r\n2016-01-19T13:14:06 DEBUG Processed 1 items with 0 errors.\r\n{\r\n  \"collection\": \"/iplant/home/rods\",\r\n  \"data_object\": \"test\",\r\n  \"replicates\": [\r\n    {\r\n      \"resource\": \"demoResc\",\r\n      \"location\": \"docker.example.com\",\r\n      \"checksum\": \"d41d8cd98f00b204e9800998ecf8427e\",\r\n      \"valid\": true,\r\n      \"number\": 0\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nHowever, the same problem is not encountered in the sequencing iRODS server (baton 0.15.0 install on hgi-mercury-farm3 used):\r\n```\r\ncn13@hgi-mercury-farm3:~$ iput test\r\ncn13@hgi-mercury-farm3:~$ ils -L\r\n/Sanger1/home/cn13:\r\n  cn13              0 wtsiusers                       0 2016-01-19.13:12 & test\r\n            generic    /data/home/cn13/test\r\n  C- /Sanger1/home/cn13/myCollection\r\ncn13@hgi-mercury-farm3:~$ jq -n '{\"collection\": \"/Sanger1/home/cn13\", \"data_object\": \"test\"}' | baton-list --replicate --debug | jq \".\"\r\n2016-01-19T13:12:50 DEBUG Preparing a query to select 2 columns.\r\n2016-01-19T13:12:50 DEBUG Adding condition 1 of 2: COLL_NAME = /Sanger1/home/cn13.\r\n2016-01-19T13:12:50 DEBUG Made string 0 of 2: op: = value: /Sanger1/home/cn13, len 18, total len 23 [= '/Sanger1/home/cn13'].\r\n2016-01-19T13:12:50 DEBUG Adding condition 1 of 2: DATA_NAME = test.\r\n2016-01-19T13:12:50 DEBUG Made string 1 of 2: op: = value: test, len 4, total len 9 [= 'test'].\r\n2016-01-19T13:12:50 DEBUG Adding condition 1 of 1: DATA_REPL_STATUS = 1.\r\n2016-01-19T13:12:50 DEBUG Made string 0 of 1: op: = value: 1, len 1, total len 6 [= '1'].\r\n2016-01-19T13:12:50 DEBUG Running query ....\r\n2016-01-19T13:12:50 DEBUG Attempting to get chunk 0 of query.\r\n2016-01-19T13:12:50 DEBUG Successfully fetched chunk 0 of query.\r\n2016-01-19T13:12:50 DEBUG Converting 1 rows of results to JSON.\r\n2016-01-19T13:12:50 DEBUG Converting row 0 of 1 to JSON.\r\n2016-01-19T13:12:50 DEBUG Encoding column 0 'collection' value '/Sanger1/home/cn13' as JSON.\r\n2016-01-19T13:12:50 DEBUG Encoding column 1 'data_object' value 'test' as JSON.\r\n2016-01-19T13:12:50 DEBUG Obtained a total of 1 JSON results in 1 chunks.\r\n2016-01-19T13:12:50 DEBUG Preparing a query to select 3 columns.\r\n2016-01-19T13:12:50 DEBUG Adding condition 1 of 2: COLL_NAME = /Sanger1/home/cn13.\r\n2016-01-19T13:12:50 DEBUG Made string 0 of 2: op: = value: /Sanger1/home/cn13, len 18, total len 23 [= '/Sanger1/home/cn13'].\r\n2016-01-19T13:12:50 DEBUG Adding condition 1 of 2: DATA_NAME = test.\r\n2016-01-19T13:12:50 DEBUG Made string 1 of 2: op: = value: test, len 4, total len 9 [= 'test'].\r\n2016-01-19T13:12:50 DEBUG Using zone hint '/Sanger1/home/cn13/test'.\r\n2016-01-19T13:12:50 DEBUG Running query ....\r\n2016-01-19T13:12:50 DEBUG Attempting to get chunk 0 of query.\r\n2016-01-19T13:12:50 DEBUG Successfully fetched chunk 0 of query.\r\n2016-01-19T13:12:50 DEBUG Converting 1 rows of results to JSON.\r\n2016-01-19T13:12:50 DEBUG Converting row 0 of 1 to JSON.\r\n2016-01-19T13:12:50 DEBUG Encoding column 0 'valid' value '1' as JSON.\r\n2016-01-19T13:12:50 DEBUG Encoding column 1 'number' value '0' as JSON.\r\n2016-01-19T13:12:50 DEBUG Encoding column 2 'checksum' value '' as JSON.\r\n2016-01-19T13:12:50 DEBUG Obtained a total of 1 JSON results in 1 chunks.\r\n2016-01-19T13:12:50 DEBUG Obtained replicates of '/Sanger1/home/cn13/test'.\r\n2016-01-19T13:12:50 DEBUG Processed 1 items with 0 errors.\r\n{\r\n  \"replicate\": [\r\n    {\r\n      \"valid\": true,\r\n      \"number\": 0\r\n    }\r\n  ],\r\n  \"data_object\": \"test\",\r\n  \"collection\": \"/Sanger1/home/cn13\"\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/wtsi-npg/baton/issues/comments/204466284","html_url":"https://github.com/wtsi-npg/baton/issues/140#issuecomment-204466284","issue_url":"https://api.github.com/repos/wtsi-npg/baton/issues/140","id":204466284,"user":{"login":"keithj","id":102847,"avatar_url":"https://avatars.githubusercontent.com/u/102847?v=3","gravatar_id":"","url":"https://api.github.com/users/keithj","html_url":"https://github.com/keithj","followers_url":"https://api.github.com/users/keithj/followers","following_url":"https://api.github.com/users/keithj/following{/other_user}","gists_url":"https://api.github.com/users/keithj/gists{/gist_id}","starred_url":"https://api.github.com/users/keithj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keithj/subscriptions","organizations_url":"https://api.github.com/users/keithj/orgs","repos_url":"https://api.github.com/users/keithj/repos","events_url":"https://api.github.com/users/keithj/events{/privacy}","received_events_url":"https://api.github.com/users/keithj/received_events","type":"User","site_admin":false},"created_at":"2016-04-01T16:44:01Z","updated_at":"2016-04-01T16:44:01Z","body":"Fixed by #153"}}