It does work when using the aspera client, and the file it tries to download from NCBI can be obtained with wget
correctly. Since the only "unusual" thing I can see is a transparent proxy between ncbi and our server, my best guess is that the issue is caused by something within kns
. Perhaps KHttpFile()
does not work nicely with the proxy. See below for the outout of strace -s1000 -ff prefetch -t http SRR444041
. For some reason, right after the first chunk of data (4344 bytes) is received on fd 3 (with recvfrom()
) from ncbi's webserver, the output file on fd 5 is closed without ever writing to it. After closing the output file, before shutdown()
is called on fd 3, a few more calls to recvfrom()
result in chunks of 1024 bytes each.
write(1, "2016-03-04T01:41:04 prefetch.2.5.7: Downloading via http...\n", 61) = 61
open("/home/data/ncbi/public/sra/SRR444041.sra.tmp.93082.tmp", O_WRONLY|O_CREAT|O_TRUNC, 0664) = 5
poll([{fd=3, events=POLLOUT|POLLWRNORM|POLLWRBAND}], 1, 0) = 1 ([{fd=3, revents=POLLOUT|POLLWRNORM}])
sendto(3, "GET /srapub/SRR444041 HTTP/1.1\r\nHost: sra-download.ncbi.nlm.nih.gov\r\nAccept:
*/*\r\nRange: bytes=0-1048575\r\nUser-Agent: linux64 sra-toolkit prefetch.2.5.7\r\n\r\n", 156, 0, NULL,
0) = 156
poll([{fd=3, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND|0x2000}], 1, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND|0x2000}], 1, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND|0x2000}], 1, 30000) = 1 ([{fd=3,
revents=POLLIN|POLLRDNORM}])
recvfrom(3, "HTTP/1.1 200 OK\r\nDate: Fri, 04 Mar 2016 01:41:04 GMT\r\nServer: Apache\r\nAccept-
Ranges: bytes\r\nCache-Control: max-age=31536000\r\nExpires: Sat, 04 Mar 2017 01:41:04
GMT\r\nKeep-Alive: timeout=5, max=99999\r\nContent-Length: 4862109\r\nContent-Type:
application/octet-stream\r\nLast-Modified: Sun, 12 Aug 2012 01:49:16 GMT\r\nVia: 1.1
wsa2-man.ucdenver.pvt:80 (Cisco-WSA/8.8.0-085)\r\nConnection: keep-alive\r\n\r\nNCBI.sra\210\31
\3\5\1\0\0\0\274\6\0\0\0\0\0\0\5\0\0\0\221\6\0\0\0\0\272\5 \0063\6o\6\3\0col\17J^O\0\0\0\0h\1\0\0\1\5
\0\0\0\226\5\0\0\0\0!\1B\2`\3{\4\7\0ALTREAD\17J^O\0\0\0\0h\1\0\0\1\7\0\0\0\374\0\0"..., 65536, 0,
NULL, NULL) = 4344
close(5) = 0
close(4) = 0
rename("/home/data/ncbi/public/sra/SRR444041.sra.tmp.93082.tmp", "/home/data/ncbi/public
/sra/SRR444041.sra") = 0
lstat("/home/data/ncbi/public/sra/SRR444041.sra.cache", 0x7ffebf99c120) = -1 ENOENT (No such file
or directory)
lstat("/home/data/ncbi/public/sra/SRR444041.sra.tmp.93082.tmp", 0x7ffebf99b090) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/home/data/ncbi/public/sra/",
O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
getdents(4, /* 6 entries */, 32768) = 208
getdents(4, /* 0 entries */, 32768) = 0
close(4) = 0
lstat("/home/data/ncbi/public/sra/SRR444041.sra.lock", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
unlink("/home/data/ncbi/public/sra/SRR444041.sra.lock") = 0
write(1, "2016-03-04T01:41:04 prefetch.2.5.7: 1) 'SRR444041' was downloaded successfully\n", 79) =
79
lstat("/home/data/ncbi/public/sra/SRR444041.sra", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
lstat("/home/data/ncbi/public/sra/SRR444041.sra", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
lstat("/home/data/ncbi/public/sra/SRR444041.sra", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
open("/home/data/ncbi/public/sra/SRR444041.sra", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
pread(4, "", 4096, 0) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
pread(4, "", 4096, 0) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
close(4) = 0
lstat("/home/data/ncbi/public/sra/SRR444041.sra", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
lstat("/home/data/ncbi/public/sra/SRR444041.sra", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
open("/home/data/ncbi/public/sra/SRR444041.sra", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
pread(4, "", 24, 0) = 0
close(4) = 0
shutdown(3, 1 /* send */) = 0
recvfrom(3, "998ecf8427e *idx0\n727b8f00c024d9a650068e198b0f77eb *idx2\ndb29c9d245ee82c9d997020fc2c41ceb *data\n\0\200\n\2\0\0\1\0\201\200\200\34\0\0\4$\214\341\215r\334\310\265v\335F0\274\255\237n\211\"UD\241\200\314\\s>\367\177\221_\2U\224\250\266\375\2363\306\277\376~[\257\353\341\372v}\373\376\366\364_\374\353\357\327\267\313\333\333\317\237\227\313\353\217\247\377\356\3460\223\2739X\16c[\353\351\27\207y`#wUI\200\30\215\342\tD@\305;\244P\21\223\30cT4\306\244.\214\327\321[\27EA\255\276\254\320\324\241\224\23\272\243\215\215\236\\\2\364L\222F\306\317/5\352\363\353\376e[\327R\223\250\200\212#\21\2557\214\0074f2\277\214W\222\236\251\276\366/_Z5\324\335C\r\337\365O\345\0372\31\223\240\321a&\23\rW$\232\2039\230\304\2743\211\211\207h\"\227\354(\203\2539\31\245\213D\255\32\203KY*\226\273\32v<\200'\24\234\206\200:\24\34N\3sg\214I\314]\2652\7\23\315o\306\230?\250\321\34L\314d~3\321D\324\34*1\211\232\203\220;O9\230\250\321Lf2\275b4\232\203\332\6&\2321\252\352Z\231J\335\237\314\377R&!1\346\301@b\336\265\34\214\306\7\20D\353\245D\367n\27\221}\321\374fb&C\22\23\223\230\222F\352:t\350`i\335X\33\355:r2&)*Fk_\367\375V\251\253U\335\236
\204\340n\22c\3222\3716\310\4\33b\16\276C\245\266\206\325\232\323\220\201\323h\315\27"..., 1024, MSG_DONTWAIT, NULL, NULL) = 1024
recvfrom(3, "\366\237{\333\227\325w \236\260\374\245\267BMbE3ib\22\23'\252\27\232\377\3022w\342)\223\232\220\200IHh\344\240 &\221@bbN\22Z\22\343\224\304D4*1a\267U%o!=Uf\252\353 \211\211\271\0339\320\250\257=81\206ZR\330\332\323?\231;sg\3564\346\344!\211x\300Q\327\3228\4\23'0\7\242$\352\320\230\204K1*&\36\222\20\215!\2119H7\17\36@E\31\325z}\351[y{^\373\255\366\276\26\267'\361\200\216>\224}0T\4\225\341\350\260]\332\367\3575\30\353\377\265\313\377-\313\376\355\345\247\227\357\257U\333hO'\223\30\3030\7'\214\211fj\233\245\346\316\304Hi\242\335\230ht\230\223y0'\207\211\315$\0062Y\225Cw\312dL\275\324\333\327=\3762\300\337p\242\24\0255&\245&\236\22\343\204\212\342?\341\35\10\"\210\370_\340\tT\20b=\357JTP\243\250e\201\226\232\3\2713\357\214f\322\30\223x\210F\315\301D\243\306\207B\207`\265~\255\336j\332K\253\2270\324\2101\352P\324\341\350\30\22\215\342T\376\322\233\23\330\367\366\326\326e\355\237;~\4x\302\t\261\24<\200X[\355\330\326R\30\265\226SIkb\22\0235\236\242I\3240\24\234\222\230h\242\321L\246.\344\344)\7c\24\7\220\211\255\226^I\234\362\316\252Ds2\211\231 q\242\24jo\2jmU\265\213\265\2258D\35\353\17\21vZ\367\366wS\233\f'&-Ij]\315\364\346\233\211\265\224\267L\365\\m\307w\324\362\243\234\320\332\212\375R*\250\230\304\352(\273\32\247\264z)c4\250IL\324\304\34\314\301\210I4{\366\0305\335$\366\30\353\3635\264$N\361\16\5\2471\330v\335^
\327\227~"..., 1024, MSG_DONTWAIT, NULL, NULL) = 1024
recvfrom(3, "$&\326\225$N\303\356\30\177\371\371eI\312\234\254K\231\244\r\22sG\t&\365\372\332\274\276\226I}\256\372\374e\253\356\35~\204\342\4\376?\1N\345\224\1770\23\202&\325Kc>0\37hA\22\275T\215\241\10\325K\24\254\245\254\275/k\2414<\341T\350\366\372\332jy^\267q\373\327\245\372\227uo\2339XE#$\241\243(\216\326\220\266\225\377\204\247Z\312\273\201\232D\2439\231\23\321D\215\32s0\2472\306\244/$\306\324\313\216\230\304C&r\22\302n&\177\301\340\273j\245\16\25\37rg41'5&\32EsR\214QS\21S1\21\37Jl\202\350u\371\326\353\262\354\337\376\332\337\372V\375mm\273\211\211\212U\232\230\211=\267\317\335\34\0\25'h \356\36\352\355\346\333\322\25d\365\267R\360\16\307\326\232h\333\315\177!\25\207\211\23e\22MbN\346\240\325\t\33\211F\312\356\324\7]m\243\256\205\312\0A\333\325\312;5\2119\225\326J\222zz\322\304\34L\30\346\27\215\275\260\2721\7M<\345\0015\211\335\376\364\377\233\7\4\34C\300\251\226[\365\326\235\0204\377\3011\310\203\212y\7\266\321\252U\314D\243-U\35\343\7\370\33\326\245\251(\226\"\342Tk\325Z(U[\251 \226\271\323\374\301AB&\343?\325V\212\266*'\4\23\207\346`\314\37\20\304r\2\177CKQqB\314\301\2743\211\350J\222*\23aHUm\r\21\307\250\245\252m\265\265\262\252\215\336\252\360\35\36@\244\375x{\353K\tc}z2w\232\223\16\351d\"w\232\244\310\244\326\36s0\301\312\301\370\33\342Tk9\201\17\265\373\256\0Ox\300\t\247\3414\354\317\35E\21\251K\325
\272V\251Hm\342oU\242\240\250\303jZ\353\212\277\215\321\273\275k\355"..., 1024,
MSG_DONTWAIT, NULL, NULL) = 1024
recvfrom(3, "?/}\271\254\243?\35\4'\234\272\16PP\341\266\224S_\324\30\202C\243\216\361w\321\211v\17\275u\305C\251\210\340C\201\312@s0\301XU\346@GzoU\246\312\230\223F\224\21\315Ic\222\206x\207\323\300\323\260\254\2\5\253\324\352K\331\236o\265\227Z\326@[-_\372\247N\177\331\315\7\304\360\2e&2Z\203\326\324\30\343\1\306@\223h\270\302K\253\16\236P\206\37\340poj\3\247\334\231\01741\202\247$\\I\345\27\0079\301(\210\377\0232pBM\342\37\222\f\25,'\274\312\306\245\252e\264>\354\325\250ku\n\" \230\377\312\200\211\30Q\222\30c,u\253\270\211\326\305\304\17\20\20\274\303m\3518\215\275\232x7<\264\336\233V\225\2126k\275\265j\232DL}\251D \261dl\273c\30k\335\251\336\264\375t\333\353\365m|]\366\332\227\365\371mY\177\334\332\247\3532\2321\211\207h\324D\2071\202\340\24Cm\344\216\32E\222\306\224f9\2524\7\215\211!\232\7\215Fp\352\0325>\324\353Zc\257\222\327\32{mV\27\260\323X\307\30\235\326\32\256\203\326X_\333\372\263\275l\205X\320@\253\177\251*\312Qm\373Q\5\375\373VN\345T\303i\10JGP\1kh\36LLb\16\6\214\207\352>\0J\341;\254V\356\377\336EK\304\211\356\324l\326\2728\206\310\320\267\v\306;P!*\3\n\261\266N\r%\202U}\364\221\242Z\353EUk\33\243\320m\23\177\253\255P\320Q\275\266B\35c\230\337L\204\244\206`\356\0245\272cD\342P\253s\333\3218\265\336\375\245{\302\23\26\36\30\214\226\332^\2671\306\217\365[\276\326s\377\334\267\177\337\352\266
\326\347\347\355\373\36249\355\226\214\246m\271\r\335^Z\25\265\324\266Q"..., 1024,
MSG_DONTWAIT, NULL, NULL) = 1024
recvfrom(3, "\374\5\17\250\330Z]\227\25a\214~]\313\321D\35V[\212\376\322q\214\201\356N\255us\347\224\270\232Z\267u\214\376\246}+\333\376\23\17\250Pki-}\327j\333\262\337\336\272\373\323\304@\304\335\332:\265\364\275\336Z\365ei\325\255V\373^\326\317\275\226^\275\277}\177\351\333\365\323\322\237k\214z\276\254\317\327\255\217a[\273\20\243\345\35\336\201\345\330\255\352\303\34\2149\325\332Z\265\326\250\32\5\255\265\261wc>\320\230\0301w\306\207\265mU\227R\34Nc\260\226\207z+?\200\372\321\252<\200(\210\226\250M\301\3464@\35JG\305\321\235\20Qa\7\24\35\303w\340;p\210\366\267\325\tA\234\330i\356\326\217\355m\33\243\350\317\r\255\255/\375\326\373\250u\357\365\372j\16b\22\v5\17\224&1T\351\30\250\210\34\334G-mT\377R\212Z&!\361\326\332kK\flU$q\253\4\211w\340\204w8\321\1\265v\337\201\310x\353\236\300\2076LB\16\226IL\304\330[\31G\31b\356\264Lb>\262\25\2512\377`\221\3\303\30\207\304|DA\253Q\205\210\330{U9\355\0360\336%Q0\3410\374\23N8\225\250\10\342a\f\301Z\313\3U\205x\300^\345M\367\265\306\30I\217I\306p\370\227\366~\361\257a\2519\30\2*I\f\230p%\211F\315\244&\304)1'\223hPs\"\277\325F\22\267u\3444l\25\207\275\211V\323Lu-Z\257\361ioT\231?\231I\210\325\250\242<E\203\"N\305\265\214i\243#Hk>\240\202\260\367/\27k[Z\333kh\253V\232\3\321x\312\344\1\3F<\24\345a\250\335amUk\201\"\325\360\237\300;d\370\321\20\357\300\273\22\20\321$$\301
\210\207$\242\230\304Dk\224\225\301\376\272\361"..., 1024, MSG_DONTWAIT, NULL, NULL) =
1024
recvfrom(3, "\231\23I\10eb\22\32\240`m\205\277 :@E\21OU\315\361\251\214X\345\324\n\245\253\221\352\342\350\335\23\266K\311\300\261\357\250\265u\267\275\264\256\205\271\263HtX5X\200\322\34\24\223\f\201\241\336\212\272\322\333\245\325`T\222\276l\335w\200\370\200wm+\4\247\22\313\3\3506\372VUC\252\255E\265\346\204\342;TPD\252\227\340f\336i&\203}\355\267jo\343r\31\337^\273y\347 \211%e\264L\r\225m\363P\2Z\205}\371v[?ui\324V\nb\356\214I\234\206\242I\214\30\211'T\224\2418!>\0\345\237(\377\1\337\1\26T[.\255~\\\326\275\2665\320\277\277\365\315\17:\376R\227r\252^\376\3\310\240\336\352\355\366\375\355\265_\226V\353\337\213\230\304(\211R&&%\30\35\345\270j~\253\352\356/\235\3536ZiHu\6\346db\342!\7\243MC\341!\211qJ\242e\342C\214\275\24EA\35\265U]j\224\265\324^[a=\367\347\256&\361\220x\312dt\2408\341\377\260:\225\26\345TPj-U{9Q\255\300\252V\n\346\3\23\315\7x\30\276\212U\255\264v\350\257\275j\255\347\347\336\227\352U[U\231_\204DH\210\2\232\304*s0hT\320\204\210\207\250\375\2478\1\205:\272X[\t:,j+\247\374\302\337\344d\273\364\347\376\274m\215\252\r\315\301\374A\324M3\31sR\350`\2u\253$\343e\217\241^[9\341\35\212\2771<a\376\7:9h4\17\306CLb44\252\227\23>\364^\36@E\300\3j>2'1\223\32\0376\207H\255\345p\f<\201(Ue\16\16\315\377\"?\265\372\227
\336\301vq\355\257\267\257\313\253\364\313\362\372\257\177_o\237\227\361S\315dL\242\201
\2501\306\30"..., 1024, MSG_DONTWAIT, NULL, NULL) = 1024
recvfrom(3, "9h6\247\265uumk\333?\367\376\332FG<4|\350\242\16\265\17:\216>\372\247\356E\35}\321MF\337\235\30\210v]\333\20\17\f\177\351\205\212 J\355\2128\372\360\216&\202\256\177\377\334\252oK\177^\314\377\3\203\304\341o\340o8\272\210V\363\204J]J\353\322\274\3\17\325\312\t\355?Q\313\335U\34\200}+\31\273\3\177CQ\4\245]j\307\241}/AE\24\334{]\332R}\277\374u\273^\n\353\355m)<\0\322\350b!\212\212\356B\251\231\214\231L\314\203\251\245\256[\273\265W\315d\214\321xHB+ML$\232\23e4bN8^\273J\377\336\314\7&1\377\340\224\7\223H\314Tk\245\236Gb\2\236\30\376\7\304\23\202C\240\266\322\321\330\241\377\370\327\227K__^.\317\317oOOO\346\316L&\346\27\r\202\335\207QNhm\5>\2402\274\303\201\370\21\10\nh\22\267\212F\355-&\241\3\16\255\16NI4\232h\314\t\345\2\35\17\271\363\220\250\271\323\242\6\306)\7\363\237\314\311;\246\256\326V\342\4j\255\227r\32\16\266\306B\353@\252oc\273\260\334\252./\227\235\215a{U\223\370\v\202O\177\"$a+2\276\256\315\267\315d\354\327\327\313\353u\273\\\277^Vc7\211I\3122\23+\231\240\2130\276\f\223X\244\256\225\226\251\3555\256\324\353_{O\322\256?\203\346O\346\37\214\346d\214;fr\2308*j+4\357z\350\205\346\316\262z%\32\233\357:\326hM\353VC\240\277\336\326\266\274<\231\223&Z\225\223\261\267\327\345\366\366\255\261nO\306$FKc4\7\215\253\30\35\232\7\0076#\r62\211\2261~\4((*U\245\330Js\247I4\7\313
\30\223\210U\346\37\f\235\34h0*\16\315"..., 1024, MSG_DONTWAIT, NULL, NULL) = 993
recvfrom(3, 0x7ffebf99ffc0, 1024, 64, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
shutdown(3, 0 /* receive */) = 0
close(3) = 0