storj-archived / core

Deprecated. Implementation of the Storj v2 protocol for Node.js.
https://storj.io
Other
395 stars 88 forks source link

Mirroring a file on upload is not working #492

Closed MeijeSibbel closed 7 years ago

MeijeSibbel commented 7 years ago

Package Versions

Replace the values below using the output from npm list storj. Use npm list -g storj if installed globally.

storj-bridge@1.0.1/home/gordon/Code/storj-bridge
└── storj@4.0.1  -> /home/gordon/Code/storj-core

Replace the values below using the output from node --version.

v4.5.0

Expected Behavior

Mirrors are created and upload process exits or continues to next file if uploading recursively. 

Actual Behavior

Mirrors are never created and upload hangs during mirror creation process, it never starts/finishes the mirroring. 

 [Mon Oct 10 2016 23:13:43 GMT+0200 (W. Europe Daylight Time)] [info]   Establishing 12 mirrors per shard for redundancy
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard 70c1cac2523c5ec6e156bf9ca5436037ad21d947 pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard 402efc526637b46b5598aca96ad5552a08f8de3b pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard 81f8aee97c977dae3c7bfcf43302afa59df9f830 pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard b2916d39a489f90e2309aac535575ad56322c8a0 pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard dd2e6e330d73d113a21cd7ff5818cd0f7defd178 pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard bd9e2c0aeed0b84259fce027c83dfc36a08db425 pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard 200cda5c51265be9a16947da19ad46769da7db08 pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard aed65e55009289ff527f50fc3b8cdf6df1f83313 pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard fb215732f1c4e7940198c3cdd5417a4ea2ae46f6 pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard 00b26136a8dfcad362bd7825f28391f012909222 pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard 9d0f30b6752818e633f23d7cb276f679230c6f71 pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard a9df1b662891c83bd0c979e75342b128d9d8de10 pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard 680beba2a581b8c5c9f1d404c2c415cd6b7789a6 pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard 1c5ee9e5d1e6efea148d5de5963eacf20296510d pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard b0f7eddf1b83b8b8872d7ab864d9e41a6af05a7d pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard 292dccd65ebc86a3021fb5838d37629c24152b88 pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard 810a9a43377aa22a939eff2a597fa7d3d653d468 pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard f425e9dfb584ae0349ccd983b401751f1891ecef pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard 8eaa941cfbf157b8a9fa75abb0f81b09bd1174ab pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard aba50cb111f35073ae076c90e38fb4a3f0940c86 pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard 32a124121faa88107970465ed9d05aa5908d4c2f pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard 168313f2d806ced886a4827655d019d422859202 pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard 7ac88d0fa5498cd2c0039596388df66f1e48f87c pending mirroring by 12 nodes
 [Mon Oct 10 2016 23:13:44 GMT+0200 (W. Europe Daylight Time)] [info]   Shard 3c8b1983e6824d63c8571ce8a47abcc9ed0fe1f4 pending mirroring by 12 nodes

Steps to Reproduce

Upload a file using -r

