No connection with multiple instances on 1.3.10

What is the problem?
I've followed this guide here (https://www.youtube.com/watch?v=7Saa1HpLRoM&t=2s) to set up two instances of octoprint so both my CR10's are able to communicate with a single PI. Everything works perfectly in 1.3.8, but as soon as I update to 1.3.10, octoprint is stuck trying to connect to the printers, and any changes I am able to make in the settings does nothing. Seems almost unresponsive.

What did you already try to solve it?
All I've done is reinstall a couple times to make sure that I didn't mess something up in putty. Not sure how to tackle the issues honestly. Seems a bit outside of my realm.

I've done this three times:
First time, I did a fresh install, updated octoprint, and made the modifications through putty. Didn't work.
Second time, I did a fresh install, didn't update octoprint, made the modifications through putty, and it worked perfectly. Once it was working, I updated octoprint to 1.3.10, and it bricked. Wouldn't connect.
Third time I did a fresh install, and didn't update octoprint once again. It's working fine, but I'm currently keeping in 1.3.8 because I don't want to brick it yet again.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)

I'm using two CR10's with standard firmware. Was planning to update once I got both instances working. Have yet to update.

Upon installing octoprint, these are the commands I used in putty to create the second instance (basically TL;DR for the video):

sudo su

cd /etc/init.d

sed s/octoprint/octoprint2/ < octoprint | sed s/OctoPrint/OctoPrint2/ | sed s/bin\/octoprint2/bin\/octoprint/ > octoprint2

chmod 755 octoprint2

cd /etc/default

sed s/PORT=5000/PORT=5001/ < octoprint | sed s/HOST=127.0.0.1/HOST=0.0.0.0/ | sed s/$PORT/$PORT\ --basedir\ \/home\/pi\/.octoprint2/ > octoprint2

sudo update-rc.d octoprint2 defaults 99

sudo reboot now

With both instances created, I set up both profiles for my CR10's. Then I had to route the serial ports to control each printer:

cd /var/log

sudo cat messages

Looked for the USB to identify which is which, and added rules using:

sudo nano /etc/udev/rules.d/99-usb.rules

SUBSYSTEM=="tty";, ATTRS{idVendor}=="XXXX", ATTRS{idProduct}=="XXXX", ATTRS{devpath}=="X.X", SYMLINK+="PrinterName"

Saved the rules. Used ls -l /dev to make sure the printers were routed correctly. They were. Went into each instance of octoprint and added the additional serial ports (PrinterName) and chose those for the port. Both were connected and speaking to the printers. Once that was working, I updated. This caused the printers to disconnect, and then when attempting to reconnect (which it did automatically), both instances just seemed stuck in a loop- unable to connect. I am unable to click on any of the information in the "connection" window on the home screen, except for the disconnect button. But when I press the disconnect button, nothing happens. I'm also not able to click any buttons within the additional tabs (control, temp, gcode, etc), all that shows is a red circle with a slash through it. I am able to go into the settings and change some of the connection settings, but it doesn't change anything..

This is a snippet from octoprint.log:

2019-02-04 21:48:03,996 - octoprint.server.util.sockjs - INFO - Client connection closed: ::ffff:IPADDRESS
2019-02-04 21:48:05,661 - octoprint.server.util.sockjs - INFO - New connection from client: ::ffff:IPADDRESS
2019-02-04 21:48:05,750 - octoprint.server.util.flask - INFO - Passively logging in user USERNAME from ::ffff:IPADDRESS
2019-02-04 21:48:09,177 - tornado.general - ERROR - WebSocket
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/vendor/sockjs/tornado/transports/websocket.py", line 61, in on_message
self.session.on_messages(msg)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/vendor/sockjs/tornado/session.py", line 419, in on_messages
self.conn.on_message(msg)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/util/sockjs.py", line 172, in on_message
message["auth"]))
ValueError: unmatched '{' in format

This message repeats for about 50k lines. The ValueError seems like a flag to me from my coding experience, but octoprint is much more complex than anything I've written so, no idea if it's actually a flag.

Only information available from serial.log is this:

2019-02-04 21:43:40,027 - serial.log is currently not enabled, you can enable it via Settings > Serial Connection > Log communication to serial.log
2019-02-04 22:21:02,346 - Enabling serial logging

Sorry for the wall of text. Trying to be as thorough as possible. That's all the information I have available. Thoughts? Lol.

2 posts were merged into an existing topic: Setting up OctoPrint on a Raspberry Pi for multiple printers