paukstelis / octoprint_deploy

Bash script for rapid deployment of multiple octoprint instance on a single machine
MIT License
416 stars 40 forks source link

start over #3

Closed manningcustom closed 2 years ago

manningcustom commented 2 years ago

I was able to setup 4 printers using this method. only 2 of them had serial numbers that were recognized. I remember it saying that the others I would have to make sure I used the same ports and hubs if they were removed.

So I put everything in place in my cabinet and cleaned up all the wires and now nothing it matching up correctly. I was able to connect to one printer but it was under another printers connection. my genius was controlled by my cr10v2 url connection.

Is there a way to delete all the octoprint instances and start over now that they are all where they will be for the long term. I know I could wipe the computer and reinstall everything but I'm sure there is simpler way.

paukstelis commented 2 years ago

Yes. You can use the uninstall script: sudo octoprint_deploy/uninstall_instance.sh

manningcustom commented 2 years ago

Thanks

does that delete them all? or one at a time?

Also, I want to use a bunch of usb cameras. I assume I can just plug them all into a few usb hubs? Is there a tutorial somewhere you can direct me to? I'm assuming there are a few things I'll need to learn about linux to accomplish this part.

manningcustom commented 2 years ago

I've deleted them and now re installing them. I don't think it removed the port assignment. If that is what is even going on. the port that it is selecting now is 5007. The next one in line after all the others. Will I run out of ports? Is this even a worry?

paukstelis commented 2 years ago

Hmm...it will increment from the last present port. It doesn't really matter, however. You won't run out of ports.

manningcustom commented 2 years ago

when I rebooted all of the machines switched places. I have 5 setup.

paukstelis commented 2 years ago

The only reason that could possibly happen is if the udev rules are messed up somehow.

Let me know the output of the command: cat /etc/udev/rules.d/99-octoprint.rules

Also, what computer hardware are you using?

manningcustom commented 2 years ago

SUBSYSTEM=="tty", ATTRS{serial}=="AG0JY07M", SYMLINK+="octo_sv01_1" SUBSYSTEM=="tty", ATTRS{serial}=="AK06VR1D", SYMLINK+="octo_sv01_2" KERNELS=="1-2.1:1.0",SUBSYSTEM=="tty",SYMLINK+="octo_CR10V2" KERNELS=="1-1.1:1.0",SUBSYSTEM=="tty",SYMLINK+="octo_artillery S!" KERNELS=="1-1.1:1.0",SUBSYSTEM=="tty",SYMLINK+="octo_S1_1" SUBSYSTEM=="tty", ATTRS{serial}=="AG0JY07M", SYMLINK+="octo_SV01_1" SUBSYSTEM=="tty", ATTRS{serial}=="AK06VR1D", SYMLINK+="octo_SV01_2" KERNELS=="1-2.2:1.0",SUBSYSTEM=="tty",SYMLINK+="octo_Genius_2"

I am using a HP thin client HP t620 amd processor I think. 64 gig hard drive 8 gig of ram.

I have newer computers I can switch to if you think it is needed.

paukstelis commented 2 years ago

Nope, computer is fine. The problem are the duplicates in the udev rules. I'm not sure why they wouldn't have been removed when you did the uninstalls. They should be and I confirmed it worked on my system. We should confirm that you removed the service files too, so do a: ls /etc/systemd/system/ and post the response.

To fix this, you need to make sure there are no duplicates of either serial or KERNELS. You should be able to edit and just delete the first four lines: sudo nano /etc/udev/rules.d/99-octoprint.rules

The one thing I notice is that the CR10V2 and Genius_2 are on the same position, so you might have a look to see which one is supposed to be there.

manningcustom commented 2 years ago

I tried several ways to delete/edit those lines. Finally I just reinstalled the os. Now I'm setting everything up again. I went through the first process to setup the generic instance. Was able to logon from my second computer. Everything seemed good. I went through the setup for the first computer and it also looked ok. But when I tried to login to 5001 there was nothing there. I tried 5000 and also nothing. I then used the browser on the octobuntu computer thinking that my second might not be getting a connection. Nothing. I then ran the first script you sent me to see if they were actually installed. sudo octoprint_deploy/uninstall_instance.sh. They are both there. I also tried to just connect to the internet from the octobunto computer and had no problem. Any ideas?

