Web interface not available

What is the problem?
I have installed Ocotprint on my Raspberry following these instructions Link
If I start the process: ~/Octo/venv/bin/octoprint serve the web interface is accessible under ip:5000.
I start the service: sudo service octoprint restart
If the web interface is not accessible under ip:5000.
But according to the status the service is running. Does anyone have an idea what the error is?

pi@raspberrypi:~ $ sudo service octoprint start
pi@raspberrypi:~ $ sudo service octoprint status
โ— octoprint.service - LSB: OctoPrint daemon
   Loaded: loaded (/etc/init.d/octoprint; generated)
   Active: active (exited) since Fri 2020-01-24 22:38:32 CET; 1s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 27552 ExecStart=/etc/init.d/octoprint start (code=exited, status=0/SUCCESS)

Jan 24 22:38:32 raspberrypi systemd[1]: Starting LSB: OctoPrint daemon...
Jan 24 22:38:32 raspberrypi systemd[1]: Started LSB: OctoPrint daemon.

Logs

These are old logs, current is 24.1.2020 23:50

Summary
2020-01-24 11:00:38,940 - octoprint.startup - INFO - Starting OctoPrint 1.3.12
2020-01-24 11:00:38,942 - octoprint.startup - INFO - ******************************************************************************
2020-01-24 11:00:39,523 - octoprint.util.connectivity_checker - INFO - Connectivity changed from offline to online
2020-01-24 11:00:39,557 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2020-01-24 11:00:41,277 - octoprint.plugins.octoprint.plugins.discovery - INFO - pybonjour is not installed, Zeroconf Discovery won't be available
2020-01-24 11:00:41,291 - octoprint.plugin.core - INFO - Found 16 plugin(s) providing 16 mixin implementations, 25 hook handlers
2020-01-24 11:00:41,549 - octoprint.server.heartbeat - INFO - Starting server heartbeat, 900.0s interval
2020-01-24 11:00:41,595 - octoprint.server - INFO - Intermediary server started
2020-01-24 11:00:41,598 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2020-01-24 11:00:41,791 - octoprint.plugin.core - INFO - Found 16 plugin(s) providing 16 mixin implementations, 25 hook handlers
2020-01-24 11:00:41,839 - octoprint.filemanager.storage - INFO - Initializing the file metadata for /home/pi/.octoprint/uploads...
2020-01-24 11:00:42,423 - octoprint.filemanager.storage - INFO - ... file metadata for /home/pi/.octoprint/uploads initialized successfully.
2020-01-24 11:00:42,476 - octoprint.plugins.softwareupdate - INFO - Loaded version cache from disk
2020-01-24 11:00:43,556 - octoprint.util.pip - INFO - Using "/home/pi/Octo/venv/bin/python -m pip" as command to invoke pip
2020-01-24 11:00:44,467 - octoprint.util.pip - INFO - Version of pip is 20.0.1
2020-01-24 11:00:44,470 - octoprint.util.pip - INFO - pip installs to /home/pi/Octo/venv/lib/python2.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2020-01-24 11:00:44,471 - octoprint.util.pip - INFO - ==> pip ok -> yes
2020-01-24 11:00:44,483 - octoprint.plugin.core - INFO - Initialized 16 plugin implementation(s)
2020-01-24 11:00:44,506 - octoprint.plugin.core - INFO - 16 plugin(s) registered with the system:
|  Action Command Prompt Support (bundled) = /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins/action_command_prompt
|  Announcement Plugin (bundled) = /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins/announcements
|  Anonymous Usage Tracking (bundled) = /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins/tracking
|  Application Keys Plugin (bundled) = /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins/appkeys
|  Backup & Restore (bundled) = /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins/backup
|  Core Wizard (bundled) = /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins/corewizard
|  Discovery (bundled) = /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins/discovery
|  Error Tracking (bundled) = /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins/errortracking
|  Force Login (bundled) = /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins/forcelogin
|  Logging (bundled) = /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins/logging
|  Malyan/Monoprice Connection Fix (0.1.3) = /home/pi/Octo/venv/local/lib/python2.7/site-packages/octoprint_malyan_connection_fix
|  Pi Support Plugin (bundled) = /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins/pi_support
|  Plugin Manager (bundled) = /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins/pluginmanager
|  Printer Safety Check (bundled) = /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins/printer_safety_check
|  Software Update (bundled) = /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins/softwareupdate
|  Virtual Printer (bundled) = /home/pi/Octo/venv/lib/python2.7/site-packages/octoprint/plugins/virtual_printer
2020-01-24 11:00:44,530 - octoprint.environment - INFO - Detected environment is Python 2.7.16 under Linux (linux2). Details:
|  hardware:
|    cores: 4
|    freq: 1400.0
|    ram: 971055104
|  os:
|    id: linux
|    platform: linux2
|  plugins:
|    pi_support:
|      model: Raspberry Pi 3 Model B Plus Rev 1.3
|  python:
|    pip: 20.0.1
|    version: 2.7.16
|    virtualenv: /home/pi/Octo/venv
2020-01-24 11:00:44,548 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/webassets...
2020-01-24 11:00:44,571 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/.webassets-cache...
2020-01-24 11:00:45,760 - octoprint.server - INFO - Shutting down intermediary server...
2020-01-24 11:00:46,112 - octoprint.server - INFO - Intermediary server shut down
2020-01-24 11:00:46,116 - octoprint.events - INFO - Processing startup event, this is our first event
2020-01-24 11:00:46,118 - octoprint.events - INFO - Adding 1 events to queue that were held back before startup event
2020-01-24 11:00:46,131 - octoprint.filemanager - INFO - Adding backlog items from all storage types to analysis queue...
2020-01-24 11:00:46,157 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2020-01-24 11:00:46,164 - octoprint.server.util.watchdog - INFO - Running initial scan on watched folder...
2020-01-24 11:00:46,169 - octoprint.filemanager - INFO - Added 0 items from storage type "local" to analysis queue
2020-01-24 11:00:46,189 - octoprint.server.util.watchdog - INFO - ... initial scan done.
2020-01-24 11:00:46,434 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance on raspberrypi for SSDP
2020-01-24 11:00:46,673 - octoprint.server - INFO - Listening on http://0.0.0.0:5000 and http://[::]:5000
2020-01-24 11:00:46,745 - tornado.access - WARNING - 404 GET /intermediary.gif?_=1579860046464 (192.168.54.28) 50.32ms
2020-01-24 11:00:46,823 - octoprint.plugins.announcements - INFO - Loaded channel _important from https://octoprint.org/feeds/important.xml in 0.65s
2020-01-24 11:00:46,849 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2020-01-24 11:00:47,118 - octoprint.server.util.flask - INFO - Passively logging in user Woun from 192.168.54.28
2020-01-24 11:00:47,417 - octoprint.plugins.announcements - INFO - Loaded channel _important from https://octoprint.org/feeds/important.xml in 0.64s
2020-01-24 11:00:47,526 - tornado.access - WARNING - 404 GET /cached.gif?_=1579860046818 (192.168.54.28) 479.70ms
2020-01-24 11:00:47,531 - octoprint.plugins.pluginmanager - INFO - Loaded plugin notices data from https://plugins.octoprint.org/notices.json
2020-01-24 11:00:47,891 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2020-01-24 11:00:47,988 - octoprint.util.pip - INFO - Using "/home/pi/Octo/venv/bin/python -m pip" as command to invoke pip
2020-01-24 11:00:47,991 - octoprint.util.pip - INFO - pip installs to /home/pi/Octo/venv/lib/python2.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2020-01-24 11:00:47,994 - octoprint.util.pip - INFO - ==> pip ok -> yes
2020-01-24 11:00:48,086 - tornado.access - WARNING - 404 GET /intermediary.gif?_=1579860047748 (192.168.54.28) 69.37ms
2020-01-24 11:00:48,230 - octoprint.plugins.announcements - INFO - Loaded channel _releases from https://octoprint.org/feeds/releases.xml in 0.41s
2020-01-24 11:00:48,691 - octoprint.server.util.flask - INFO - Passively logging in user Woun from 192.168.54.28
2020-01-24 11:00:48,971 - octoprint.plugins.announcements - INFO - Loaded channel _releases from https://octoprint.org/feeds/releases.xml in 0.74s
2020-01-24 11:00:49,053 - tornado.access - WARNING - 404 GET /cached.gif?_=1579860048500 (192.168.54.28) 518.21ms
2020-01-24 11:00:49,389 - octoprint.plugins.announcements - INFO - Loaded channel _blog from https://octoprint.org/feeds/octoblog.xml in 0.33s
2020-01-24 11:00:50,233 - octoprint.util.pip - INFO - Using "/home/pi/Octo/venv/bin/python -m pip" as command to invoke pip
2020-01-24 11:00:50,404 - octoprint.plugins.announcements - INFO - Loaded channel _plugins from https://plugins.octoprint.org/feed.xml in 0.2s
2020-01-24 11:00:50,407 - octoprint.plugins.announcements - INFO - Loaded channel _plugins from https://plugins.octoprint.org/feed.xml in 0.29s
2020-01-24 11:00:50,906 - octoprint.plugins.announcements - INFO - Loaded channel _octopi from https://octoprint.org/feeds/octopi.xml in 0.22s
2020-01-24 11:00:50,910 - octoprint.plugins.announcements - INFO - Loaded channel _octopi from https://octoprint.org/feeds/octopi.xml in 0.38s
2020-01-24 11:00:51,235 - octoprint.server.util.flask - INFO - Passively logging in user Woun from 192.168.54.28
2020-01-24 11:00:54,357 - octoprint.util.pip - INFO - pip installs to /home/pi/Octo/venv/lib/python2.7/site-packages/ (writable -> yes), --user flag needed -> no, virtual env -> yes
2020-01-24 11:00:54,358 - octoprint.util.pip - INFO - ==> pip ok -> yes
2020-01-24 11:00:54,736 - octoprint.plugins.softwareupdate - INFO - Saved version cache to disk
2020-01-24 11:00:55,115 - octoprint.server.preemptive_cache - INFO - Preemptively caching / (ui _default) for {'query_string': 'l10n=de', 'path': '/', 'base_url': 'http://192.168.54.125:5000/'}
2020-01-24 11:01:12,487 - octoprint.server.preemptive_cache - INFO - ... done in 17.37s
2020-01-24 11:01:12,526 - octoprint.server.util.flask - INFO - Passively logging in user Woun from 192.168.54.28
2020-01-24 11:01:12,541 - octoprint.server.views - INFO - Found path / in cache (key: ui:_default:http://192.168.54.125:5000/:de), signaling as cached
2020-01-24 11:01:14,140 - octoprint.server.util.sockjs - INFO - New connection from client: 192.168.54.28
2020-01-24 11:01:14,204 - octoprint.server.util.flask - INFO - Passively logging in user Woun from 192.168.54.28
2020-01-24 11:01:16,071 - octoprint.server.util.sockjs - INFO - User Woun logged in on the socket from client 192.168.54.28
2020-01-24 11:01:25,055 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial port"
2020-01-24 11:01:25,489 - octoprint.util.comm - INFO - Changing monitoring state from "Detecting serial port" to "Error: Connection error, see Terminal tab"
2020-01-24 11:01:25,492 - octoprint.util.comm - ERROR - Unexpected error while connecting to serial port: AUTO IspError: ''Failed to enter programming mode'' @ comm.py:_openSerial:2661 (hook malyan_connection_fix)
Traceback (most recent call last):
  File "/home/pi/Octo/venv/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 2661, in _openSerial
    serial_obj = factory(self, self._port, self._baudrate, settings().getFloat(["serial", "timeout", "connection"]))
  File "/home/pi/Octo/venv/local/lib/python2.7/site-packages/octoprint_malyan_connection_fix/__init__.py", line 34, in serial_factory
    port = comm_instance._detect_port()
  File "/home/pi/Octo/venv/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 2604, in _detect_port
    programmer.connect(p)
  File "/home/pi/Octo/venv/local/lib/python2.7/site-packages/octoprint/util/avr_isp/stk500v2.py", line 37, in connect
    raise ispBase.IspError("Failed to enter programming mode")
IspError: 'Failed to enter programming mode'
octoprint.util.comm - ERROR - Unexpected error while connecting to serial port: AUTO IspError: ''Failed to enter programming mode'' @ comm.py:_openSerial:2661 (hook malyan_connection_fix)

What kind of printer is it?

Good morning,
This is my first printer, so I bought a small one :slight_smile: MONOPRICE SELECT MINI V2
When I start the process, everything works, only the USB port is not recognized automatically, I have to select it manually. Is that the cause?

Can Ocotprint be started even if no printer is connected?

Nobody has any ideas? :frowning:

What browser do you use?
Are scripts enabled?
Are cookies enabled?

Yes it can.

It is generally strongly recommended to use the provided OctoPi image to avoid issues like this. It's almost impossible to tell you what is going on here since we don't know if you might have accidentally skipped or not correctly followed a step in the tutorial.

But I'd suggest to

  • check that ps -ef | grep -i octoprint actually shows the process as running
  • check that netstat -tulpen shows the port as being listened on
  • check that tail -f ~/.octoprint/logs/octoprint.log logs regular heartbeat messages every ~10min
  • verify that the paths in your initscript are configured correctly for your virtual environment

@Ewald_Ikemann
All browsers...
As I said, I start Octoprint in the console
~/Octo/venv/bin/octoprint
It works, reach the web interface and everything works
As soon as I close the console the server stops, that's normal.
So it can't be the browser

@foosel
I understand that, but on the Raspberry many applications run e.g. Homematic, PiHole, Deconz etc.
If it doesn't work out then I buy my own Raspi for Ocotorpint.

pi@raspberrypi:~ $  ps -ef | grep -i octoprint
pi       17964 17930  0 14:44 pts/0    00:00:00 grep --color=auto -i octoprint

pi@raspberrypi:~ $ netstat -tulpen
(Es konnten nicht alle Prozesse identifiziert werden; Informationen รผber
nicht-eigene Processe werden nicht angezeigt; Root kann sie anzeigen.)
Aktive Internetverbindungen (Nur Server)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       Benutzer   Inode      PID/Program name    
tcp        0      0 0.0.0.0:9292            0.0.0.0:*               LISTEN      0          17694      -                   
tcp        0      0 0.0.0.0:1999            0.0.0.0:*               LISTEN      0          17690      -                   
tcp        0      0 0.0.0.0:2000            0.0.0.0:*               LISTEN      0          17698      -                   
tcp        0      0 0.0.0.0:22000           0.0.0.0:*               LISTEN      0          18443      -                   
tcp        0      0 0.0.0.0:2001            0.0.0.0:*               LISTEN      0          17696      -                   
tcp        0      0 0.0.0.0:44050           0.0.0.0:*               LISTEN      0          18444      -                   
tcp        0      0 0.0.0.0:83              0.0.0.0:*               LISTEN      0          16061      -                   
tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      999        18806      -                   
tcp        0      0 0.0.0.0:8181            0.0.0.0:*               LISTEN      0          17688      -                   
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          16051      -                   
tcp        0      0 0.0.0.0:8183            0.0.0.0:*               LISTEN      0          24578      -                   
tcp        0      0 0.0.0.0:8090            0.0.0.0:*               LISTEN      1000       7843616    -                   
tcp        0      0 0.0.0.0:2010            0.0.0.0:*               LISTEN      0          17692      -                   
tcp        0      0 0.0.0.0:8282            0.0.0.0:*               LISTEN      0          17686      -                   
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      1000       7843618    -                   
tcp        0      0 0.0.0.0:8093            0.0.0.0:*               LISTEN      0          17684      -                   
tcp        0      0 0.0.0.0:14014           0.0.0.0:*               LISTEN      0          18442      -                   
tcp        0      0 0.0.0.0:31999           0.0.0.0:*               LISTEN      0          23230      -                   
tcp        0      0 127.0.0.1:30080         0.0.0.0:*               LISTEN      0          18315      -                   
tcp        0      0 0.0.0.0:32001           0.0.0.0:*               LISTEN      0          20942      -                   
tcp        0      0 127.0.0.1:4711          0.0.0.0:*               LISTEN      999        17869      -    

The 5000 port does not seem to be open?

pi@raspberrypi:~ $ tail -f ~/.octoprint/logs/octoprint.log
Traceback (most recent call last):
  File "/home/pi/Octo/venv/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 2661, in _openSerial
    serial_obj = factory(self, self._port, self._baudrate, settings().getFloat(["serial", "timeout", "connection"]))
  File "/home/pi/Octo/venv/local/lib/python2.7/site-packages/octoprint_malyan_connection_fix/__init__.py", line 34, in serial_factory
    port = comm_instance._detect_port()
  File "/home/pi/Octo/venv/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 2604, in _detect_port
    programmer.connect(p)
  File "/home/pi/Octo/venv/local/lib/python2.7/site-packages/octoprint/util/avr_isp/stk500v2.py", line 37, in connect
    raise ispBase.IspError("Failed to enter programming mode")
IspError: 'Failed to enter programming mode'

I think it's best I get a Raspy for Ocotprint

Yeah, that is definitely not recommended. Driving a 3d print job is quite some work, you want to dedicate a Pi to that, not have it fight for resources with other stuff.

Also I agree, it looks like stuff ain't running at all.

1 Like

Additionally, PiHole will (quietly) block OctoPrint's attempts to update things.