Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zeroconf accouncement fails for second instance of OctoPrint #2852

Closed
probonopd opened this issue Oct 13, 2018 · 4 comments
Closed

Zeroconf accouncement fails for second instance of OctoPrint #2852

probonopd opened this issue Oct 13, 2018 · 4 comments
Labels
bug Issue describes a bug done Done but not yet released
Milestone

Comments

@probonopd
Copy link

probonopd commented Oct 13, 2018

Getting BonjourError: (-65548, 'name conflict').

What were you doing?

Enable Zeroconf announcements:

sudo apt -y install git python-virtualenv python-pip squashfs-tools virtualenv python2.7-dev libyaml-dev libavahi-compat-libdnssd-dev
git clone https://github.com/foosel/OctoPrint
cd OctoPrint
virtualenv -p python2.7 venv
./venv/bin/python setup.py install
./venv/bin/python ./venv/bin/octoprint
./venv/bin/pip install https://goo.gl/SxQZ06 # for Avahi; http://docs.octoprint.org/en/master/bundledplugins/discovery.html

Then run two instances of OctoPrint:

runuser -l user -c '/mnt/bin/python /mnt/bin/octoprint' &
runuser -l user -c '/mnt/bin/python /mnt/bin/octoprint --port=5001 --basedir $HOME/.octoprint2/' & # Second instance

What did you expect to happen?

OctoPrint announces multiple instances of itself on the network using Zeroconf.

What happened instead?

2018-10-13 18:40:48,117 - octoprint.plugin - ERROR - Error while calling plugin discovery
Traceback (most recent call last):
  File "/root/OctoPrint/venv/lib/python2.7/site-packages/OctoPrint-1.3.9-py2.7.egg/octoprint/plugin/__init__.py", line 225, in call_plugin
    result = getattr(plugin, method)(*args, **kwargs)
  File "/root/OctoPrint/venv/lib/python2.7/site-packages/OctoPrint-1.3.9-py2.7.egg/octoprint/plugins/discovery/__init__.py", line 143, in on_startup
    self.zeroconf_register("_http._tcp", self.get_instance_name(), txt_record=self._create_http_txt_record_dict())
  File "/root/OctoPrint/venv/lib/python2.7/site-packages/OctoPrint-1.3.9-py2.7.egg/octoprint/plugins/discovery/__init__.py", line 197, in zeroconf_register
    self._sd_refs[key] = pybonjour.DNSServiceRegister(**params)
  File "/mnt/local/lib/python2.7/site-packages/pybonjour.py", line 1132, in DNSServiceRegister
    None)
  File "/mnt/local/lib/python2.7/site-packages/pybonjour.py", line 286, in _errcheck
    raise cls(result)
BonjourError: (-65548, 'name conflict')

Version of OctoPrint

1.3.9

Operating System running OctoPrint

root@vegas805:~# cat /etc/os-release 
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

root@vegas805:~# cat /etc/armbian-image-release
# PLEASE DO NOT EDIT THIS FILE
BOARD=vegas805
BOARD_NAME="S805"
BOARDFAMILY=vegas805
VERSION=5.44
LINUXFAMILY=vegas805
BRANCH=default
ARCH=arm
IMAGE_TYPE=user-built
BOARD_TYPE=conf
INITRD_ARCH=arm
KERNEL_IMAGE_TYPE=uImage
f33be5cb-cba4-40f4-95cc-85c8393e2142
44f9c833-6d9b-490e-9824-793805583b14

Printer model & used firmware incl. version

Any

Browser and version of browser, operating system running browser

Any

@GitIssueBot
Copy link

Hi @probonopd,

It looks like there is some information missing from your bug report that will be needed in order to solve the problem. Read the Contribution Guidelines which will provide you with a template to fill out here so that your bug report is ready to be investigated (I promise I'll go away then too!).

If you did not intend to report a bug but wanted to request a feature or brain storm about some kind of development, please take special note of the title format to use as described in the Contribution Guidelines.

Please do not abuse the bug tracker as a support forum - that can be found at discourse.octoprint.org. Go there for any kind of issues with network connectivity, webcam functionality, printer detection or any other kind of such support requests or general questions.

Also make sure you are at the right place - this is the bug tracker of the official version of OctoPrint, not the Raspberry Pi image OctoPi nor any unbundled third party OctoPrint plugins or unofficial versions. Make sure too that you have read through the Frequently Asked Questions and searched the existing tickets for your problem - try multiple search terms please.

I'm marking this one now as needing some more information. Please understand that if you do not provide that information within the next two weeks (until 2018-10-27 21:00 UTC) I'll close this ticket so it doesn't clutter the bug tracker. This is nothing personal, so please just be considerate and help the maintainers solve this problem quickly by following the guidelines linked above. Remember, the less time the devs have to spend running after information on tickets, the more time they have to actually solve problems and add awesome new features. Thank you!

Best regards,
~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being, so don't expect any replies from me :) Your ticket is read by humans too, I'm just not one of them.

@GitIssueBot GitIssueBot added the incomplete Issue template has not been fully filled out, no further processing until fixed label Oct 13, 2018
@foosel
Copy link
Member

foosel commented Oct 15, 2018

Can you please provide a full octoprint.log for the erroring instance?

@foosel
Copy link
Member

foosel commented Oct 19, 2018

Ok, this doesn't seem to reproduce under Window, but under Linux it does. That's gonna be a fun one...

@foosel
Copy link
Member

foosel commented Oct 19, 2018

This should now be fixed by the above commit, at least I can no longer reproduce the behaviour and get now the identical one that is available on Windows out of the box (appears to be a difference on the library level).

Commit is pushed to maintenance, soon devel, will be part of 1.3.10.

@foosel foosel added bug Issue describes a bug done Done but not yet released and removed incomplete Issue template has not been fully filled out, no further processing until fixed labels Oct 19, 2018
@foosel foosel added this to the 1.3.10 milestone Oct 19, 2018
@foosel foosel closed this as completed in 36b07b2 Dec 10, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue describes a bug done Done but not yet released
Projects
None yet
Development

No branches or pull requests

3 participants