Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error connecting #9

Open
os-hall opened this issue May 25, 2019 · 5 comments
Open

Error connecting #9

os-hall opened this issue May 25, 2019 · 5 comments

Comments

@os-hall
Copy link

os-hall commented May 25, 2019

i was able to follow all instructions up to the point when executing a.out script.
i believe i was able to execute and got the following

sudo ./a.out config.conf api-tests

downloadcacapi tests..
logging in: 2.709s done! cookies: download.cloudatcost.com FALSE / FALSE 0 PHPSESSID pp7bvo2fs965prrfkfvb60rk86 -
uploading test.txt: 0.27s done! upload id: 54stljtuwezyr4jjdpbbri3p8
downloading what we just uploaded, using the single download api.. 0.174s done! contents: Hello world! (content is intact.)
downloading what we just uploaded, using the single download api.. 0.193s done! contents: Hello world! (content is intact.)
downloading what we just uploaded, 20 times simultaneously using the download_multi api .. 3.714s download complete! checking contents.. correct.. correct.. correct.. correct.. correct.. correct.. correct.. correct.. correct.. correct.. correct.. correct.. correct.. correct.. correct.. correct.. correct.. correct.. correct.. correct..
deleting upload using synchronous api: 0.18s done!
uploading test.txt (again): 0.248s done!
deleting upload using async api: 0.193s done! returned value: true (as expected)
deleting a bogus upload id using async api: 0.199s done! returned value: false (as expected)
uploading 20 times using multi_upload api..5.059s done! ids: 0pr7tbhqgen9uevmrkvwprvle - 5hdny7wmyg8ulvy0g9miowbae - n3k1bdlmft5u841jm7akjdxd1 - 9sazg9if4r6jltitnax0ip37e - 6feksvqqdzms2eybej4p0e09a - c75g4wc54oif5niaomiibvull - scsq5dwrf10zacxwm3cdsx6m8 - gbe9132tlq1zvbdph1q3tqbw2 - dfoas0rpfbg1lha6z5roxsxew - 7vvjdmu0okwvaip0pgkq9elwm - jrcawzcj1iwb7phei60dzu19h - dds0pglmns3j5vv8ybifcuasd - 50z28oh6wackrundtox6jslbo - lgsggel0ip3eboa7v37l9o2jv - yr6zqt7016wupe1wxazyl8twe - uyrke72lst3slid21byt5caso - g09leecf9xnm7ib1jqq2l4c8h - 1lq6o0xhl98a9a9g4a9uid4a7 - w74k0bfgd2vhbvmectz12z1c8 - 13joe7rlj06so6hxubonmuaom -
will now delete them all using the async api..deleted..deleted..deleted..deleted..deleted..deleted..deleted..deleted..deleted..deleted..deleted..deleted..deleted..deleted..deleted..deleted..deleted..deleted..deleted..deleted..
3.599s done!
logging out: 0.288s done!
shutting down, cleaning up.. thread doing the cleanup: 140274030356352

when i execute the following this is the output

sudo ./a.out config.conf

./a.out(+0x770a)[0x5626a3d1070a]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db)[0x7fdec99ab6db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7fdec913388f]
./a.out:src/main.cpp:1759: failed to ioctl(kernelIPC.nbd_fd, NBD_SET_SOCK, kernelIPC.global_remoterequestsocket) !
: Inappropriate ioctl for device
shutting down, cleaning up.. thread doing the cleanup: 140594848769792

im hoping i can get some guidance as to what am i doing wrong. whats next

@divinity76
Copy link
Owner

what does config.conf contain? (censor out the username/password)

@os-hall
Copy link
Author

os-hall commented May 26, 2019

-------------- Added by myself
format=1
explanation: config is line based, 1st line must be "format=1", 2nd line is ignored (but must exist), line 3 contains the username, line 4 contains the password, line 5 contains the number of worker threads you want (higher count should increase IO speed, and it does not depend on how many CPU cores you have.), line 6 contains the path to the sector index file, line 7 contains the nbd device to use (/dev/nbdX), and line 8 should not exist. a username or password or filepath containing newlines is not supported.
os.hall@me.com
UPu3EtUnYt
3
sectorindex.sec
/dev/nbd1

after looking at the config file i notice its important to not have a carriage return on the last line.

i did believe i was able to open a connection and follow the remainding steps, however i have no luck browsing after i mounted the cacdrive to my mount point. i was not able to copy a file as a user or root.

i will look at my permission settings to see if there's any user settings i can set or change

@divinity76
Copy link
Owner

@os-hall can i check the system personally? can you try contacting me on facebook or discord? contact info at https://stackoverflow.com/users/1067003/hanshenrik?tab=profile

@os-hall
Copy link
Author

os-hall commented May 26, 2019 via email

@divinity76
Copy link
Owner

i guess what happened is that cacdrive was started prior to this, and crashed, and did not manage to clean up properly, and /dev/nbd1 was left in a... broken state.

easy solution: reboot (this should make nbd1 work again) or switch to /dev/nbd2 (you have 12 btw, /dev/nbd1.../dev/nbd12)

alternative solution: write a little program that opens /dev/nbd1 and runs

auto fd=open("/dev/nbd1",O_RDWR);
ioctl(fd, NBD_CLEAR_SOCK);
ioctl(fd, NBD_DISCONNECT);
close(fd);

, that should do the cleanup manually and make /dev/nbd1 usable again, in theory..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants