[solved] Publish from two hosts simultanously

Could you screenshot the full names of those 4 C++ Redistributables? Need to make sure I’m getting exactly the right one.

Yeah, running that works.

Dunno why it didn’t show all the programs before, here is the complete list.

So the only problem really is getting .setup() to run when launching a host? That is odd. Since the port is being set, the function clearly runs, but must be killed shortly afterwards… Hmm.

To confirm, this works well for you, on the machine you’re having trouble with?

It’s using the Python shipping with the Pyblish installer, I think it’s pyblish-win\bin for you.

Hmmm, this is interesting, getting this error when trying to run the second pyblish_integration.setup()

Running it a second time, gives me the correct setup/port

That’s a good find.

The second time, Pyblish QML is already running (in the background, from having been started during the first time) and a connection is made in an attempt to communicate with it.

It sounds like it’s this connection that causes the issue.

In this case, it does sound like it might be related to your domain login, as it’s a permission issue. We tried before to run things as admin, but that didn’t change anything?

Could you try running this again, but with administrator terminals? You can run the terminal as an administrator by right-clicking on c:\windows\cmd.exe and running it as an admin, amongst other ways.

No luck:( Still gives me the error.

Though is it not weird that I can do pyblish_integration.setup() after the error and it works fine then?

It is… I can’t make heads or tails of it. Does it give you linear numbers? Like 6001, 6002. That is, it doesn’t skip numbers, like 6001, 6003, 6007 etc.

I’m thinking it must have something to do with permissions and that you are within a domain. That being “admin” isn’t truly admin, as your user might still be restricted to a certain set of rules.

I’m not familiar enough with domains to know for sure, but if you have anyone you could ask, ask if there are any port-restrictions. Especially at 6001 and above. And if you could try temporarily allowing those ports to see whether you still experience the problem.

The really good news is that we’ve narrowed it down into a reproducible problem. I think we’re close to solving it once and for all.

When it fails on port 6002, and when I run it again, it progresses to 6003. Any way of passing it specific ports to the pyblish.integration.setup()?

Then on the off-chance there actually is another process already using 6002, could you try this as an administrator and look for 127.0.0.1:6002?

netstat -a -b

It might be a long list.

Couldn’t find anything on 6002, but strangely enough I did find this;

  TCP    0.0.0.0:6002           061-KUVIRA-PC:0        LISTENING
 [spnsrvnt.exe]

  UDP    127.0.0.1:6001         *:*
 [spnsrvnt.exe]

  UDP    192.168.145.49:6001    *:*
 [spnsrvnt.exe]

I think that’s a bingo.

Looks like you’re got processes running that is using ports Pyblish is attempting to use. This would explain the permission errors.

There isn’t any way of altering these ports programatically, but there should be. I’ll have a look at implementing this, but in the meantime, could you try altering this line, to something different, like 7001?

# first_port = 6001
first_port = 7001
1 Like

I got a non responding python.exe on 7001, but on 9001 it all works!

Woot woot! That’s amazing!

Ports range from 0-49151, so there are plenty to choose from. A few are reserved and, as we’ve seen, used by other apps so it’s important to get this feature implemented QML-side.

I’ll have a look at this today.

1 Like

lovely work guys. Touch one to figure out. :wink:

So strangely this happened to us today on 2 computers. Seems to be difficult to reproduce though. I’ll try updating to newest version and go through steps in the thread to see if it helps

Yeah, try netstat -a -b | more and see if there are anything being used on 6001-6002

Soo look at these fellas. It just happend in houdini when nuke was opened. Tons of reports on the same port.

1 Like

That shouldn’t be a problem, they aren’t actually doing anything, but are awaiting clean-up by the OS. They will idle for a few minutes, possibly hours, and then go away.

It’s the LISTENING state you will want to look out for. There should only ever be a single LISTENING state on a given port.

Aha.

Well it seem like I have houdini and nuke listening on the same port here at the same time.

This can happen if you force-quit Pyblish QML while having hosts still running.

The problem is that the hosts still broadcast “heartbeats” to Pyblish QML at even intervals, and as soon as you quit it and start it again, it will record the port of the heartbeating client when it comes in. If then Nuke heartbeats before Houdini that one particular time, their port numbers will get mixed up.

Should resolve itself shutting down all hosts, and then opening them back up. Force quitting of Pyblish QML generally shouldn’t happen, but it can be supported, it just isn’t yet. Safest thing to do is the above.

You can tell which port a host is listening on like this.

import os
print os.environ["PYBLISH_CLIENT_PORT"]

# or
import pyblish_integration.lib
print pyblish_integration.lib.port

This same port number should then be reflected in the Terminal of Pyblish QML when running it from this host.