On a freshly installed debian jessie 8, after building the daemon and configuring the database as instructed, I get the following error:
```
root@localhost:~/local# srndv2 setup
2015/10/20 19:19:54 Setting up SRNd base...
2015/10/20 19:19:54 checking for configs...
2015/10/20 19:19:54 loading config...
2015/10/20 19:19:54 frontend configured in srnd.ini
2015/10/20 19:19:54 frontend enabled in srnd.ini
2015/10/20 19:19:54 validating configs...
2015/10/20 19:19:54 configs are valid
2015/10/20 19:19:54 connecting to database...
2015/10/20 19:19:54 Connecting to postgres...
2015/10/20 19:19:54 ensure that the database is created...
2015/10/20 19:19:54 cannot create table Newsgroups, pq: Peer authentication failed for user "srnd", login was 'user=srnd password=srnd host=/var/run/postgresql port=5432 client_encoding='UTF8''
root@localhost:~/local#
```
I used the recommended default srnd as password and I don't know why table creation fails. When I try to get to the directory as postgres, I get:
```
cd: /root/local/: Permission denied
or
cd: /root/go/bin/: Permission denied
```
so I assume I am not supposed to be running srndv2 setup as postgres.
postgres seems to be running:
```
anon@localhost:~$ ps -A | grep postgres
27934 ? 00:00:00 postgres
27936 ? 00:00:00 postgres
27937 ? 00:00:00 postgres
27938 ? 00:00:00 postgres
27939 ? 00:00:00 postgres
27940 ? 00:00:00 postgres
anon@localhost:~$
```
<!-- github-sync-id:112481582 -->
2015-10-20 19:05:36 EDT [28020-1] srnd@srnd LOG: provided user name (srnd) and authenticated user name (root) do not match
2015-10-20 19:05:36 EDT [28020-2] srnd@srnd FATAL: Peer authentication failed for user "srnd"
2015-10-20 19:05:36 EDT [28020-3] srnd@srnd DETAIL: Connection matched pg_hba.conf line 90: "local all all peer"
there is no /usr/local/go
seems export GOROOT=$HOME/local/go is setting it to /usr/local/go although what it wants is in /home/anon/local/go
so did
anon@localhost:~/local$ tar -C /usr/local/ -xzvf go-stable.tar.gz
I still get error on
root@localhost:/home/anon# /usr/local/go/bin/go get -u github.com/majestrate/srndv2
for whatever reason, seems there is an srndv2 executable in /home/anon/go/bin/ and i am able to change directory into it as srnd
2015/10/20 22:07:47 Setup done
So clean up the setup info it doesn't work for freshly installed debian, just tested.
Looked into logs, found
```
2015-10-20 19:05:36 EDT [28020-1] srnd@srnd LOG: provided user name (srnd) and authenticated user name (root) do not match
2015-10-20 19:05:36 EDT [28020-2] srnd@srnd FATAL: Peer authentication failed for user "srnd"
2015-10-20 19:05:36 EDT [28020-3] srnd@srnd DETAIL: Connection matched pg_hba.conf line 90: "local all all peer"
```
so it seems I neeeeeed to make a srnd user
```
useradd srnd
passwd srnd
mkdir /home/srnd/
chown srnd /home/srnd/
```
srndv2 setup then unsurprising does nothing, not found
okay so
```
$ go get -u github.com/majestrate/srndv2
sh: 3: go: not found
```
okay great
```
$ /home/anon/local/go get -u github.com/majestrate/srndv2
sh: 5: /home/anon/local/go: Permission denied
```
yeah, probs should've installed go as srnd
```
root@localhost:/home/srnd# /home/anon/local/go/bin/go get -u github.com/majestrate/srndv2
go: cannot find GOROOT directory: /usr/local/go
```
there is no /usr/local/go
seems export GOROOT=$HOME/local/go is setting it to /usr/local/go although what it wants is in /home/anon/local/go
so did
```
anon@localhost:~/local$ tar -C /usr/local/ -xzvf go-stable.tar.gz
```
I still get error on
```
root@localhost:/home/anon# /usr/local/go/bin/go get -u github.com/majestrate/srndv2
```
for whatever reason, seems there is an srndv2 executable in /home/anon/go/bin/ and i am able to change directory into it as srnd
```
2015/10/20 22:07:47 Setup done
```
So clean up the setup info it doesn't work for freshly installed debian, just tested.
<!-- github-comment-id:149749051 -->
how about suggesting creation of srnd user since the db seems to need same user accessing as what you set, at least mention it there
helps, not much though.
how about suggesting creation of srnd user since the db seems to need same user accessing as what you set, at least mention it there
<!-- github-comment-id:149914329 -->
set up the daemon, you'll probably want to do this as the same user as you assigned owner of the database:
srndv2 setup
although I really don't think that's even what you want to do
Most of the stuff not done as root should probably be done as srnd user, database access requires it and for that it seems it needs go set up and configured for srnd user too. That or I suck but I think go needs to be installed and set up as srnd user to work.
running.md could be changed to
set up the daemon, you'll probably want to do this as the same user as you assigned owner of the database:
```
srndv2 setup
```
although I really don't think that's even what you want to do
Most of the stuff not done as root should probably be done as srnd user, database access requires it and for that it seems it needs go set up and configured for srnd user too. That or I suck but I think go needs to be installed and set up as srnd user to work.
<!-- github-comment-id:149918730 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
On a freshly installed debian jessie 8, after building the daemon and configuring the database as instructed, I get the following error:
I used the recommended default srnd as password and I don't know why table creation fails. When I try to get to the directory as postgres, I get:
so I assume I am not supposed to be running srndv2 setup as postgres.
postgres seems to be running:
Looked into logs, found
so it seems I neeeeeed to make a srnd user
srndv2 setup then unsurprising does nothing, not found
okay so
okay great
yeah, probs should've installed go as srnd
there is no /usr/local/go
seems export GOROOT=$HOME/local/go is setting it to /usr/local/go although what it wants is in /home/anon/local/go
so did
I still get error on
for whatever reason, seems there is an srndv2 executable in /home/anon/go/bin/ and i am able to change directory into it as srnd
So clean up the setup info it doesn't work for freshly installed debian, just tested.
you ran some parts as root that were not supposed to be run as root, trying to figure out which ones.
kk clarify instructions pls cuz it took me two hours
as a rule of thumb, never use root unless you absolutely have to.
gee thanks
re-ordering the instructions in build.md tell me if they added clarity to the process.
helps, not much though.
how about suggesting creation of srnd user since the db seems to need same user accessing as what you set, at least mention it there
running.md could be changed to
set up the daemon, you'll probably want to do this as the same user as you assigned owner of the database:
although I really don't think that's even what you want to do
Most of the stuff not done as root should probably be done as srnd user, database access requires it and for that it seems it needs go set up and configured for srnd user too. That or I suck but I think go needs to be installed and set up as srnd user to work.