Octoprint service is not running

What is the problem?

After running octoprint sucessfully for several months, now it´s suddenly not starting up and showing the "Octorpint server is currently not running message"

What did you already try to solve it?

Followed the suggestions on that same page (I´m not getting anything from the commands to check the server is running), also tried a force reinstall, and a few other suggestions I found in the forum that I don´t remember. I haven´t changed the pi username.

Have you tried running in safe mode?

Yes, but I can´t. When I try any octoprint commands from terminal its says it doesn´t recognize the command. Editing the config.yaml file yielded no change in behaviour.

Did running in safe mode solve the problem?

No

Systeminfo Bundle

OctoPrint version : 1.8.6
OctoPi version : 0.18.0

Not sure if this is the info required?

WRITE HERE

Additional information about your setup

OctoPrint version : 1.8.6
OctoPi version : 0.18.0
Windows 10. I have 2 printers hooked to the pie but I´ve unplugged them and the problem persists.

WRITE HERE

I tried pulling the log file, but doesn´t really help me:

I assume "ERROR - Uncaught exception" is bad, but doesn´t give me much to work with

2023-02-26 12:17:38,171 - octoprint.startup - INFO - ******************************************************************************
2023-02-26 12:17:38,175 - octoprint.startup - INFO - Starting OctoPrint 1.8.6
2023-02-26 12:17:38,175 - octoprint.startup - INFO - Starting in SAFE MODE. Third party plugins will be disabled!
2023-02-26 12:17:38,175 - octoprint.startup - INFO - Reason for safe mode: problem during last startup
2023-02-26 12:17:38,175 - octoprint.startup - INFO - ******************************************************************************
2023-02-26 12:17:44,923 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity state is currently: offline
2023-02-26 12:17:44,924 - octoprint.util.connectivity.connectivity_checker - INFO - Connecting to 1.1.1.1:53 is not working
2023-02-26 12:17:44,924 - octoprint.util.connectivity.connectivity_checker - INFO - Resolving octoprint.org is not working
2023-02-26 12:17:44,936 - octoprint.startup - INFO - We don't appear to be online, not fetching plugin blacklist
2023-02-26 12:17:44,946 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2023-02-26 12:17:50,086 - octoprint.plugin.core - INFO - Found 29 plugin(s) providing 18 mixin implementations, 38 hook handlers
2023-02-26 12:17:50,168 - octoprint.server.heartbeat - INFO - Starting server heartbeat, 900.0s interval
2023-02-26 12:17:50,380 - octoprint.server - INFO - Intermediary server started
2023-02-26 12:17:50,391 - octoprint.cli.server - ERROR - Uncaught exception
Traceback (most recent call last):
File "/home/pi/oprint/bin/octoprint", line 8, in
sys.exit(main())
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/init.py", line 936, in main
octo(args=args, prog_name="octoprint", auto_envvar_prefix="OCTOPRINT")
File "/home/pi/oprint/lib/python3.7/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/pi/oprint/lib/python3.7/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/pi/oprint/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/pi/oprint/lib/python3.7/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/cli/server.py", line 330, in serve_command
disable_color=no_color,
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/cli/server.py", line 163, in run_server
octoprint_server.run()
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/server/init.py", line 398, in run
printerProfileManager = PrinterProfileManager()
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/printer/profile.py", line 264, in init
self._verify_default_available()
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/printer/profile.py", line 322, in _verify_default_available
profile = self.get(default_id)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/printer/profile.py", line 359, in get
return self._load_from_path(self._get_profile_path(identifier))
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/printer/profile.py", line 512, in _load_from_path
profile = yaml.load_from_file(path=path)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/yaml.py", line 14, in load_from_file
return load_from_file(file=f)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/yaml.py", line 28, in load_from_file
return yaml.load(file, Loader=SafeLoader)
File "/home/pi/oprint/lib/python3.7/site-packages/yaml/init.py", line 112, in load
loader = Loader(stream)
File "/home/pi/oprint/lib/python3.7/site-packages/yaml/loader.py", line 34, in init
Reader.init(self, stream)
File "/home/pi/oprint/lib/python3.7/site-packages/yaml/reader.py", line 85, in init
self.determine_encoding()
File "/home/pi/oprint/lib/python3.7/site-packages/yaml/reader.py", line 135, in determine_encoding
self.update(1)
File "/home/pi/oprint/lib/python3.7/site-packages/yaml/reader.py", line 169, in update
self.check_printable(data)
File "/home/pi/oprint/lib/python3.7/site-packages/yaml/reader.py", line 144, in check_printable
'unicode', "special characters are not allowed")
yaml.reader.ReaderError: unacceptable character #x0000: special characters are not allowed
in "/home/pi/.octoprint/printerProfiles/_default.profile", position 0

