sergiotapia / magnetissimo

Web application that indexes all popular torrent sites, and saves it to the local database.
MIT License
2.98k stars 187 forks source link

Not indexing/crawling anything? #151

Closed askiiart closed 1 year ago

askiiart commented 1 year ago

Sorry if this ends up just being my impatience, but I've got nothing showing in Magnetissimo after about 10 minutes.

Nothing showing in home/feeds

I don't see anything strange in the logs, just this, with the stuff starting with Transport: websoket repeating for each time I visit it in the browser.

14:44:35.448 [info] Migrations already up
14:44:36.405 [info] Running MagnetissimoWeb.Endpoint with cowboy 2.9.0 at :::4000 (http)
14:44:36.405 [info] Access MagnetissimoWeb.Endpoint at https://192.168.7.88
14:44:39.611 [info] tzdata release in place is from a file last modified Fri, 22 Oct 2021 02:20:47 GMT. Release file on server was last modified Tue, 28 Mar 2023 20:25:39 GMT.
14:44:40.343 [info] Tzdata has updated the release from 2021e to 2023c
14:44:44.508 request_id=F1XUUf3TdNe_2rUAAAjB [info] GET /users/register
14:44:44.514 request_id=F1XUUf3TdNe_2rUAAAjB [info] Sent 200 in 5ms
14:45:07.044 [info] CONNECTED TO Phoenix.LiveView.Socket in 22µs
  Transport: :websocket
  Serializer: Phoenix.Socket.V2.JSONSerializer
  Parameters: %{"_csrf_token" => "BXUrJi8vY1IqFhY-OEU8IlwPdBBXLBA-Z0Xka_45gPbkYvZX6WGBojHw", "_live_referer" => "undefined", "_mounts" => "0", "_track_static" => %{"0" => "http://192.168.7.88:4000/assets/app-b427e16913eeff5adcd8132199f974bf.css?vsn=d", "1" => "http://192.168.7.88:4000/assets/app-207d38c033d0e6924686f811f7f66992.js?vsn=d"}, "vsn" => "2.0.0"}
14:46:17.669 request_id=F1XUZ66iG3x2VcoAAAnB [info] POST /users/log_in
14:46:17.877 request_id=F1XUZ66iG3x2VcoAAAnB [info] Sent 302 in 207ms
14:46:17.881 request_id=F1XUZ7tI4AZ0O_YAAApB [info] GET /
14:46:17.887 request_id=F1XUZ7tI4AZ0O_YAAApB [info] Sent 200 in 5ms
14:46:17.912 [info] CONNECTED TO Phoenix.LiveView.Socket in 37µs
sergiotapia commented 1 year ago

Try searching for something and you should see movement.

We also have importers to grab the latest torrents from each site. I forgot to turn them on though! I'll push up a fix for that this afternoon.

For now you can just search.

askiiart commented 1 year ago

Try searching for something and you should see movement.

Nope, I've just got this. Wouldn't the search depend on the imports being on?

from s0 in Magnetissimo.Torrents.Source,
  where: s0.name == ^"TorrentDownloads"

    (ecto 3.9.5) lib/ecto/repo/queryable.ex:161: Ecto.Repo.Queryable.one!/3
    (magnetissimo 2.0.0) lib/magnetissimo/crawlers/torrent_downloads.ex:10: Magnetissimo.Crawlers.TorrentDownloads.fast_search/1
    (elixir 1.14.4) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2
    (elixir 1.14.4) lib/task/supervised.ex:34: Task.Supervised.reply/4
    (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Function: &:erlang.apply/2
    Args: [#Function<0.57527154/1 in Magnetissimo.Torrents.search_torrents/1>, [Magnetissimo.Crawlers.TorrentDownloads]]
askiiart commented 1 year ago

Also, I'm not sure if I should file a separate issue for this, but while the search is loading, I get the "We can't find the internet" error. It goes away once the search loads (though it returns nothing).

sergiotapia commented 1 year ago

Try searching for something and you should see movement.

Nope, I've just got this. Wouldn't the search depend on the imports being on?

from s0 in Magnetissimo.Torrents.Source,
  where: s0.name == ^"TorrentDownloads"

    (ecto 3.9.5) lib/ecto/repo/queryable.ex:161: Ecto.Repo.Queryable.one!/3
    (magnetissimo 2.0.0) lib/magnetissimo/crawlers/torrent_downloads.ex:10: Magnetissimo.Crawlers.TorrentDownloads.fast_search/1
    (elixir 1.14.4) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2
    (elixir 1.14.4) lib/task/supervised.ex:34: Task.Supervised.reply/4
    (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Function: &:erlang.apply/2
    Args: [#Function<0.57527154/1 in Magnetissimo.Torrents.search_torrents/1>, [Magnetissimo.Crawlers.TorrentDownloads]]

That error seems related to the TorrentDownloads record not being found in the sources database table. Did you run mix ecto.reset to properly seed the database?

The can't find the internet error is related to #149 - I'm still trying to figure that one out.

askiiart commented 1 year ago

That error seems related to the TorrentDownloads record not being found in the sources database table. Did you run mix ecto.reset to properly seed the database?

No, how do I do that?

sergiotapia commented 1 year ago

@askiiart If you pull down latest and create a fresh docker compose this should be fixed by 2b89d42508e323eec2d4f79798ff8eaa1fc2dc9b - this will create the initial data necessary for the app to run. The sources and categories table we need.

askiiart commented 1 year ago

@sergiotapia Thanks, that worked, though I did also have to delete the database data and re-run that too.

sergiotapia commented 1 year ago

Yeah that is unfortunate sorry for the elbow-grease necessary here. Moving forward new crawlers I add will run in the database migration itself, there will be no need to reset the database. That's crazy. :D