I'm seeing this pop up over and over: sethostname: Use the Network Control Panel Applet to set hostname, hostname -s is not supported
What did you already try to solve it?
Reboot?
Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)
Interestingly enough, I recently watched my Octopi-imaged OctoPrint server bootup the other day and was reading some of the console messages as it did so. I didn't realize this but there's a file that you can place in the /boot folder of the microSD so that it will update the hostname of the Raspi. Is this what you did?
Alternately, if you used sudo raspi-config to change the hostname and you used an invalid string, it will behave as you've described. You might try remoting into the Raspi then running:
sudo nano /etc/hostname
Edit that to a valid hostname, save it, exit the nano session and reboot.
My octoprint runs on a windows 10 machine, so sudo nano won't do too much for me I think. (I could be wrong) Maybe the octoprint hosts file is somewhere else?
And... Windows doesn't want you trying to change the hostname and if it did, it would have you do so using some sort of "net whatever" command rather than a POSIX'y sort of way. I suppose it would have been good to know this from the initial post.
So now, it's necessary to tell OctoPrint not to try to change the hostname.
Here in the code where it sees that you have a /boot/octopi-hostname.txt which suggests that it wants to change the hostname. And yet, it doesn't try to use hostname -s to do this.
And two other places, but more of a read-only sort of way
Behind-the-scenes in OctoPrint, there's a name-broadcasting service which reasonably is called Bonjour (Apple-based). The code indicates "Zeroconf/Bonjour/Avahi" as the discovery services.
If this is the cause, then in the ~/.octoprint/config.yaml file, there would be a name/hostname listed in the:
plugins:
discovery:
...section. In theory, this might be the part which is trying to set the broadcastable name of the printer.
And then, perhaps @foosel knows what this is. But she's going to want you to try running in Safe Mode first to see if the problem goes away.
Thanks! Here is my config.yaml file. I removed a couple of lines that had keys in them. I didn't know if it was super top secret or what.
accessControl:
salt: "Bunch of numbers and letters" <--(( I removed this
api:
key: "Bunch of numbers and letters" <--(( I removed this
appearance:
name: AnetA8 Octoprint
showFahrenheitAlso: true
plugins:
_disabled: