urandom / readeef

Readeef feed agregator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

issues while following the installation guide in the readme

oren opened this issue · comments

commented

I tried following the readme and couldn't make it to work:

cd ~/
go build -tags postgres github.com/urandom/readeef/bin/readeef-user-admin

can't load package: package github.com/urandom/readeef/bin/readeef-user-admin: cannot find package "github.com/urandom/readeef/bin/readeef-user-admin" in any of:
/usr/local/go/src/pkg/github.com/urandom/readeef/bin/readeef-user-admin (from $GOROOT)
/home/oren/projects/go/src/github.com/urandom/readeef/bin/readeef-user-admin (from $GOPATH)

cd <github.com dir>
git clone git@github.com:urandom/readeef.git && cd readeef && go get
cd ~/
go build -tags postgres github.com/urandom/readeef/bin/readeef-user-admin
go build -tags postgres github.com/urandom/readeef/bin/readeef-server

I created config file (I added sslmode=disable since i got error about ssl without it)

[db]
    driver = postgres
    connect = host=/var/run/postgresql user=readeef dbname=readeef sslmode=disable
[timeout]
    connect = 1s
    read-write = 2s
[auth]
    secret = readeef

And added password-less role to postgres: sudo -u postgres createuser readeef

./readeef-user-admin -config /home/oren/config add user1 password1
Error connecting to database: pq: Peer authentication failed for user "readeef"

I modified one line in the postgers config file (/etc/postgresql/9.3/main/pg_hba.conf)
from:
local all postgres peer
to:
local all postgres md5

And restarted postgres: sudo service postgresql restart

./readeef-user-admin -config /home/oren/config add user1 password1
Error connecting to database: pq: password authentication failed for user "readeef"

@oren I managed to overcome this by creating manually db user and database
have no idea if this is the right approach
server starts but cannot load web page - probably due some bower issues

i have problems connecting to database
this is my config that works

[db]
    driver = postgres
    connect = host=172.16.223.2 user=rssuser password=rsspass sslmode=disable dbname=readeef
[timeout]
    connect = 1s
    read-write = 2s
[auth]  
    secret = ___aVerySecr3tK3y&*7h4t5h0u1dR34l1yChaNg3!_=-

@oren
The very first error you get is because go can't find the package. Doing 'go get github.com/urandom/readeef' should put it in whatever gopath you've configured. Then you can invoke 'go build ...' and successfully.

As for the postgres config, I can't really help you there. I use 'peer' authentication for postgres on my machine, which means that a system user has to exist for the corresponding db user.

I also deployed it successfully on redhat's openshift servers with a postgres cartridge. There I just use a url for the 'connect' value, e.g.:
postgres://USER:PASSWORD@HOST:PORT?sslmode=disable

@lem0na
the user admin script or the server will not create the database, or set up any database users, you'll have to do that beforehand. The user admin script only deals with readeef users.
As for not loading, anything in the error log, or the javascript console?

@urandom here is the ouput

Initializing debug output
/home/lemona/work/GoideProjects/readeef/src/github.com/urandom/readeef/feed_manager.go: 62
Starting the feed manager
[::1] -  [Sep 21, 2014 at 11:49pm (EEST)] "GET /" 200 539 "" Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0
[::1] -  [Sep 21, 2014 at 11:49pm (EEST)] "GET /dist/platform/platform.js" 404 253 "http://localhost:8080/" Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0
[::1] -  [Sep 21, 2014 at 11:49pm (EEST)] "GET /js/dom-utils.js" 200 252 "http://localhost:8080/" Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0


commented

thanks for the help!
now I also get issue with assets (404s). here are the steps:

cd <github.com dir>
git clone git@github.com:urandom/readeef.git && cd readeef && go get
go build -tags postgres github.com/urandom/readeef/bin/readeef-user-admin
go build -tags postgres github.com/urandom/readeef/bin/readeef-server

create config file: (i named it config)

[db]
    driver = postgres
    connect = host=127.0.0.1 user=readeef dbname=readeef sslmode=disable
[timeout]
    connect = 1s
    read-write = 2s
[auth]
    secret = readeef

I got authentication error and had to modify postgres config file (/etc/postgresql/9.3/main/pg_hba.conf):
(from md5 to trust)

(under IPv4 local connections)
from:
host all all 127.0.0.1/32 md5
to:
host all all 127.0.0.1/32 trust

restart postgres: sudo service postgresql restart

create user and db in postgres:

sudo -u postgres createuser readeef -W
sudo -u postgres createdb -O readeef readeef

test that you can login as readeef user:

sudo -u postgres psql
\c readeef readeef localhost

create admin user:

./readeef-user-admin -config config add user1 password1
./readeef-user-admin -config config set user1 admin true

fetch client-side libraries:

sudo npm install -g bower
bower update

run the server:
./readeef-server -port 3000 -readeef-config config 2> error.log > access.log

open the browser: 0.0.0.0:3000
I get blank page and I see some 404 on the assets. for example: http://0.0.0.0:3000/dist/platform/platform.js

error.log: http://paste.ubuntu.com/8398842/
access.log: http://paste.ubuntu.com/8398843/

@oren @lem0na
I guess that the server binary is not in the same directory that contains the static and templates directories. By default, the binary expects those directories where it is (in the current working dir!)

so make sure readeef-server is located accordingly.
here's what the current working dir contains on my setup:

readeef.conf
readeef-server
readeef-user-admin
server.conf
static
templates

@urandom same as me
i have no idea who should provide platform/platform.js but it is missing

@lem0na
platform.js comes from Polymer's platform. bower has to fetch it. I've found that sometimes bower doesn't fetch everything on a 'bower update' for whatever reason, so I just run it again. Mine's in static/dist/platform/

commented

I am in the root folder of the repo:
ls -1

~/projects/me/readeef ls -1
access.log
api
auth.go
bin
bower.json
config.go
context_util.go
db_feed.go
db.go
db_hubbub.go
db_postgres.go
db_postgres_test.go
db_sqlite3.go
db_sqlite3_test.go
db_tags.go
db_test.go
db_user.go
debug.go
error.log
feed.go
feed_manager.go
feed_manager_test.go
hubbub.go
hubbub_test.go
LICENSE
login.go
nonce.go
parser
readeef-server
readeef.svg
readeef-user-admin
README.md
session
static
templates
timeout_client.go
TODO
user.go
web

commented

i run bower update again and it's working.
very cool UI! thanks!

@oren @urandom same here - it works
I misread the docs and copied .bowerrc to static directory and run it from there
thanks for the help