What is the problem?
sudo service octoprint {start|stop|restart} does not start/stop Octoprint.
I can run octoprint from ~/Octoprint/venv/vin/octoprint
, but would like it to start on boot.
What did you already try to solve it?
I followed the guide here:
I googled around and saw that a lot of people are making the mistake of not editing /etc/default/octoprint correctly. I think I'm doing it correctly; I installed following the venv procedures.
Below is a copy/paste from my terminal. I tried to format it to make it legible but I also didn't want to not put enough information.
Logs (octoprint.log
, serial.log
or output on terminal tab at a minimum, browser error console if UI issue ... no logs, no support!)
Here is my /etc/default/octoprint
pi@prusa:/etc/init.d $ cat /etc/default/octoprint
# Configuration for /etc/init.d/octoprint
# The init.d script will only run if this variable non-empty.
OCTOPRINT_USER=pi
# base directory to use
#BASEDIR=/home/pi/.octoprint
# configuration file to use
#CONFIGFILE=/home/pi/.octoprint/config.yaml
# On what port to run daemon, default is 5000
PORT=5000
# Path to the OctoPrint executable, you need to set this to match your installation!
DAEMON=/home/pi/OctoPrint/venv/bin/octoprint
# What arguments to pass to octoprint, usually no need to touch this
DAEMON_ARGS="--port=$PORT"
# Umask of files octoprint generates, Change this to 000 if running octoprint as its own, separate user
UMASK=022
# Process priority, 0 here will result in a priority 20 process.
# -2 ensures Octoprint has a slight priority over user processes.
NICELEVEL=-2
# Should we run at startup?
START=yes
this is the path to my octoprint executable, proof it is executable, attempt to run it (provides no output), and blindly following the instructions to execute update-rc.d
pi@prusa:/etc/init.d $ readlink -f ~/Octoprint/venv/bin/octoprint
/home/pi/Octoprint/venv/bin/octoprint
pi@prusa:/etc/init.d $ ls -l | grep octo
-rwxr-xr-x 1 pi pi 3726 May 20 10:50 octoprint
pi@prusa:/etc/init.d $ echo "the /etc/init.d/octoprint is executable"
**the /etc/init.d/octoprint is executable**
pi@prusa:/etc/init.d $ ./octoprint
pi@prusa:/etc/init.d $ echo "I expect it to have some output. Never mind, I'll blindly continue the instructions"
I expect it to have some output. Never mind, I'll blindly continue the instructions
pi@prusa:/etc/init.d $ sudo update-rc.d octoprint defaults
pi@prusa:/etc/init.d $ sudo service octoprint start
pi@prusa:/etc/init.d $ echo "no output... unable to connect."
no output... unable to connect.
Below is the log file
Removed to fit in the character limit
That last log event was a half hour ago, when I last ran it normally.
Below is the output of running it again
pi@prusa:~ $ Octoprint/venv/bin/octoprint
Starting the server via "octoprint" is deprecated, please use "octoprint serve" from now on.
2020-05-20 11:05:09,656 - octoprint.startup - INFO - ******************************************************************************
2020-05-20 11:05:09,657 - octoprint.startup - INFO - Starting OctoPrint 1.4.0
2020-05-20 11:05:09,658 - octoprint.startup - INFO - ******************************************************************************
2020-05-20 11:05:09,943 - octoprint.util.connectivity_checker - INFO - Connectivity changed from offline to online
2020-05-20 11:05:10,572 - octoprint.startup - INFO - Blacklist processing done, adding 1 blacklisted plugin versions: roomtemp (any)
2020-05-20 11:05:10,599 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2020-05-20 11:05:11,199 - octoprint.plugins.octoprint.plugins.discovery - INFO - pybonjour is not installed, Zeroconf Discovery won't be available
2020-05-20 11:05:11,208 - octoprint.plugin.core - INFO - Found 15 plugin(s) providing 15 mixin implementations, 27 hook handlers
2020-05-20 11:05:11,294 - octoprint.server.heartbeat - INFO - Starting server heartbeat, 900.0s interval
2020-05-20 11:05:11,308 - octoprint.server - INFO - Intermediary server started
2020-05-20 11:05:11,308 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2020-05-20 11:05:11,369 - octoprint.plugin.core - INFO - Found 15 plugin(s) providing 15 mixin implementations, 27 hook handlers
2020-05-20 11:05:11,385 - octoprint.filemanager.storage - INFO - Initializing the file metadata for /home/pi/.octoprint/uploads...
2020-05-20 11:05:11,386 - octoprint.filemanager.storage - INFO - ... file metadata for /home/pi/.octoprint/uploads initialized successfully.
2020-05-20 11:05:11,389 - octoprint.server - INFO - Added new permission from plugin action_command_prompt: PLUGIN_ACTION_COMMAND_PROMPT_INTERACT (needs: u"Need(method='role', value=u'plugin_action_command_prompt_interact')")
2020-05-20 11:05:11,390 - octoprint.server - INFO - Added new permission from plugin announcements: PLUGIN_ANNOUNCEMENTS_READ (needs: u"Need(method='role', value=u'plugin_announcements_read')")
2020-05-20 11:05:11,390 - octoprint.server - INFO - Added new permission from plugin announcements: PLUGIN_ANNOUNCEMENTS_MANAGE (needs: u"Need(method='role', value=u'plugin_announcements_manage'), Need(method='role', value=u'plugin_announcements_read')")
2020-05-20 11:05:11,392 - octoprint.server - INFO - Added new permission from plugin appkeys: PLUGIN_APPKEYS_ADMIN (needs: u"Need(method='role', value=u'plugin_appkeys_admin')")
2020-05-20 11:05:11,392 - octoprint.server - INFO - Added new permission from plugin backup: PLUGIN_BACKUP_ACCESS (needs: u"Need(method='role', value=u'plugin_backup_access')")
2020-05-20 11:05:11,393 - octoprint.server - INFO - Added new permission from plugin logging: PLUGIN_LOGGING_MANAGE (needs: u"Need(method='role', value=u'plugin_logging_manage')")
2020-05-20 11:05:11,395 - octoprint.server - INFO - Added new permission from plugin pi_support: PLUGIN_PI_SUPPORT_STATUS (needs: u"Need(method='role', value=u'plugin_pi_support_check')")
2020-05-20 11:05:11,396 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_MANAGE (needs: u"Need(method='role', value=u'plugin_pluginmanager_manage')")
2020-05-20 11:05:11,397 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_INSTALL (needs: u"Need(method='role', value=u'plugin_pluginmanager_install'), Need(method='role', value=u'plugin_pluginmanager_manage')")
2020-05-20 11:05:11,398 - octoprint.server - INFO - Added new permission from plugin printer_safety_check: PLUGIN_PRINTER_SAFETY_CHECK_DISPLAY (needs: u"Need(method='role', value=u'plugin_printer_safety_check_display')")
2020-05-20 11:05:11,399 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_CHECK (needs: u"Need(method='role', value=u'plugin_softwareupdate_check')")
2020-05-20 11:05:11,400 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_UPDATE (needs: u"Need(method='role', value=u'plugin_softwareupdate_update')")
2020-05-20 11:05:11,425 - octoprint.plugins.softwareupdate - INFO - Loaded version cache from disk
2020-05-20 11:05:11,895 - octoprint.util.pip - INFO - Using "/home/pi/Octoprint/venv/bin/python2 -m pip" as command to invoke pip
2020-05-20 11:05:12,360 - octoprint.util.pip - INFO - Version of pip is 20.1.1
2020-05-20 11:05:12,361 - octoprint.util.pip - INFO - pip installs to /home/pi/Octoprint/venv/lib/python2.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2020-05-20 11:05:12,362 - octoprint.util.pip - INFO - ==> pip ok -> yes
2020-05-20 11:05:12,366 - octoprint.plugin.core - INFO - Initialized 15 plugin implementation(s)
2020-05-20 11:05:12,372 - octoprint.plugin.core - INFO - 15 plugin(s) registered with the system:
| Action Command Prompt Support (bundled) = /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins/action_command_prompt
| Announcement Plugin (bundled) = /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins/announcements
| Anonymous Usage Tracking (bundled) = /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins/tracking
| Application Keys Plugin (bundled) = /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins/appkeys
| Backup & Restore (bundled) = /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins/backup
| Core Wizard (bundled) = /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins/corewizard
| Discovery (bundled) = /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins/discovery
| Error Tracking (bundled) = /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins/errortracking
| Logging (bundled) = /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins/logging
| Login UI (bundled) = /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins/loginui
| Pi Support Plugin (bundled) = /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins/pi_support
| Plugin Manager (bundled) = /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins/pluginmanager
| Printer Safety Check (bundled) = /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins/printer_safety_check
| Software Update (bundled) = /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins/softwareupdate
| Virtual Printer (bundled) = /home/pi/Octoprint/venv/lib/python2.7/site-packages/octoprint/plugins/virtual_printer
Prefix legend: ! = disabled, # = blacklisted, * = incompatible
2020-05-20 11:05:12,382 - octoprint.environment - INFO - Detected environment is Python 2.7.16 under Linux (linux2). Details:
| hardware:
| cores: 4
| freq: 1500.0
| ram: 4095750144
| os:
| id: linux
| platform: linux2
| plugins:
| pi_support:
| model: Raspberry Pi 4 Model B Rev 1.2
| python:
| pip: 20.1.1
| version: 2.7.16
| virtualenv: /home/pi/Octoprint/venv
2020-05-20 11:05:12,389 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/webassets...
2020-05-20 11:05:12,403 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/.webassets-cache...
2020-05-20 11:05:12,845 - octoprint.server - INFO - Shutting down intermediary server...
2020-05-20 11:05:13,335 - octoprint.server - INFO - Intermediary server shut down
2020-05-20 11:05:13,337 - octoprint.events - INFO - Processing startup event, this is our first event
2020-05-20 11:05:13,337 - octoprint.events - INFO - Adding 1 events to queue that were held back before startup event
2020-05-20 11:05:13,340 - octoprint.filemanager - INFO - Adding backlog items from all storage types to analysis queue...
2020-05-20 11:05:13,346 - octoprint.server.util.watchdog - INFO - Running initial scan on watched folder...
2020-05-20 11:05:13,366 - octoprint.filemanager - INFO - Added 0 items from storage type "local" to analysis queue
2020-05-20 11:05:13,366 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2020-05-20 11:05:13,391 - octoprint.server.util.watchdog - INFO - ... initial scan done.
2020-05-20 11:05:13,662 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance on prusa for SSDP
2020-05-20 11:05:14,197 - octoprint.server - INFO - Listening on http://0.0.0.0:5000 and http://[::]:5000
2020-05-20 11:05:14,277 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2020-05-20 11:05:15,077 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2020-05-20 11:05:15,079 - octoprint.util.pip - INFO - Using "/home/pi/Octoprint/venv/bin/python2 -m pip" as command to invoke pip
2020-05-20 11:05:15,086 - octoprint.util.pip - INFO - pip installs to /home/pi/Octoprint/venv/lib/python2.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2020-05-20 11:05:15,086 - octoprint.util.pip - INFO - ==> pip ok -> yes
2020-05-20 11:05:15,135 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2020-05-20 11:05:15,220 - octoprint.server.preemptive_cache - INFO - Preemptively caching / (ui _default) for {'query_string': 'l10n=en', 'path': '/', 'base_url': 'http://192.168.0.17:5000/'}
2020-05-20 11:05:15,763 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 4}
2020-05-20 11:05:16,350 - octoprint.plugins.tracking - INFO - Sent tracking event startup, payload: {'python': '2.7.16', 'ram': 4095750144L, 'version': u'1.4.0', 'pip': '20.1.1', 'cores': 4, 'freq': 1500.0, u'pi_model': u'Raspberry Pi 4 Model B Rev 1.2', 'os': 'linux'}
2020-05-20 11:05:16,974 - octoprint.plugins.tracking - INFO - Sent tracking event pong, payload: {'plugins': u''}
2020-05-20 11:05:18,885 - octoprint.server.preemptive_cache - INFO - ... done in 3.66s
2020-05-20 11:05:18,885 - octoprint.server.preemptive_cache - INFO - Preemptively caching / (ui _default) for {'query_string': 'l10n=en', 'path': '/', 'base_url': 'http://127.0.0.1:5000/'}
Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible)
Octoprint v1.4.0
Rasbian Buster
*I am manually installing Octoprint because I am also running CNCjs on the same machine.