mikrosimage / OpenRenderManagement

Dispatcher Puli
Other
62 stars 23 forks source link

error on first run #2

Open MrPetru opened 11 years ago

MrPetru commented 11 years ago

Hi, I just want to give a try to this OpenRenderManagement tool :) ... to see if it can fit my needs in a distributed rendering system.

I used the instructions that are described in your puli readme file.

but when i'm going to lunch it for first time I got this error:

python ~/apps/puli/Puli/scripts/dispatcherd.py -D -C 06:10:15 dispatcher INFO settings.DEBUG = True 06:10:15 dispatcher INFO settings.ADDRESS = 127.0.0.1 06:10:15 dispatcher INFO settings.PORT = 8004 06:10:15 dispatcher INFO dropping database tables 06:10:15 dispatcher INFO checking database 06:10:15 dispatcher INFO checking dispatcher state Traceback (most recent call last): File "/home/petru/apps/puli/Puli/scripts/dispatcherd.py", line 105, in main() File "/home/petru/apps/puli/Puli/scripts/dispatcherd.py", line 101, in main dispatcherApplication = make_dispatcher() File "/home/petru/apps/puli/Puli/src/octopus/dispatcher/init.py", line 8, in make_dispatcher return WSAppFramework(applicationClass=Dispatcher, webServiceClass=WebServiceDispatcher, port=8004) File "/home/petru/apps/puli/Puli/src/octopus/core/framework/wsappframework.py", line 42, in init self.application = applicationClass(self) File "/home/petru/apps/puli/Puli/src/octopus/dispatcher/dispatcher.py", line 85, in init self.defaultPool = self.dispatchTree.pools['default'] KeyError: 'default'

why this error, where is default pool defined, how can I fix this?

thanks, Petru

umoya66 commented 11 years ago

I have the same error. Anyone ever solve this?

MrPetru commented 11 years ago

sorry but I have not been able to solve this problem. and there was not time to do it :)

samson-jerome commented 11 years ago

Hi,