manningcustom commented 2 years ago

i think i found the problem. USB connection issues

manningcustom commented 2 years ago

Ok I think I'm down to the last issue (other than webcams).

The same as before. When I reboot they switch places. I've slowly tested every step so here is all the info.

When I was setting each of them up I rebooted after the first 2 and no problem. I also rebooted after the 3rd. No problem. I didn't reboot again until I was done. I have 6 printers setup. They all connected and can be controlled. But, each time I reboot they get mixed up. No pattern.

Here is the output of the script you gave me earlier. Interesting that there are only 5 instances and there are 6 printers.

KERNELS=="1-2.1:1.0",SUBSYSTEM=="tty",SYMLINK+="octo_CR10V2" KERNELS=="1-1.1:1.0",SUBSYSTEM=="tty",SYMLINK+="octo_S1_1" SUBSYSTEM=="tty", ATTRS{serial}=="AG0JY07M", SYMLINK+="octo_SV01_1" SUBSYSTEM=="tty", ATTRS{serial}=="AK06VR1D", SYMLINK+="octo_SV01_2" KERNELS=="1-2.2:1.0",SUBSYSTEM=="tty",SYMLINK+="octo_Genius_2"

Again, thank you for your help. This project is great and when I get the bugs out will make my setup great!

paukstelis commented 2 years ago

You should have a file in /home/octouser called octoprint_deploy.log. Paste those contents here. It seems that there might be something finicky about your system.

paukstelis commented 2 years ago

Though it is important that you NOT use the AUTO connect. You need to make sure you specify the printer you want to connect to Screenshot from 2021-11-22 15-12-06 .

AUTO will just grab the first printer it finds. After you select the correct printer, just click the Save connection settings box before you connect.

manningcustom commented 2 years ago

I'll try the auto connect first. I did have that on.

manningcustom commented 2 years ago

Mon 22 Nov 2021 09:22:09 AM PST starting instance installation Selected port is: 5001 Executable path is valid Template path is valid

Mon 22 Nov 2021 09:40:04 AM PST starting instance installation Selected port is: 5002 Executable path is valid Template path is valid 1-2.1:1.0 Mon 22 Nov 2021 10:38:02 AM PST starting instance installation Selected port is: 5003 Executable path is valid Template path is valid 1-1.1:1.0 Mon 22 Nov 2021 10:43:23 AM PST starting instance installation Selected port is: 5003 Executable path is valid Template path is valid 1-1.1:1.0 Mon 22 Nov 2021 10:50:54 AM PST starting instance installation Selected port is: 5004 Executable path is valid Template path is valid Serial number detected as: AG0JY07M Mon 22 Nov 2021 10:54:49 AM PST starting instance installation Selected port is: 5005 Executable path is valid Template path is valid Serial number detected as: AK06VR1D Mon 22 Nov 2021 11:00:35 AM PST starting instance installation Selected port is: 5006 Executable path is valid Template path is valid

Mon 22 Nov 2021 11:04:55 AM PST starting instance installation Selected port is: 5007 Executable path is valid Template path is valid 1-2.2:1.0 Mon 22 Nov 2021 03:32:36 PM PST starting instance installation Already have an entry for Genius_2. Exiting.

manningcustom commented 2 years ago

I got all but one of them to line up by simply not using auto connect. The last one just wouldn't connect. So I thought I'd just delete it and try again. Under the octoprint deploy uninstall there are only 2 listed. The generic and the cr10. even the ones that work are not listed.

paukstelis commented 2 years ago

You can check to see which instances have been installed and the uninstall script will be aware of with: cat /etc/octoprint_instances

victornpb commented 1 year ago

Yes. You can use the uninstall script: sudo octoprint_deploy/uninstall_instance.sh

It seems that this no longer exists on the current brach. What is the procedure to uninstall everything that was installed by this?

paukstelis commented 1 year ago

sudo octoprint_deploy/octoprint_deploy.sh remove

victornpb commented 1 year ago

sudo octoprint_deploy/octoprint_deploy.sh remove

ty for the quick reply

maybe thats something worth mentioning on the readme?

paukstelis commented 1 year ago

It is there. It is also in the wiki.