Skip to content
This repository has been archived by the owner on Aug 27, 2020. It is now read-only.

infinite loop when api is saved as blank #70

Open
marafa opened this issue Feb 27, 2015 · 8 comments
Open

infinite loop when api is saved as blank #70

marafa opened this issue Feb 27, 2015 · 8 comments
Assignees
Labels
Milestone

Comments

@marafa
Copy link

marafa commented Feb 27, 2015

to reproduce
go to settings click save
view logs

[martini] Started GET /search/as/s/0 for 192.168.0.99:36818
[martini] Completed 404 Not Found in 378.127µs
[martini] Started GET /search/as/s/0 for 192.168.0.99:36818
[martini] Completed 404 Not Found in 362.413µs
[martini] Started GET /search/as/s/0 for 192.168.0.99:36818

(what is the api url anyways? do we need it? can we get rid of it?)

version 0.11.1 release 25/2/2015

@zwitterionwork
Copy link

I also get an infinite loop, the user searches for a file “Torrent” the Db does not find it, and it goes to an infinite loop of 500 the Api is your torrent list, but to be sure I wonder on a live site if it is necessary as well?? This can only be answered by the Programmer, who in my eyes has done a fantastic job!

To give you an idea how I am running it, I have one server with both bitcannon and mongodb running, they are running in local host, so that the server can send it out as a hidden service thru Tor , the second server, I just run bitcannon, and in the config file I point it to the mongodb on server 1 , I then setup firewall rules so that only the two servers can see each other. In the 0.1.0 version I had no infinite loops, but now with 0.1.1 I do, so I am just as lost, I think it has to be a loop in the search parameters..

Regards

Andrew

From: marafa [mailto:[email protected]]
Sent: 27 February 2015 01:58 PM
To: Stephen304/bitcannon
Subject: [bitcannon] infinite loop when api is saved as blank (#70)

to reproduce
go to settings click save
view logs

[martini] Started GET /search/as/s/0 for 192.168.0.99:36818
[martini] Completed 404 Not Found in 378.127µs
[martini] Started GET /search/as/s/0 for 192.168.0.99:36818
[martini] Completed 404 Not Found in 362.413µs
[martini] Started GET /search/as/s/0 for 192.168.0.99:36818

(what is the api url anyways? do we need it? can we get rid of it?)

version 0.11.1 release 25/2/2015


Reply to this email directly or view it on GitHub #70 . https://github.com/notifications/beacon/AJyVasEO9iaePGw8cmVKeUV2EZRbobf0ks5nwG91gaJpZM4DnAWZ.gif

@stephen304
Copy link
Owner

Whoops, not sure why this is happening but I will fix this asap! Unfortunately, I don't have much time today, but I'll get to it as soon as I can.

@stephen304 stephen304 self-assigned this Feb 27, 2015
@stephen304 stephen304 modified the milestone: 0.2.0 Feb 27, 2015
@zwitterionwork
Copy link

Great, and thanks for putting the time in, it is not easy working/school and programing! Lol when do you have time to do anything else?!?

Regards

Andrew

From: Stephen Smith [mailto:[email protected]]
Sent: 27 February 2015 04:57 PM
To: Stephen304/bitcannon
Cc: zwitterionwork
Subject: Re: [bitcannon] infinite loop when api is saved as blank (#70)

Whoops, not sure why this is happening but I will fix this asap! Unfortunately, I don't have much time today, but I'll get to it as soon as I can.


Reply to this email directly or view it on GitHub #70 (comment) . https://github.com/notifications/beacon/AJyVam-yKhJoDOP0Q1kvyTEk937RAqD0ks5nwJl4gaJpZM4DnAWZ.gif

@stephen304
Copy link
Owner

The api url is the address to the bitcannon binary (ip/host:port). It defaults to blank which means the same host and port that the webapp is served from - if you are using the built in webserver in the BitCannon binary, blank is the correct value.

Are you sure you updated the bitcannon binary? In between v0.1.0 and v0.1.1, I changed the api path from /search/:query/p/:page to /search/:query/s/:skip. The only reason I think it would be returning 404 is if the api doesn't know about the new path.

This does uncover another error - the web ui should stop requesting more results if the api has an error. Instead of restarting the server, you should be able to close the browser window to stop the infinite loop. Also, I don't think this should choke up the server, as it should be able to handle lots of requests. Does it choke up your bitcannon when it's doing this?

Also, do you happen to be using the webapp zip in another web server or the one built into bitcannon? Using the webapp zip is the only way I think the api could have gotten out of sync with the web app. At least in the windows one I can see that the api doesn't 404 and the webapp is making the right requests.

I will fix the other error. Try redownloading the bitcannon binary and see if it still gives 404 on /search/:query/s/:skip

P.S. Andrew, I am looking at your bitcannon and I don't seem to be able to reproduce the issue. I searched for "as" in all and it returns 0 results and makes no extra requests. The server returns 200 OK.

@NeoTU
Copy link

NeoTU commented Apr 5, 2015

Same issue here, first time trying out Bitcannon, Clicked the Settings button to see what was offered and then clicked saved.

Now when I search for anything this is what happens:

Clicking Reset to default didn't help.

loop

Versions:
BitCannon: v0.1.1
MongoDB: mongodb-win32-x86_64-2008plus-ssl-3.0.1-signed.msi

@stephen304
Copy link
Owner

I'm unfortunately unable to reproduce this issue still, but I've attempted a fix of what I think might be causing the problem. The last build I made is located here, please try it out and let me know if it helps!

ftp://ftp.bitcannon.co.uk/git/

@NeoTU
Copy link

NeoTU commented Apr 5, 2015

Good news, what ever fix you did seems to work. Tried a handful of different searches, all worked and no more of that odd infinite loop issue for now. Imported some large databases such as Kickass, Bitsnoop and the ISOHunt Openbay and searches working just fine.

Though I have this odd issue, how can I get rid of it? (Will open new Issue if needed)

odd

hmm

@stephen304
Copy link
Owner

Hmm, that looks like something unexpected was imported - do you know what sources you used when importing to bitcannon?

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

No branches or pull requests

4 participants