littleskunk commented 7 years ago
C:\Users\Skunk>storj --debug --url http://apipool001.storj.dk create-mirrors -r 7 57fb28bd84ef080c1da631f21f2 57fc076cf1650738759c846e
 [Mon Oct 10 2016 23:34:01 GMT+0200 (Mitteleuropäische Sommerzeit)] [info]   Establishing 7 mirrors per shard for redundancy
 [Mon Oct 10 2016 23:34:01 GMT+0200 (Mitteleuropäische Sommerzeit)] [debug]  Parameter for ECDSA signature: POST\n/buckets/57fb28bd84ef080c1da631f21f2/mirrors\n{"file":"57fc076cf1650738759c846e","redundancy":7,"__nonce":"846dcaba-4d3b-4388-abd8-c334cc8d3bc0"}
 [Mon Oct 10 2016 23:34:02 GMT+0200 (Mitteleuropäische Sommerzeit)] [debug]  Request: {"baseUrl":"http://apipool001.storj.dk","uri":"/buckets/57fb28bd84ef080c1da631f21f2/mirrors","method":"POST","timeout":20000,"json":{"file":"57fc076cf1650738759c846e","redundancy":7,"__nonce":"846dcaba-4d3b-4388-abd8-c334cc8d3bc0"},"headers":{"x-pubkey":"0363ffdb39e83c39242e8c39a7690a450abe910c31d8bb70d5de9fc37111ab3a75","x-signature":"30450220621dc82750a2ba9631bd4f8257d9d8dacc7ae80f0c46dca2c5528c251d1b3397022100cc8c1fa956d90334ca08aeb34ec40c73edbfc92c492155d99ccd8e83ac8c91ef"}}
 [Mon Oct 10 2016 23:34:02 GMT+0200 (Mitteleuropäische Sommerzeit)] [debug]  Body: "Error: Cast to ObjectId failed for value "57fb28bd84ef080c1da631f21f2" at path "bucket"\n"
 [Mon Oct 10 2016 23:34:02 GMT+0200 (Mitteleuropäische Sommerzeit)] [error]  Error: Cast to ObjectId failed for value "57fb28bd84ef080c1da631f21f2" at path "bucket"
littleskunk commented 7 years ago
 [Mon Oct 10 2016 23:11:50 GMT+0200 (Mitteleuropäische Sommerzeit)] [info]   Querying bridge for contract for 5c4c5d6fbacf30588779dbd57c7fd941aff175a3 (retry: 9)
 [Mon Oct 10 2016 23:11:53 GMT+0200 (Mitteleuropäische Sommerzeit)] [info]   Contract negotiated with: {"userAgent":"4.0.0","protocol":"0.9.0","address":"littleskunk.myqnapcloud.com","port":4000,"nodeID":"52e28136c7acae43bbca0d99cdf7e8eb28dda5a5","lastSeen":1476133911566}
 [Mon Oct 10 2016 23:11:53 GMT+0200 (Mitteleuropäische Sommerzeit)] [info]   Data channel opened, transferring shard...
 [Mon Oct 10 2016 23:13:34 GMT+0200 (Mitteleuropäische Sommerzeit)] [info]   Shard transfer completed! 0 remaining...
 [Mon Oct 10 2016 23:13:34 GMT+0200 (Mitteleuropäische Sommerzeit)] [info]   Transfer finished, creating entry.. (retry: 0)
 [Mon Oct 10 2016 23:13:34 GMT+0200 (Mitteleuropäische Sommerzeit)] [info]   [ file.mkv ] Cleaning up...
 [Mon Oct 10 2016 23:13:34 GMT+0200 (Mitteleuropäische Sommerzeit)] [info]   [ file.mkv ] Finished cleaning!
 [Mon Oct 10 2016 23:13:34 GMT+0200 (Mitteleuropäische Sommerzeit)] [info]   [ file.mkv ] Encryption key saved to keyring.
 [Mon Oct 10 2016 23:13:34 GMT+0200 (Mitteleuropäische Sommerzeit)] [info]   [ file.mkv ] File successfully stored in bucket.
 [Mon Oct 10 2016 23:13:34 GMT+0200 (Mitteleuropäische Sommerzeit)] [info]   Name: file.mkv, Type: video/x-matroska, Size: 1017050129 bytes, ID: 57fc047df1650738759c833c
 [Mon Oct 10 2016 23:13:34 GMT+0200 (Mitteleuropäische Sommerzeit)] [info]   Establishing 12 mirrors per shard for redundancy
 [Mon Oct 10 2016 23:13:34 GMT+0200 (Mitteleuropäische Sommerzeit)] [info]   Shard 5c4c5d6fbacf30588779dbd57c7fd941aff175a3 pending mirroring by 12 nodes

I don't see anything on my farmer log that would look like a mirror.

aleitner commented 7 years ago

Duplicate of https://github.com/Storj/core-cli/issues/25