NyaaPantsu / nyaa

Nyaa.se replacement written in golang
MIT License
993 stars 148 forks source link

follow the installation, stuck on "./nyaa" #93

Closed taigt closed 7 years ago

taigt commented 7 years ago

./nyaa

(/opt/golang/src/github.com/ewhal/nyaa/db/gorm.go:34) [2017-05-06 12:22:39] [2.56ms] CREATE TABLE "torrents" ("torrent_id" integer,"torrent_name" varchar(255),"category_id" integer,"sub_category_id" integer,"status_id" integer,"torrent_hash" varchar(255),"date" bigint,"downloads" integer,"filesize" varchar(255),"description" blob,"comments" blob )

(/opt/golang/src/github.com/ewhal/nyaa/db/gorm.go:34) [2017-05-06 12:22:39] [2.37ms] CREATE TABLE "categories" ("category_id" integer,"category_name" varchar(255) )

(/opt/golang/src/github.com/ewhal/nyaa/db/gorm.go:34) [2017-05-06 12:22:39] [1.82ms] CREATE TABLE "sub_categories" ("sub_category_id" integer,"sub_category_name" varchar(255),"parent_id" integer )

(/opt/golang/src/github.com/ewhal/nyaa/db/gorm.go:34) [2017-05-06 12:22:39] [1.97ms] CREATE TABLE "statuses" ("status_id" integer,"status_name" varchar(255) )

then no response

could not open ip:9999 as well

PS. I run it on the server.

tomleb commented 7 years ago

We definitely need more logging and error handling everywhere.

s-varezhkin commented 7 years ago

I only get CREATE_TABLE if there's no db file in project dir, it still opens on localhost:9999 just doesn't list torrents.

malhuda commented 7 years ago

nyaa.db is already in project folder and root folder but still blank

sdomi commented 7 years ago

are you running it on your local machine OR on a server? Don't forget to use -host if you use it on a server.

malhuda commented 7 years ago

On the server, and already using -host

taigt commented 7 years ago

could u explain how to use -host? thanks!

thetooth commented 7 years ago

This is related to #91 You can set host all you like but it wont be applied.

s-varezhkin commented 7 years ago

91 should have been fixed in c0d3ccc

malhuda commented 7 years ago

./nyaa -host nyaase.mybeehost.com ERRO[0000] "listen tcp 104.155.149.93:9999: bind: cannot assign requested address" goroutine 1 [running]: github.com/ewhal/nyaa/util/log.CheckErrorWithMessage(0xd4e200, 0xc4201c8af0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc4201c8af0) /root/go/src/github.com/ewhal/nyaa/util/log/error.go:18 +0x7d github.com/ewhal/nyaa/util/log.CheckError(0xd4e200, 0xc4201c8af0, 0xc4201c8af0) /root/go/src/github.com/ewhal/nyaa/util/log/error.go:11 +0x62 main.RunServer(0xc4201be5c0) /root/go/src/github.com/ewhal/nyaa/main.go:29 +0x191 main.main() /root/go/src/github.com/ewhal/nyaa/main.go:48 +0x2f4

thetooth commented 7 years ago

@malhuda2 you don't have this address on the machine you're running it from by the looks. Try 0.0.0.0 @taigt run ./nyaa -h

taigt commented 7 years ago

@thetooth @ayame-git

[root@li985 nyaa]# ./nyaa -host 45.xx.xx.xx

(/root/go/src/github.com/ewhal/nyaa/db/gorm.go:33) [2017-05-06 17:03:30] [2.50ms] CREATE TABLE "torrents" ("torrent_id" integer,"torrent_name" varchar(255),"category_id" integer,"sub_category_id" integer,"status_id" integer,"torrent_hash" varchar(255),"date" bigint,"downloads" integer,"filesize" bigint,"description" blob,"comments" blob )

(/root/go/src/github.com/ewhal/nyaa/db/gorm.go:33) [2017-05-06 17:03:30] [1.95ms] CREATE TABLE "categories" ("category_id" integer,"category_name" varchar(255) )