Can you send your settings.py file ? It might be a pb when loading pools or workers definition file (located in etc/workers.lst and etc/pools, can you drop the content of you install dir ? Best,

Jerome

umoya66 commented 11 years ago

Here you go...

import os

def getLocalAddress():
    import socket
    try:
        s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        s.connect(('0.0.0.0', 56))
        return s.getsockname()[0]
    except:
        return "127.0.0.1"

def loadSettingsFile(filename):
    g = {}
    l = {}
    execfile(filename, g, l)
    settings = ((name, value) for name, value in l.items() if name.isupper() and  name in globals())
    globals().update(settings)

## SETTINGS ###########################################################

DEBUG = False

PORT = 8004
ADDRESS = getLocalAddress()
RUN_AS = None
LOGDIR = "/opt/puli/logs"
#LOGDIR = "/tmp/puli/logs"
CONFDIR = "/opt/puli/conf"
#CONFDIR = "/Users/red/workspace3.6/Puli/Puli/etc/puli"
PIDFILE = "dispatcher.pid"

RENDERNODE_REQUEST_MAX_RETRY_COUNT = 10
RENDERNODE_REQUEST_DELAY_AFTER_REQUEST_FAILURE = .1

POOLS_BACKEND_TYPE = "db"
#POOLS_BACKEND_TYPE = "file"
#POOLS_BACKEND_TYPE = "ws"

FILE_BACKEND_RN_PATH = os.path.join(CONFDIR, "workers.lst")
FILE_BACKEND_LICENCES_PATH = os.path.join(CONFDIR, "licences.lst")
FILE_BACKEND_POOL_PATH = os.path.join(CONFDIR, "pools")
WS_BACKEND_URL = "192.168.2.213"
WS_BACKEND_PORT = 11800

DB_ENABLE = True
DB_CLEAN_DATA = True

DB_URL = "mysql://puliuser:yourpassword@127.0.0.1/pulidb"
#DB_URL = "mysql://puliuser:0ct0pus@127.0.0.1/pulidb"
#DB_URL = "sqlite:///path/to/my/database/file.db"

RN_TIMEOUT = 1200.0
MAX_RETRY_CMD_COUNT = 2
umoya66 commented 11 years ago

here are the files in the files in the conf and conf/pools dir

workers.lst

## Misc-machines
# --------------
# computer-name worker-port cpu-count cpu-core-count cpu-frequency ram-size {"property1":"value1","property2":"value2"}
localhost 8000 4 4 3.0 8000 {"os":"linux"}

license.lst

#name number

maya 50
shave 30
nuke 30
mtoa 20

renderfarm.pool

localhost 8000

On Fri, Oct 4, 2013 at 11:32 AM, Jerome Samson notifications@github.comwrote:

Hi,

Can you send your settings.py file ? It might be a pb when loading pools or workers definition file (located in etc/workers.lst and etc/pools, can you drop the content of you install dir ? Best,

Jerome

— Reply to this email directly or view it on GitHubhttps://github.com/mikrosimage/OpenRenderManagement/issues/2#issuecomment-25707677 .

umoya66 commented 11 years ago

OK, so I got a step closer. The settings.py needed to have DB_CLEAN_DATA = False

now I get the following error

16:49:05 dispatcher   INFO settings.DEBUG = True
16:49:05 dispatcher   INFO settings.ADDRESS = 127.0.0.1
16:49:05 dispatcher   INFO settings.PORT = 8004
16:49:05 dispatcher   INFO checking database
16:49:05 dispatcher   INFO reloading jobs from database
[00:00:00] -- rendernodes complete --
[00:00:00] -- foldernodes complete --
[00:00:00] -- tasknodes complete --
[00:00:00] -- add loop complete --
[00:00:00] -- poolshares complete --
[00:00:00] -- req for cmd complete 0 --
[00:00:00] -- commands complete --
[00:00:00] -- tasks complete --
[00:00:00] -- taskgroups complete --
[00:00:00] -- affect task complete --
[00:00:00] -- affect taskgroup complete --
Traceback (most recent call last):
  File "./scripts/dispatcherd.py", line 105, in <module>
    main()
   File "./scripts/dispatcherd.py", line 101, in main
    dispatcherApplication = make_dispatcher()
  File "/opt/puli/octopus/dispatcher/__init__.py", line 8, in make_dispatcher
    return WSAppFramework(applicationClass=Dispatcher, webServiceClass=WebServiceDispatcher, port=8004)
  File "/opt/puli/octopus/core/framework/wsappframework.py", line 42, in __init__
    self.application = applicationClass(self)
  File "/opt/puli/octopus/dispatcher/dispatcher.py", line 75, in __init__
self.pulidb.restoreStateFromDb(self.dispatchTree, rnsAlreadyInitialized)
   File "/opt/puli/octopus/dispatcher/db/pulidb.py", line 966, in restoreStateFromDb
    tree.nodeMaxId = int(max([FolderNodes.select().max(FolderNodes.q.id),     TaskNodes.select().max(TaskNodes.q.id)]))
TypeError: int() argument must be a string or a number, not 'NoneType'
samson-jerome commented 11 years ago

Hi,

Actually fir the first run, the settings must be:

POOLS_BACKEND_TYPE = "file"
DB_ENABLE = True
DB_CLEAN_DATA = True

The historical way to initialize the DB (by 'historical' I mean, I don't think it is a good way to do it and this process might change in the future) is to first run the dispatcher with settings indicating to clean the DB.

Once init is complete, you must stop the dispatcher and call it again with a new set of settings:

POOLS_BACKEND_TYPE = "db"
DB_ENABLE = True
DB_CLEAN_DATA = False

On the following starts, the system is operationnal (well should be). Sorry for the delay, I'll try to keep an eye on this thread