octoprint.log (14.7 KB)

I'm running in the same issue now... Octoprint was fine until my print of 4 days finished last night and now suddenly it refuses to start the octoprint servive, even when I add the Safe mode option to config.yaml... anybody who was able to get it back to life or at least extract plugins and data from plugins from it so I can reinstall it on another sd card?

We need a systeminfo bundle :slight_smile:

I would love to do so, but is there a terminal way to do this because it is kinda hard to get that from the web interface if octoprint is not starting...

yup
ssh into the pi and run ~/oprint/bin/octoprint systeminfo . (the dot is important)
then you can download it with WinSCP.

Thx but that seems to quit with a message:

sentry is attempting to send 1 pending error message
Waiting up to 2 seconds
Press ctrl-c to quit

And then it returns to the prompt

do you have the specifics of what is needed in this case? because maybe I can give or generate the info in another way...

in any case, I'm running octoprint 1.8.7 and octopi 0.18.0 on a pi3 B

pi@octopi:~ $ oprint/bin/octoprint serve
2023-04-04 10:01:30,901 - octoprint.startup - INFO - ******************************************************************************
2023-04-04 10:01:30,909 - octoprint.startup - INFO - Starting OctoPrint 1.8.7
2023-04-04 10:01:30,911 - octoprint.startup - INFO - Starting in SAFE MODE. Third party plugins will be disabled!
2023-04-04 10:01:30,911 - octoprint.startup - INFO - Reason for safe mode: setting in config.yaml
2023-04-04 10:01:30,911 - octoprint.startup - INFO - ******************************************************************************
2023-04-04 10:01:31,590 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity changed from offline to online
2023-04-04 10:01:31,691 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity state is currently: online
2023-04-04 10:01:31,691 - octoprint.util.connectivity.connectivity_checker - INFO - Connecting to 1.1.1.1:53 is working
2023-04-04 10:01:31,691 - octoprint.util.connectivity.connectivity_checker - INFO - Resolving octoprint.org is working
2023-04-04 10:01:31,707 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2023-04-04 10:01:36,116 - octoprint.plugin.core - INFO - Plugin OctoDash Companion (0.0.7) is disabled.
2023-04-04 10:01:36,721 - octoprint.plugins.errortracking - INFO - Initialized error tracking
2023-04-04 10:01:36,833 - octoprint.plugin.core - INFO - Found 33 plugin(s) providing 18 mixin implementations, 38 hook handlers
2023-04-04 10:01:36,899 - octoprint.server.heartbeat - INFO - Starting server heartbeat, 900.0s interval
2023-04-04 10:01:37,024 - octoprint.server - INFO - Intermediary server started
2023-04-04 10:01:37,068 - octoprint.filemanager.storage - INFO - Initializing the file metadata for /home/pi/.octoprint/uploads...
2023-04-04 10:01:37,182 - octoprint.filemanager.storage - INFO - ... file metadata for /home/pi/.octoprint/uploads initialized successfully.
2023-04-04 10:01:37,190 - octoprint.server - INFO - Added new permission from plugin action_command_notification: PLUGIN_ACTION_COMMAND_NOTIFICATION_SHOW (needs: "Need(method='role', value='plugin_action_command_notification_show')")
2023-04-04 10:01:37,191 - octoprint.server - INFO - Added new permission from plugin action_command_notification: PLUGIN_ACTION_COMMAND_NOTIFICATION_CLEAR (needs: "Need(method='role', value='plugin_action_command_notification_clear')")
2023-04-04 10:01:37,192 - octoprint.server - INFO - Added new permission from plugin action_command_prompt: PLUGIN_ACTION_COMMAND_PROMPT_INTERACT (needs: "Need(method='role', value='plugin_action_command_prompt_interact')")
2023-04-04 10:01:37,193 - octoprint.server - INFO - Added new permission from plugin announcements: PLUGIN_ANNOUNCEMENTS_READ (needs: "Need(method='role', value='plugin_announcements_read')")
2023-04-04 10:01:37,194 - octoprint.server - INFO - Added new permission from plugin announcements: PLUGIN_ANNOUNCEMENTS_MANAGE (needs: "Need(method='role', value='plugin_announcements_read'), Need(method='role', value='plugin_announcements_manage')")
2023-04-04 10:01:37,195 - octoprint.server - INFO - Added new permission from plugin appkeys: PLUGIN_APPKEYS_ADMIN (needs: "Need(method='role', value='plugin_appkeys_admin')")
2023-04-04 10:01:37,197 - octoprint.server - INFO - Added new permission from plugin appkeys: PLUGIN_APPKEYS_GRANT (needs: "Need(method='role', value='plugin_appkeys_user')")
2023-04-04 10:01:37,198 - octoprint.server - INFO - Added new permission from plugin backup: PLUGIN_BACKUP_ACCESS (needs: "Need(method='role', value='plugin_backup_access')")
2023-04-04 10:01:37,206 - octoprint.server - INFO - Added new permission from plugin firmware_check: PLUGIN_FIRMWARE_CHECK_DISPLAY (needs: "Need(method='role', value='plugin_firmware_check_display')")
2023-04-04 10:01:37,209 - octoprint.server - INFO - Added new permission from plugin logging: PLUGIN_LOGGING_MANAGE (needs: "Need(method='role', value='plugin_logging_manage')")
2023-04-04 10:01:37,212 - octoprint.server - INFO - Added new permission from plugin pi_support: PLUGIN_PI_SUPPORT_STATUS (needs: "Need(method='role', value='plugin_pi_support_check')")
2023-04-04 10:01:37,216 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_LIST (needs: "Need(method='role', value='plugin_pluginmanager_list')")
2023-04-04 10:01:37,219 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_MANAGE (needs: "Need(method='role', value='plugin_pluginmanager_manage')")
2023-04-04 10:01:37,222 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_INSTALL (needs: "Need(method='role', value='plugin_pluginmanager_manage'), Need(method='role', value='plugin_pluginmanager_install')")
2023-04-04 10:01:37,225 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_CHECK (needs: "Need(method='role', value='plugin_softwareupdate_check')")
2023-04-04 10:01:37,228 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_UPDATE (needs: "Need(method='role', value='plugin_softwareupdate_update')")
2023-04-04 10:01:37,230 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_CONFIGURE (needs: "Need(method='role', value='plugin_softwareupdate_configure')")
2023-04-04 10:01:37,242 - octoprint.server - ERROR - Could not instantiate user manager octoprint.access.users.FilebasedUserManager, falling back to FilebasedUserManager!
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/server/__init__.py", line 569, in run
    userManager = clazz(groupManager)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/access/users.py", line 521, in __init__
    self._load()
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/access/users.py", line 525, in _load
    data = yaml.load_from_file(path=self._userfile)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/yaml.py", line 14, in load_from_file
    return load_from_file(file=f)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/yaml.py", line 28, in load_from_file
    return yaml.load(file, Loader=SafeLoader)
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/__init__.py", line 112, in load
    loader = Loader(stream)
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/loader.py", line 34, in __init__
    Reader.__init__(self, stream)
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/reader.py", line 85, in __init__
    self.determine_encoding()
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/reader.py", line 135, in determine_encoding
    self.update(1)
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/reader.py", line 169, in update
    self.check_printable(data)
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/reader.py", line 144, in check_printable
    'unicode', "special characters are not allowed")
