[tahoe-lafs-trac-stream] [tahoe-lafs] #1680: Unhandled error in tahoe restart when PID file contains non-numeric value
tahoe-lafs
trac at tahoe-lafs.org
Sun Feb 26 05:31:48 UTC 2012
#1680: Unhandled error in tahoe restart when PID file contains non-numeric value
----------------------+---------------------------
Reporter: joepie91 | Owner: somebody
Type: defect | Status: new
Priority: minor | Milestone: undecided
Component: code | Version: 1.9.1
Keywords: | Launchpad Bug:
----------------------+---------------------------
When the twistd.pid file in the Tahoe-LAFS node/client directory contains
a non-numeric value (which was somehow the case after unexpected power
loss on a server), this error is not handled properly when running tahoe
restart.
Output:
{{{
tahoe at vps2:~/allmydata-tahoe-1.9.1/bin$ ./tahoe restart
STOPPING '/home/tahoe/.tahoe'
Traceback (most recent call last):
File "/home/tahoe/allmydata-tahoe-1.9.1/support/bin/tahoe", line 9, in
<module>
load_entry_point('allmydata-tahoe==1.9.1', 'console_scripts',
'tahoe')()
File "/home/tahoe/allmydata-
tahoe-1.9.1/src/allmydata/scripts/runner.py", line 113, in run
rc = runner(sys.argv[1:], install_node_control=install_node_control)
File "/home/tahoe/allmydata-
tahoe-1.9.1/src/allmydata/scripts/runner.py", line 95, in runner
rc = startstop_node.dispatch[command](so, stdout, stderr)
File "/home/tahoe/allmydata-
tahoe-1.9.1/src/allmydata/scripts/startstop_node.py", line 140, in restart
rc = stop(config, stdout, stderr)
File "/home/tahoe/allmydata-
tahoe-1.9.1/src/allmydata/scripts/startstop_node.py", line 92, in stop
pid = int(pid)
ValueError: invalid literal for int() with base 10: '3 s'
}}}
The tahoe start command appears to have proper error handling, but does
not make clear that the daemon has not been started - it looks like a
warning rather than an error:
{{{
tahoe at vps2:~/allmydata-tahoe-1.9.1/bin$ ./tahoe start
STARTING '/home/tahoe/.tahoe'
Pidfile /home/tahoe/.tahoe/twistd.pid contains non-numeric value
}}}
(the above code snippet with the tahoe start command was run ''before''
the tahoe restart command)
Workaround:
Remove the $tahoedir/twistd.pid file (where $tahoedir is the directory
your tahoe.cfg resides in) and manually ensure no daemons are running
before starting the daemon.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1680>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list