lukechampine/user

Upload error does not identify which hosts failed

grigzy28 opened this issue · 8 comments

On uploads would like to be able to know on failure's hosts that are causing. Here is an example of what I am getting but I have no idea what hosts are failing the upload.

root@sia-test:~# user upload -m 10 fedora30.tar.xz 
fedora30.tar.xz                                                                                                                                                                                                                                94%   44.17 MB    2.06 MB/s    
Upload failed: could not upload to some hosts:
communication error: expected at least 134879004443715567616 to be exchanged, but 133422648888169332736 was exchanged: rejected for high paying renter valid output
communication error: expected at least 256129706665699180544 to be exchanged, but 254770441480522694656 was exchanged: rejected for high paying renter valid output
communication error: expected at least 240066711699578683392 to be exchanged, but 239989039403292950528 was exchanged: rejected for high paying renter valid output
not enough storage remaining to accept sector
communication error: expected at least 61641257413385388032 to be exchanged, but 59932466894914715648 was exchanged: rejected for high paying renter valid output
not enough storage remaining to accept sector
root@sia-test:~# 

as you can see, I have 6 hosts listed that cause a failed to receive an upload, but I have no idea which hosts they are in my contracts.

Thanks

Thanks, this is definitely a regression. Fixed in lukechampine/us@53d20a3

Luke, thanks for the quick response. I downloaded the repo with the command "go get lukechampine.com/user" and recompiled the user program this morning (about 10 min ago) and here is a sample of the output from the same command.

root@sia-test:~# user upload -m 10 fedora30.tar.xz
fedora30.tar.xz                                                                                                                                                         94%   44.17 MB   684.8 KB/s    
Upload failed: could not upload to some hosts:
43cd88ca: dial tcp 87.79.165.10:9982: connect: connection timed out
write tcp 192.168.1.4:54370->73.193.37.231:9978: write: broken pipe
write tcp 192.168.1.4:33496->63.155.9.70:9982: write: broken pipe
write tcp 192.168.1.4:39910->87.158.160.17:9982: write: broken pipe
write tcp 192.168.1.4:50618->96.227.220.184:9982: write: broken pipe
write tcp 192.168.1.4:60452->212.232.75.200:9982: write: broken pipe
write tcp 192.168.1.4:45590->79.114.65.81:9982: write: broken pipe
communication error: expected at least 235173357033577512960 to be exchanged, but 235095684737291780096 was exchanged: rejected for high paying renter valid output
communication error: expected at least 231662933332522434560 to be exchanged, but 230303668147345948672 was exchanged: rejected for high paying renter valid output
communication error: expected at least 116528924443833008128 to be exchanged, but 115072568888286773248 was exchanged: rejected for high paying renter valid output
not enough storage remaining to accept sector
not enough storage remaining to accept sector
communication error: expected at least 51854548080326082560 to be exchanged, but 50145757561855410176 was exchanged: rejected for high paying renter valid output
read tcp 192.168.1.4:43540->47.186.64.56:9982: i/o timeout

Unfortunately there are still some errors that don't contain the contract id. Of course this broken pipe one is new for me, I am using the siad version 1.4.1 if that helps any.

Or is there something I did wrong to update the user program with the changes from the "us" program?
Thank you

Hmm. Interesting that it's only printing a single host. Can you recompile with make and run user version to verify the commit hash?

It looks like the main issue is that the renter is paying less than the host expects. This is an unfortunately persistent issue, and so far the best fix is to just add ~1% to the payment. I will look for a more permanent fix.

As for the broken pipe... Not sure, but that generally occurs when the host has closed the connection and the renter doesn't realize it. Probably benign.

I should be able to reproduce these errors and fix all of them without too much difficulty. Thanks for the report.

This is what I get for the version.

root@sia-test:~# go get lukechampine.com/user
root@sia-test:~# cd go/src/lukechampine.com/user
root@sia-test:~/go/src/lukechampine.com/user# make
go install -ldflags "-X 'main.githash=`git rev-parse --short HEAD`' -X 'main.builddate=`date`'" .
root@sia-test:~/go/src/lukechampine.com/user# cd ~/go/bin
root@sia-test:~/go/bin# ./user
user v0.5.0
Commit:     bd3a209
Release:    standard
Go version: go1.12.7 linux/amd64
Build Date: Wed Jul 17 12:28:08 CDT 2019
root@sia-test:~/go/bin#

I'm not too concerned about the actual errors. Just knowing which hosts were causing the errors is what would be the most helpful. :)

It did actually print more than one host with an error, I just had blacklisted it before posting the other results, so it did print more than one during an attempted upload.

Ah, you need to pass the -u (update) flag to go get, otherwise it will see that you already have a local copy and stop.

Okay, I opted to do an rm -f -r go command to make sure I got the a completely fresh repository. The output was as expected with contract numbers on each error.

Thanks again

Possibly with the changes made to give better error responses, this may have broken some of this function. Here is the result of an upload just now.

root@sia-test:~# user upload -m 10 DOGP.zip.test50
DOGP.zip.test50                                                                                                                                                         19%   217.04 MB   320.0 KB/s    
Upload failed: could not upload to some hosts:
could not resolve host key: host announcement not found
NewSession: NewUnlockedSession: dial tcp 93.175.199.149:9982: connect: connection refused
NewSession: NewUnlockedSession: dial tcp 190.19.225.96:9982: connect: no route to host
NewSession: NewUnlockedSession: dial tcp 213.183.59.173:9982: connect: connection timed out
root@sia-test:~# 

There were previous errors, saying

0d61e499: Write: contract has insufficient funds to support modification

I had determined with all the contract files I checked, this error was indicating expired contracts and I disabled them leaving only the errors above without contract ID's.

Good catch. Fixed in lukechampine/us@b89dafd