Announcement

Collapse
No announcement yet.

running different slaves versions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • running different slaves versions

    Hi there,

    I'm trying to launch various vrayslave versions in parallel so that we'll be able to use DR from any deployed vray on our system. Actually we have a vray 15001 for old productions, 22001 is our current stable release, and 22501 is deployed for test purposes. Each vray is installed in a separate network share (/Network/Applications/ChaosGroup/maya_XXXX/vray_YYYYY), and I'm using a python script to walk these folders and launch each available slave using it's version as port number, ie :

    /Network/Applications/ChaosGroup/maya_2012/vray_15001/vray/bin/vray -server -portNumber=15001 >> /tmp/slave_maya_2012_vray_15001.log
    /Network/Applications/ChaosGroup/maya_2012/vray_22001/vray/bin/vray -server -portNumber=22001 >> /tmp/slave_maya_2012_vray_22001.log
    /Network/Applications/ChaosGroup/maya_2012/vray_22501/vray/bin/vray -server -portNumber=22501 >> /tmp/slave_maya_2012_vray_22501.log

    It works fine with vray 15001 and 22501, but the 22001 fails arguing that a vray server is already running :

    VRay 15001

    Code:
    [2012/Dec/13|12:58:28] Reading configuration from "/Network/Applications/ChaosGroup/maya_2012/vray_15001/vray/bin//vrayconfig.xml"
    [2012/Dec/13|12:58:28] ===============================================
    [2012/Dec/13|12:58:28] V-Ray Standalone, version 1.5.01 for x64
    [2012/Dec/13|12:58:28] Copyright (C) 2000-2010 Chaos Group Ltd. All rights reserved.
    [2012/Dec/13|12:58:28] Use -credits option for additional third-party copyright notices.
    [2012/Dec/13|12:58:28] 
    [2012/Dec/13|12:58:28] Build from Apr 28 2011, 02:51:46
    [2012/Dec/13|12:58:28] Compiled with GCC-compatible compiler, version 4.2
    [2012/Dec/13|12:58:28] Operating system is Mac OS X
    [2012/Dec/13|12:58:28] 
    [2012/Dec/13|12:58:28] V-Ray core version is 2.00.01
    [2012/Dec/13|12:58:28] ===============================================
    [2012/Dec/13|12:58:28] 
    [2012/Dec/13|12:58:28] Loading plugins from "/Network/Applications/ChaosGroup/maya_2012/vray_15001/vrayplugins/libvray_*.so"
    [2012/Dec/13|12:58:28] Finished loading plugins.
    [2012/Dec/13|12:58:28] Entering server mode - waiting for render requests on port 15001. Press Ctrl+C to exit.
    VRay 22501

    Code:
    [2012/Dec/13|12:58:28] Reading configuration from "/Network/Applications/ChaosGroup/maya_2012/vray_22501/vray/bin//vrayconfig.xml"
    [2012/Dec/13|12:58:28] ===============================================
    [2012/Dec/13|12:58:28] V-Ray Standalone, version 2.25.01 for x64
    [2012/Dec/13|12:58:28] Copyright (C) 2000-2010 Chaos Group Ltd. All rights reserved.
    [2012/Dec/13|12:58:28] Use -credits option for additional third-party copyright notices.
    [2012/Dec/13|12:58:28] 
    [2012/Dec/13|12:58:28] Build 22390 from Sep 26 2012, 15:56:50
    [2012/Dec/13|12:58:28] Compiled with GCC-compatible compiler, version 4.2
    [2012/Dec/13|12:58:28] Operating system is Mac OS X
    [2012/Dec/13|12:58:28] 
    [2012/Dec/13|12:58:28] V-Ray core version is 2.00.02
    [2012/Dec/13|12:58:28] ===============================================
    [2012/Dec/13|12:58:28] 
    [2012/Dec/13|12:58:28] Loading plugins from "/Network/Applications/ChaosGroup/maya_2012/vray_22501/vray/vrayplugins/libvray_*.so"
    [2012/Dec/13|12:58:29] 109 plugin(s) loaded successfully
    [2012/Dec/13|12:58:29] Finished loading plugins.
    [2012/Dec/13|12:58:29] Entering server mode - waiting for render requests on port 22501. Press Ctrl+C to exit.
    VRay 22001

    Code:
    [2012/Dec/13|13:00:51] Reading configuration from "/Network/Applications/ChaosGroup/maya_2012/vray_22001/vray/bin//vrayconfig.xml"
    [2012/Dec/13|13:00:51] ===============================================
    [2012/Dec/13|13:00:51] V-Ray Standalone, version 2.20.01 for x64
    [2012/Dec/13|13:00:51] Copyright (C) 2000-2010 Chaos Group Ltd. All rights reserved.
    [2012/Dec/13|13:00:51] Use -credits option for additional third-party copyright notices.
    [2012/Dec/13|13:00:51] 
    [2012/Dec/13|13:00:51] Build from Feb  1 2012, 11:11:21
    [2012/Dec/13|13:00:51] Compiled with GCC-compatible compiler, version 4.2
    [2012/Dec/13|13:00:51] Operating system is Mac OS X
    [2012/Dec/13|13:00:51] 
    [2012/Dec/13|13:00:51] V-Ray core version is 2.00.01
    [2012/Dec/13|13:00:51] ===============================================
    [2012/Dec/13|13:00:51] 
    [2012/Dec/13|13:00:51] Loading plugins from "/Network/Applications/ChaosGroup/maya_2012/vray_22001/vray/vrayplugins/libvray_*.so"
    [2012/Dec/13|13:00:53] 102 plugin(s) loaded successfully
    [2012/Dec/13|13:00:53] Finished loading plugins.
    [2012/Dec/13|13:00:53] error: There is another server already running.
    [2012/Dec/13|13:00:53] Exiting server mode.
    [2012/Dec/13|13:00:53] Closing log - 1 error(s), 0 warning(s).
    Any tip would be greatly appreciated, I can't understand why it's working with two servers, and broken with the third one !

    Here is my python script to detach the various slaves :


    Code:
    #!/usr/bin/env python                                                                                                                         
    
    import sys
    import os
    import re
    import signal
    import subprocess
    import shlex
    import time
    
    processes = list()
    
    def kill_handler(signal, frame):
        global processes
        print "main process killed"
        for p in processes:
            print "killing " + str(p.pid)
            p.kill()
        sys.stdout.flush()
        sys.exit(0)
    
    def detach_slaves():
        global processes
        print "launching slaves"
        if not "MM_APPLICATIONS_PATH" in os.environ:
            print "ERROR: cannot find MM_APPLICATIONS_PATH in environment variables ..."
            sys.exit(126)
    
        chaos_base = os.path.join(os.environ["MM_APPLICATIONS_PATH"], "ChaosGroup")
        print "--"
        for maya in os.listdir(chaos_base):
            if re.match("^maya_([0-9]+)$", maya):
                maya_base = os.path.join(chaos_base, maya)
                print "- " + maya_base
                for vray in os.listdir(maya_base):
                    match = re.match("^vray_([0-9]+)$", vray)
                    if match:
                        port = match.group(1)
                        cmd  = os.path.join(maya_base, vray, "vray", "bin", "vray")
                        cmd += " -server -portNumber=" + str(port) + " >> /tmp/slave_" + str(maya) + "_" + str(vray) + ".log"
                        print cmd
                        processes.append(subprocess.Popen(cmd, shell=True))
        sys.stdout.flush()
    
    def watch_kill():
        signal.signal(signal.SIGTERM, kill_handler)
        signal.signal(signal.SIGINT, kill_handler)
        while True:
            signal.pause()
    
    if __name__ == "__main__":
        detach_slaves()
        watch_kill()
    Tonio

  • #2
    Hello thekraken

    We are sorry for the delay of this answer.
    This error usually happens if the port that Vray slave is trying to access is already busy.
    Could you please try to turn off all Vray Slaves - and make sure that the port "22001" is free - then try to run the script for 22001 version.
    You cold also try to use another port instead of 22001.
    Please also check if you have registered windows service for this vray version - if you have any registered Vray services - please remove them and run the script again.
    Svetlozar Draganov | Senior Manager 3D Support | contact us
    Chaos & Enscape & Cylindo are now one!

    Comment

    Working...
    X