(/root/go/src/github.com/ewhal/nyaa/db/gorm.go:33) [2017-05-06 17:03:30] [1.55ms] CREATE TABLE "sub_categories" ("sub_category_id" integer,"sub_category_name" varchar(255),"parent_id" integer )

(/root/go/src/github.com/ewhal/nyaa/db/gorm.go:33) [2017-05-06 17:03:30] [1.58ms] CREATE TABLE "statuses" ("status_id" integer,"status_name" varchar(255) )

still stuck in here :(

malhuda commented 7 years ago

it's work :D , now error in uploading files and blank page (/root/go/src/github.com/ewhal/nyaa/service/torrent/torrent.go:63) [2017-05-06 17:41:29] [0.11ms] SELECT count(*) FROM "torrents" WHERE (torrent_hash is not null)

(/root/go/src/github.com/ewhal/nyaa/service/torrent/torrent.go:72) [2017-05-06 17:41:29] [0.12ms] SELECT * FROM "torrents" WHERE (torrent_hash is not null) ORDER BY torrent_id DESC LIMIT 50 OFFSET 0

(/root/go/src/github.com/ewhal/nyaa/service/torrent/torrent.go:114) [2017-05-06 17:41:29] [0.05ms] SELECT * FROM "categories"
2017/05/06 17:41:29 0 2017/05/06 17:41:29 0 INFO[1016] SQL query is :: category_id = ? AND torrent_name LIKE ?

(/root/go/src/github.com/ewhal/nyaa/service/torrent/torrent.go:63) [2017-05-06 17:41:37] [0.13ms] SELECT count(*) FROM "torrents" WHERE (torrent_hash is not null AND category_id = '3' AND torrent_name LIKE '%%')

(/root/go/src/github.com/ewhal/nyaa/service/torrent/torrent.go:72) [2017-05-06 17:41:37] [0.15ms] SELECT * FROM "torrents" WHERE (torrent_hash is not null AND category_id = '3' AND torrent_name LIKE '%%') ORDER BY torrent_id desc LIMIT 50 OFFSET 0

(/root/go/src/github.com/ewhal/nyaa/service/torrent/torrent.go:114) [2017-05-06 17:41:37] [0.06ms] SELECT * FROM "categories"
2017/05/06 17:41:37 0 2017/05/06 17:41:37 0

Please test upload http://nyaase.mybeehost.com/ @thetooth Where is the error ?? If its db error ??, if yes please link its db

taigt commented 7 years ago

@malhuda2 How did u make it work?

malhuda commented 7 years ago

@taigt run nyaa ./nyaa -port 80 -host 0.0.0.0

taigt commented 7 years ago

@malhuda2 It's working now! Thanks!

But empty list. There's no db. Does anyone have?

s-varezhkin commented 7 years ago

@malhuda2 uploading will be finished when we're done migrating db to postgres @taigt https://kitsunemimi.pw/tmp/merged.sqlite3.zip but it's not compatible with recent commit i.e. it doesn't display size because it's in string. Will be fixed with postgres merge

malhuda commented 7 years ago

@ayame-git Ok Waiting for his migration

taigt commented 7 years ago

@ayame-git Thanks! Is it including sukebei data? If is, how can I make it switch between nyaa and sukebei, just like pantsu.cat.

s-varezhkin commented 7 years ago

@taigt i think it includes anime-tosho sukebei dump which doesn't have jav(?)

MasterCATZ commented 7 years ago

@ayame-git so you will now be providing a full db? via go? as my db dump is PostgreSQL will it be syncing our local copies and the db @ nyaa.pantsu.cat ?

will there be any plans having a clone from nyaarchive.moe? migrated as they maintained descriptions and images?

s-varezhkin commented 7 years ago

@MasterCATZ There's still no final say on how db will be distributed

ewhal commented 7 years ago

@malhuda2 I'm really digging the css

malhuda commented 7 years ago

@ewhal Okay, I'm waiting for db migration from sqlite to PostgreSQL, and my recommendation is to use material design view or can also use bootstrap paper like I use on my web nyaase.mybeehost.com