Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs for users that have to run sudo #4

Closed
bungledual opened this issue Nov 15, 2016 · 15 comments

Comments

Projects
None yet
2 participants
@bungledual
Copy link

commented Nov 15, 2016

Running scripts on a Synology NAS. All ok so far, until

sudo venv/bin/docker-compose up -d

WARNING: The PWD variable is not set. Defaulting to a blank string.
Creating network "nzedb_default" with the default driver
Pulling adminer (clue/adminer:latest)...
latest: Pulling from clue/adminer
c02c7df4a131: Pull complete
a3ed95caeb02: Pull complete
bb0fa26d97bb: Pull complete
518c300041b3: Pull complete
93ec8e11265d: Pull complete
d4786dceebc8: Pull complete
7d567bf6b87b: Pull complete
34ab4e90e8cc: Pull complete
cbeb7eed8263: Pull complete
f159bb6a2c50: Pull complete
b5075b8e42e3: Pull complete
ffcee4e4f013: Pull complete
bdb5893c1bbf: Pull complete
Digest: sha256:47a888a40a1b24c8a49a34169ee4ef618e5a013076fb61424e4ce20629170a66
Status: Downloaded newer image for clue/adminer:latest
Creating nzedb_database_1

ERROR: for database Cannot start service database: stat /data/var_lib_mysql: no such file or directory
ERROR: Encountered errors while bringing up the project.

Any help?

@slydetector

This comment has been minimized.

Copy link
Owner

commented Nov 15, 2016

@bungledual Hmm, looks like the value of environment variable PWD is empty, hence the blank string causes paths to be rooted at /data/var_lib_mysql instead of /home/user/whatever/nzedb/data/var_lib_mysql.

This is going to affect most of the scripts. Set the PWD environment variable explicitly before running any of the scripts like so and let me know if that works.

# Assuming you're using bash
export PWD=$(pwd)
@bungledual

This comment has been minimized.

Copy link
Author

commented Nov 15, 2016

So removed everything and started again. Here you can see I did the export, but still get PWD empty.

admin@RowanBackup:~/nzedb$ export PWD=$(pwd)

admin@RowanBackup:~/nzedb$ echo $PWD

/var/services/homes/admin/nzedb

admin@RowanBackup:~/nzedb$ sudo ./venv/bin/docker-compose stop --timeout 60

WARNING: The PWD variable is not set. Defaulting to a blank string.

@slydetector

This comment has been minimized.

Copy link
Owner

commented Nov 15, 2016

Looks like you need sudo --preserve-env for your environment variables to get passed to the sudo executed process. So your docker install doesn't create a docker group? What is the output to groups?

@bungledual

This comment has been minimized.

Copy link
Author

commented Nov 15, 2016

Thanks for your quick feedback. Getting closer now. I really do appreciate your help.

I used the --preserve-env variables to start the processes successfully. Issue now I guess could be groups. When installing Docker on a Synology, there are no new groups or users created. I have only groups of Admins, http, and Users.

I ran through the nzedb setup and all worked fine, test connected to my news host ok, and I now have Install complete screen.

On trying to "Applying sane defaults to settings database table"
"sudo --preserve-env cat etc/defaults.sql | docker exec -i basename $PWD_database_1 mysql --user=nzedb --password=nzedb nzedb"

I get

Password: Cannot connect to the Docker daemon. Is the docker daemon running on this host?

My docker environment show 3 containers running, adminer, database and nzedb.

@slydetector

This comment has been minimized.

Copy link
Owner

commented Nov 15, 2016

Having to sudo causes all sorts of little issues 😞. This looks like everything up to the first | runs as sudo and everything after it doesn't. Are you running the script and not the actual contents of the script?

Good:

sudo --preserve-env bin/apply_defaults

Bad:

sudo --preserve-env cat etc/defaults.sql | docker exec -i basename $PWD_database_1 mysql --user=nzedb --password=nzedb nzedb
@bungledual

This comment has been minimized.

Copy link
Author

commented Nov 15, 2016

I wasn't using the scripts. I was hoping to learn a bit more by running manually. I'm a total newb in Linux.
Anyway the Great news is I ran the remaining scripts and was able to update_bins and update_releases, Crossed over to the site and I have releases. - Nice one.

Thanks so much for your assistance. This really helped a lot. I thought the Synology NAS could do it as I have a Newznab system up and running on a box already.
Happy to help with any other testing you want. Especially when it comes to tmux etc.

Thanks once again.

@slydetector

This comment has been minimized.

Copy link
Owner

commented Nov 15, 2016

Awesome! Someone has to be the first 😄. I'd like to add some documentation to address the need to run sudo so I'll leave this issue open to address that task.

@slydetector slydetector changed the title Fail on start_nzedb Update docs for users that have to run sudo Nov 15, 2016

@bungledual

This comment has been minimized.

Copy link
Author

commented Nov 16, 2016

On further checking, I note another issue, which may be related to my sudo usage. I can't use the Top line radio buttons, ie Search / New Release / COnent Page / TV Series / Theaters/ etc.
Do you think I should reinstall from scratch using only scripts?

@slydetector

This comment has been minimized.

Copy link
Owner

commented Nov 16, 2016

That is actually a problem I've had too. I don't know where the issue lies, but if you change the Theme to Gamma or something else, some of the links may work. I'm inclined to say the issue may be with the theme or nZEDb but I don't know for sure. I'm actually going to git bisect based on old releases of nZEDb and see if I can find a release where it actually works.

@bungledual

This comment has been minimized.

Copy link
Author

commented Nov 16, 2016

Using MS Explorer, if I click on "TV Series" I get Not a valid address message with the link "http://:8800/series" shown.
If I add my ip address to that link, "http://192.168.1.198:8800/series" I can get to the TV Series page.
Something is passing the IP address across. I stayed with default theme.

@slydetector

This comment has been minimized.

Copy link
Owner

commented Nov 16, 2016

Broken links fixed in #6
You'll have to pull master and then rerun bin/build_nzedb and bin/setup_data_dir. Can't guarantee that it will work via ip address, but the config is setup so it uses whatever the output to hostname is.

@bungledual

This comment has been minimized.

Copy link
Author

commented Nov 16, 2016

K. Will rebuild tomorrow and report back.

@bungledual

This comment has been minimized.

Copy link
Author

commented Nov 16, 2016

OK. I had some spare time and have just rebuilt from scratch. The menu bars now work correctly.
Next issue, is that if I choose TV / All TV, I can download an NZB for a show.
If I choose a show via TV Series top menu, I can't download nzbs.

@slydetector

This comment has been minimized.

Copy link
Owner

commented Nov 19, 2016

Works for me. You can open a different issue if you have more details.

@bungledual

This comment has been minimized.

Copy link
Author

commented Nov 21, 2016

I reinstalled using new build, including tmux. All now working.

Thank you.

@slydetector slydetector closed this Jan 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.