yaml.reader.ReaderError: unacceptable character #x0000: special characters are not allowed
  in "/home/pi/.octoprint/users.yaml", position 0
2023-04-04 10:01:37,408 - octoprint.cli.server - ERROR - Uncaught exception
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/server/__init__.py", line 569, in run
    userManager = clazz(groupManager)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/access/users.py", line 521, in __init__
    self._load()
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/access/users.py", line 525, in _load
    data = yaml.load_from_file(path=self._userfile)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/yaml.py", line 14, in load_from_file
    return load_from_file(file=f)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/yaml.py", line 28, in load_from_file
    return yaml.load(file, Loader=SafeLoader)
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/__init__.py", line 112, in load
    loader = Loader(stream)
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/loader.py", line 34, in __init__
    Reader.__init__(self, stream)
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/reader.py", line 85, in __init__
    self.determine_encoding()
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/reader.py", line 135, in determine_encoding
    self.update(1)
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/reader.py", line 169, in update
    self.check_printable(data)
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/reader.py", line 144, in check_printable
    'unicode', "special characters are not allowed")
yaml.reader.ReaderError: unacceptable character #x0000: special characters are not allowed
  in "/home/pi/.octoprint/users.yaml", position 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "oprint/bin/octoprint", line 8, in <module>
    sys.exit(main())
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/__init__.py", line 936, in main
    octo(args=args, prog_name="octoprint", auto_envvar_prefix="OCTOPRINT")
  File "/home/pi/oprint/lib/python3.7/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/pi/oprint/lib/python3.7/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/pi/oprint/lib/python3.7/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/pi/oprint/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pi/oprint/lib/python3.7/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/pi/oprint/lib/python3.7/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/cli/server.py", line 330, in serve_command
    disable_color=no_color,
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/cli/server.py", line 163, in run_server
    octoprint_server.run()
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/server/__init__.py", line 577, in run
    userManager = octoprint.access.users.FilebasedUserManager(groupManager)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/access/users.py", line 521, in __init__
    self._load()
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/access/users.py", line 525, in _load
    data = yaml.load_from_file(path=self._userfile)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/yaml.py", line 14, in load_from_file
    return load_from_file(file=f)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/yaml.py", line 28, in load_from_file
    return yaml.load(file, Loader=SafeLoader)
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/__init__.py", line 112, in load
    loader = Loader(stream)
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/loader.py", line 34, in __init__
    Reader.__init__(self, stream)
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/reader.py", line 85, in __init__
    self.determine_encoding()
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/reader.py", line 135, in determine_encoding
    self.update(1)
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/reader.py", line 169, in update
    self.check_printable(data)
  File "/home/pi/oprint/lib/python3.7/site-packages/yaml/reader.py", line 144, in check_printable
    'unicode', "special characters are not allowed")
yaml.reader.ReaderError: unacceptable character #x0000: special characters are not allowed
  in "/home/pi/.octoprint/users.yaml", position 0
Sentry is attempting to send 1 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit

after seeing this and rethinking I started looking at the users.yaml file and that was empty somehow (probably not normal)...

There was also a users.v1.yaml file in the .octoprint folder and after copying that one to users.yaml it was able to boot up again.

No idea though why my users.yaml was copied to users.v1.yaml and how I ended up with an empty users.yaml file while the pi just shut down as normal after the print was finished...

1 Like

glad you found a solution
now that OctoPrint works again - could you do me a favor and upload a systeminfo bundle so we can try to figure out what happened?

octoprint-systeminfo-20230405060550.zip (152.4 KB)

Right, totally forgot about that :slight_smile: here you go!

I do suspect that in my case, somehow part of the sd card got corrupted because the octoscreen instance kinda failed too and I needed to do a file system check to get everything fixed on octoscreen too, but what the cause of the corruption was, no idea so far... but I'm glad it happened after the print was done (4 days and 8 hours print :blush: )

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.