Setting up OctoPrint on a Raspberry Pi running Raspbian


#43

Don't forget to set your locale before starting a virtualenv, it's not set by default on some distributions... (I'm using a NanoPi Neo with FriendlyCore (base on UbuntuCore) Image File, Kernel: Linux-4.14)

export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"

#44

So I tried this on a xubuntu host and I managed to follow the instructions without too much hiccups. But I couldn't get the autostart scripts to work for the life of me (nor the octoprint, nor the mjpg-streamer worked). I tried poking around in them, adjusting them to my folder structure and username but they didn't work none the less. I type in "sudo service octoprint start" and it just echoes back to me something like "octoprint started" and then stops and doesn't do anything. Can somebody give me some recommendations where to look? Sorry if I didn't provide sufficient information I really don't know what else I could do to this to make it work.


#45

What does 'stops' mean? It returns you to the shell? Or hangs? Generally that is the correct behavior, Octoprint is running in the background.


#46

Sorry for not being clear, what I mean about "stops" is that it returns to the command prompt waiting for an input (I can see how that can be misunderstood). My first thought was also that it must run in the background but I tried loading the website and it either returned back with connection lost (if the page have been loaded before the server restarted) or just loaded for a long time. I might just have been a little impatient, will keep testing tomorow. Thanks a bunch for the help, it has cleared something up. If you have any other suggestions, please do share


#47

Look for the logs. Also run this:

ps waxu | grep octoprint

and post the output.


#48

at startup

avahi      368  0.0  0.2   6160  2956 ?        Ss   07:47   0:00 avahi-daemon: running [octoprint.local]
root       887  0.0  0.3   8920  3568 ?        S    07:47   0:00 /bin/bash /home/octoprint/scripts/webcamDaemon
octopri+  1407  0.0  0.0   8084   788 pts/0    S+   07:49   0:00 grep --color=auto octoprint

after manualy running the script

avahi      368  0.0  0.2   6160  2956 ?        Ss   07:47   0:00 avahi-daemon: running [octoprint.local]
root       887  0.0  0.3   8920  3568 ?        S    07:47   0:00 /bin/bash /home/octoprint/scripts/webcamDaemon
octopri+  1429  2.6  3.1 119984 31712 ?        Sl   07:50   0:01 mousepad /home/octoprint/Desktop/out
octopri+  1472  0.0  0.0   8084   796 pts/0    S+   07:51   0:00 grep --color=auto octoprint

after manualy running the server

avahi      368  0.0  0.2   6160  2956 ?        Ss   07:47   0:00 avahi-daemon: running [octoprint.local]
root       887  0.0  0.3   8920  3568 ?        S    07:47   0:00 /bin/bash /home/octoprint/scripts/webcamDaemon
octopri+  1429  1.1  3.1 119984 31712 ?        Sl   07:50   0:01 mousepad /home/octoprint/Desktop/out
octopri+  1520 14.8  4.3 208168 44348 pts/0    Sl+  07:52   0:05 /home/octoprint/OctoPrint/venv/bin/python2 ./octoprint
octopri+  1698  0.0  0.0   8084   820 pts/1    S+   07:52   0:00 grep --color=auto octoprint

#49

It appears to be running in the third case.


#50

It is. And that's because I started it myself and posted it for comparison's sake. Still the problem remains. After running sudo service octoprint status it get's back with a warning for fake startup-deamon could that be the problem?

EDIT: running mv /sbin/start-stop-daemon.REAL /sbin/start-stop-daemon a solution found online for the above mentioned warning message, looks like it fixed the problem. Posted the solution here for people having the same problem


#51

It is. And that's because I started it myself and posted it for comparison's sake. Still the problem remains


#52

I seem to have the same problem. I see you found a solution online, but any reasons as to why it works?

UPDATE: I think I figured out the issue (I'm assuming @Bence_Voros was also setting up octo on a non raspberry pi computer). If you're not using a pi you need to change the username pi to whatever your username is in the /etc/default/octoprint (there should be two places you need to change it)