Status of NUC Setup for PAN005

Team,

We are stuck with issues on our NUC setup. The current error message we are getting is: “Please set Panoptes environment variables then re-run script”.

In running “python3 setup.py test”, I am getting Errno13: Permission denied 'pocs.egg-info/PKG-INFO".

On the single test command: python3 -m pytest pocs/tests/test_messaging.py, I get the error "No module named ‘astropy’; could not load /var/panoptes/POCS/conftest.py.

I think we need to wipe the NUC clean and start over!

Thanks for the summary, and sorry for the trouble. Since I don’t know where things went wrong, let’s gather some info.

The easy way to get this info off of the NUC is to either put it on USB thumb drive or login to your email account from the NUC and mail the files to me directly (you have my email).

Could you send me these files:

  • $HOME/.profile
  • $HOME/.bashrc

And run these commands and send the files that they create in the /tmp directory:

env > /tmp/env.txt
export > /tmp/export.txt
pip freeze > /tmp/pip-freeze.txt
conda version > /tmp/conda-version.txt
conda info --envs > /tmp/conda-envs.txt
conda list > /tmp/conda-list.txt

Once we have an idea where things went wrong, we can work on improving the instructions and having you try again. I very much appreciate your assistance in this process.

FYI, I have an idea for simplifying the install process: instead of having you create the panoptes user when you setup the OS, and then perform a bunch of steps manually, we’d create and setup the panoptes user later via a script that can be downloaded and executed with a single command (ideally). This is the approach a number of major tools use, and certainly makes sense.

Thanks,
James

While we were setting up the NUC for PAN012 at Caltech, we ran into similar problems, which I believe were caused by the install-dependencies.sh script not running properly. We couldn’t figure out how to fix all of the issues, and decided to reinstall the OS and start over from scratch, making some fixes to a couple files, which did turn out to work ultimately.

We followed the instructions in the Jan 2017 consolidated instructions document up to fetching the software from Github, and then made the following changes before running install-dependencies.sh and installing the requirements for PAWS:

  • Changed ‘libpng12-dev’ to ‘libpng-dev’ in the file ${POCS}/scripts/install/apt-packages-list.txt
  • Updated the install_mongodb function inside ${POCS}/scripts/install/install-dependencies.sh to work with Ubuntu 18.04
  • In install-dependencies.sh, deleted the line CONDA_BIN=”$(which conda)” and in the next line, replaced ${CONDA_BIN} with $(which conda)

I can email/post/send by some means these updated versions of these files.

(We also made sure to use pip3 instead of pip just to really make sure packages were being installed for Python 3 rather than Python 2 - though I’m not sure how critical this is).

Aru,

Thanks for that info. Do you have any idea why your third change (CONDA_BIN) was required?

James

Thank you!!! We will try this!!!

I remember the traceback pointed me towards that line, and since ${CONDA_BIN} was the only part of the line that wasn’t just an if statement, I replaced that to see if it was the problem.

Unfortunately I don’t remember exactly what the traceback was in the first place, and can’t retrieve it now as the OS has been reinstalled since then.

FYI, I’ve written a proposal for a new setup script here: https://github.com/panoptes/POCS/issues/531

I’ve been following the steps @amukherj has laid out in order to fix some of the errors encountered when following the standard setup. While swapping the libpng package and the CONDA_BIN line of code seemed to be relatively easy fixes, I’ve had trouble with correcting the mongodb install function. Following this website: https://www.howtoforge.com/tutorial/install-mongodb-on-ubuntu/, I replaced the current lines of code for steps 1-4 with the ones on the website, updating the sudo apt-key adv, echo command, and sudo tee. The other lines were the same as those on the website. I didn’t change anything after the line that installed mongodb.

Unfortunately after running install-dependencies.sh my script hung up on the mongodb install portion and I had to abort the script. I was wondering if I could see the changes you all made in order to update/fix the function so I can hopefully get my setup working.

Thanks!

Jonah

That’s the same website I followed as well. I’ve put my updated install_mongodb function below for your reference.

install_mongodb

function install_mongodb() {

This is based on https://www.howtoforge.com/tutorial/install-mongodb-on-ubuntu/

Note this function does not configure mongodb itself, i.e. no users or

security settings.

echo_bar
echo "
Installing mongodb, for which several commands require sudo, so
you may be prompted for you password.
"
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv
2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
echo “deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse”
| sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
sudo apt-get update
sudo apt-get install -y mongodb-org
echo "[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target
Documentation=https://docs.mongodb.org/manual

[Service]
User=mongodb
Group=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf

[Install]
WantedBy=multi-user.target" | sudo tee /lib/systemd/system/mongod.service

sudo systemctl daemon-reload
sudo systemctl start mongod
sudo systemctl enable mongod
}

I’m not sure if this is what you’re describing, but when I tried to correct the script after running it for the first time, it had already installed (or at least, tried to install) the incorrect version of mongodb, so when the script runs again and tries to update the installed packages, it runs into an error when trying to update the incorrect mongodb as the package it’s looking for doesn’t exist.

To fix that, I went into the directory /etc/apt/sources.list.d and deleted mongodb-org-3.2.list - you’ll probably need to use sudo to do that.

Hopefully this helps!
Aru