OpenBazaar / OpenBazaar-Server

(Deprecated) OpenBazaar 1.0 Server daemon for communication with OpenBazaar-Client
MIT License
608 stars 173 forks source link

Daemon doesn't start correctly on RaspberryPi3 Model B #490

Open nhoeche opened 8 years ago

nhoeche commented 8 years ago

Brief Description: OpenBazaar server doesn't start correctly

Operating System (OS and version): Raspbian Jessie Lite OpenBazaar version: Hardware: Raspberry Pi 3 Model B

Reproducible (Always / Almost Always / Sometimes / Rarely / Couldn't Reproduce): Haven't really tried, this is my first issue, might just be a wrong configuration

Steps to reproduce:

  1. Install OpenBazaar server and Setup store page (on a Raspberry Pi)
  2. Setup cd /OpenBazaar-Server/ && python openbazaard.py -d -a 0.0.0.0 to be executed at startup
  3. reboot system

Observed Behavior:

Sep 28 00:01:22 raspberrypi openbazaar.sh[993]: python: can't open file '~/OpenBazaar-Server/openbazaard.py': [Errno 2] No such file or directory
Sep 28 00:01:22 raspberrypi systemd[1]: openbazaar.service: control process exited, code=exited status=2
Sep 28 00:01:22 raspberrypi systemd[1]: Unit openbazaar.service entered failed state.

Expected Behavior:

OpenBazaar should start normally

Additional info (links, images, etc go here):

The file openbazaard.py is definitely present, OpenBazaar is installed correctly. htop shows the job running (4 times with different pid's) screenshot from 2016-09-28 14-08-32 After installing the server everything worked just fine. I could connect from clients on my desktop pc and notebook. After reboot it doesn't start correctly it seems.

This is the first issue i submit, i hope it doesn't already exist and i did everything right.

djmaze commented 8 years ago

I am not sure how you set up the service for autostart. It seems the openbazaar.service or rather the openbazaar.sh expects the directory OpenBazaar-Server to exist in your home directory, but you probably copied it to the filesystem root at /.

Is the openbazaar.service configured to run the service as root? Then you have to move the directory to /root/ for this to work. If it runs as another user, move it to the proper home directory inside /home/. (You can find out the user by running systemctl cat openbazaar | grep User. If there is no output, it is root.)

schwab commented 8 years ago

@cripcate, did you ever get your issue sorted out? I was able to get ob server working on an RPi3 using docker. I'ts posted at https://github.com/schwab/raspbpython if you want to try building and running it that way.

djmaze commented 8 years ago

@cripcate You can also try with my updated version of the original Docker config. Just check out this branch, replace FROM ubuntu:16.04 with FROM armhf/ubuntu:16.04 in the Dockerfile and follow the Docker instructions in the README. (Works for me on my ARM server.)

nhoeche commented 7 years ago

I am very sorry, I have completely forgotten about this. I'll ltry out your suggestions as fast as possible. I never used docker tho. UPDATE: i installed the server daemon in /home/pi/ and am executing it as the user pi. If I check it with systemctl cat openbazaar | grep User it delivers no output though. The daemon seems not to start at all on startup now. I put su pi -c 'python openbazaard.py -d -a 0.0.0.0' in rc.local to start it on reboot. Copying the Daemon to /root/ didn't help.

mariodian commented 7 years ago

Please have a look at one of my scripts depending on your environment.

If you use Raspbian then Systemd script is the right one for you.