Posts Tagged ‘corruption’

Fix Unable to connect to xend: Connection refused. ExpatError: no element found

The error message

Unable to connect to xend: Connection refused. Is xend running?

can be caused by a number of issues, but if your xend.log contains lines regarding syntax, such as:

[2012-01-23 11:33:37 5670] INFO (SrvDaemon:227) Xend stopped due to signal 15.
[2012-01-23 11:33:38 6427] INFO (SrvDaemon:332) Xend Daemon started
[2012-01-23 11:33:38 6427] INFO (SrvDaemon:336) Xend changeset: unavailable.
[2012-01-23 11:33:38 6427] ERROR (SrvDaemon:349) Exception starting xend (no element found: line 1, column 0)
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/xen/xend/server/SrvDaemon.py", line 341, in run
    servers = SrvServer.create()
  File "/usr/lib64/python2.6/site-packages/xen/xend/server/SrvServer.py", line 251, in create
    root.putChild('xend', SrvRoot())
  File "/usr/lib64/python2.6/site-packages/xen/xend/server/SrvRoot.py", line 40, in __init__
    self.get(name)
  File "/usr/lib64/python2.6/site-packages/xen/web/SrvDir.py", line 84, in get
    val = val.getobj()
  File "/usr/lib64/python2.6/site-packages/xen/web/SrvDir.py", line 52, in getobj
    self.obj = klassobj()
  File "/usr/lib64/python2.6/site-packages/xen/xend/server/SrvNode.py", line 30, in __init__
    self.xn = XendNode.instance()
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendNode.py", line 1140, in instance
    inst = XendNode()
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendNode.py", line 158, in __init__
    self._init_PPCIs()
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendNode.py", line 270, in _init_PPCIs
    saved_ppcis = self.state_store.load_state('ppci')
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendStateStore.py", line 104, in load_state
    dom = minidom.parse(xml_path)
  File "/usr/lib64/python2.6/site-packages/_xmlplus/dom/minidom.py", line 1915, in parse
    return expatbuilder.parse(file)
  File "/usr/lib64/python2.6/site-packages/_xmlplus/dom/expatbuilder.py", line 926, in parse
    result = builder.parseFile(fp)
  File "/usr/lib64/python2.6/site-packages/_xmlplus/dom/expatbuilder.py", line 211, in parseFile
    parser.Parse("", True)
ExpatError: no element found: line 1, column 0

there is a good chance your xend database (stored, intuitively, in python syntax…) is suffering from corruption.

It is safe to remove the database but best practice to back it up so rename the directory:

# mv /var/lib/xend /var/lib/xend.bak
# /etc/init.d/xend restart

Solved: Garbage getFrame Images with ffmpeg-php 0.6.0 and ffmpeg 0.5

After updating my installation of ffmpeg and ffmpeg-php on one of my web servers I noticed that images grabbed using ffmpeg-php’s getFrame function spat out weird garbage, usually three corrupt looking frames across the top and static in the bottom two thirds. I tried tinkering with it for a very long time with no success until putting it off for a few months and tonight I finally found the solution: recompiling ffmpeg with the bindist use flag.

# echo "media-video/ffmpeg cpudetection bindist" >> /etc/portage/package.use; emerge ffmpeg

Still not sure exactly what the problem was but glad to have it fixed now, all those corrupt thumbnails were embarrassing :s

Return top
foxpa.ws
Online Marketing Toplist
Internet
Technology Blogs - Blog Rankings

Internet Blogs - BlogCatalog Blog Directory

blogarama - the blog directory
Technology blogs
Bad Karma Networks

Please Donate!


Made in Canada  •  There's a fox in the Gibson!  •  2010-12