I got the following error after running the following command:
./nox_core -i ptcp:6633 switch switch_management hostip hosttracker
NOX 0.9.0(zaku)~full~beta (nox_core), compiled Nov 15 2010 21:36:36
Compiled with OpenFlow 0x01
00001|nox|ERR:Cannot change the state of 'python' to INSTALLED:
'python' ran into an error:
Unable to construct a Python component:
Traceback (most recent call last):
File "./nox/coreapps/pyrt/pyoxidereactor.py", line 364, in instance
File "./nox/coreapps/pyrt/pyoxidereactor.py", line 133, in __init__
AttributeError: 'pyoxidereactor' object has no attribute
It appears that I have managed to loop a ProcessProtocol subclass's
transport.write() right back into its outReceived. It's not directly
called, which leads me to believe that somehow stdin and stdout got tied
up. Anything thrown at transport.write() doesn't appear to reach the
actual process. I checked by running `cat > log` through it, the file
'log' is created but remains empty.
I am baffled, but will continue to poke at it. In the meantime, I'd
love to hear if anyone has a clue as to what I might have messed up.
Dominic van Berkel
"You don't have conversations with microprocessors. You tell them what
to do, then helplessly watch the disaster when they take you literally."
- David Brin, Startide Rising
My simple batch processing system is moved here:
Seems to be reasonably functional. Any suggestions/contributions
One thing todo is to add some authentication. For now the server listens
for xmlrpc requests and will run any command without authentication. In my
current environment (single user system, firewalled), that's not a fatal
I try to daemonize twisted, but it uses 100% cpu.
The problem occurs in this code:
def daemonize(log_stdout=False, out_name=None, log_stderr=False,
Turn current process into a daemon
pid = os.fork()
if (pid == 0):
## os.chdir (workdir)
maxfd = os.sysconf("SC_OPEN_MAX")
for fd in range(0, maxfd):
except OSError: # ERROR (ignore)
# Redirect the standard file descriptors to /dev/null. <<<< HERE's
os.open("/dev/null", os.O_RDONLY) # standard input (0)
os.open("/dev/null", os.O_RDWR) # standard output (1)
os.open("/dev/null", os.O_RDWR) # standard error (2)
if (not out_name):
out_name = gen_name() + '.out'
if (not err_name):
err_name = gen_name() + '.err'
sys.stdout = logger.logger (out_name)
sys.stderr = logger.logger (err_name)
print "forked pid", pid
If I comment out the lines that open /dev/null, everything is OK, but with
those lines the process uses 100% cpu.
The actual twisted code (not shown) is
r = Spawner()
This is on linux.
Am Mittwoch, den 03-11-2010 um 15:10 schrieb exarkun(a)twistedmatrix.com:
> One reason to prefer not to have a fixed value as maxDelay is that
> always picking a random values ensures that you'll never have a stampede
> of clients all attempting connections at once.
This should of course be avoided. On the other hand, it is convenient to
have the ability to define a maximum delay (and the name of the variable
suggests that the delay won't be any bigger).
> It might be best to just correct the documentation for maxDelay to point
> out that it's not actually a hard maximum, just the average value the
> maximums will cluster around.
Maybe it's better to change the calculation such that the random value
is always below maxDelay. If the first parameter to random.normalvariate
is adapted in the right way, the result should always be lower than
> That's certainly worth a ticket.
I'll create one, but leave open how to solve the inconsistency.
Weiermayer Solutions GmbH | Abteistraße 12, A-4813 Altmünster
phone: +43 (0) 720 70 30 14 | fax: +43 (0) 7612 20 3 56
I've figured out vaguely how to use Conch as a file transfer client
thanks to the cftp script. I'm currently trying to adapt the simple
SSH server script example (link below) to do file *serving*. I can't
find any example code that actually does this or documentation on this
There's conch's test_filetransfer which indeed does have some server
parts, but being unit tests they gloss over a lot of the things I
think I need to know to get this working for an actual file server.
For example, what's the difference between SSHSession and ISession?
They both appear to be 'sessions' in the SSH sense. Why does ISession
not do anything about subsystems? Do I need one if I'm just using a
subsystem and not opening a shell? If so: is it just a stub, or does
it need to implement behavior? I would guess it's just stubs, since
invoking subsystems does not mean opening a shell.
link to the example:
Ideally, does anyone have any code somewhere that actually serves a file?
thanks in advance,