App fails to launch

Bug #1021355 reported by Daniel Marrable
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Clamour
New
Undecided
Unassigned

Bug Description

Running from Unity causes crash report with error:

clamour crashed with ScanError in __init_socket__():Could not reach clamd using unix socket (/var/run/clamav/clamd.ctl)

running from the command line gives :

marrabld@laptop:~$ clamour
/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:391: Warning: g_object_set_property: construct property "type" for object `Window' can't be set after construction
  Gtk.Window.__init__(self, type=type, **kwds)
Traceback (most recent call last):
  File "/usr/bin/clamour", line 34, in <module>
    clamour.main()
  File "/usr/lib/python2.7/dist-packages/clamour/__init__.py", line 35, in main
    window = ClamourWindow.ClamourWindow()
  File "/usr/lib/python2.7/dist-packages/clamour_lib/Window.py", line 36, in __new__
    new_object.finish_initializing(builder)
  File "/usr/lib/python2.7/dist-packages/clamour/ClamourWindow.py", line 52, in finish_initializing
    pyclamd.init_unix_socket('/var/run/clamav/clamd.ctl')
  File "/usr/lib/pymodules/python2.7/pyclamd.py", line 152, in init_unix_socket
    ping()
  File "/usr/lib/pymodules/python2.7/pyclamd.py", line 211, in ping
    s = __init_socket__()
  File "/usr/lib/pymodules/python2.7/pyclamd.py", line 494, in __init_socket__
    (clamd_SOCKET))
pyclamd.ScanError: Could not reach clamd using unix socket (/var/run/clamav/clamd.ctl)

Ubuntu 12.04 AMD64

Revision history for this message
Thomas Kluyver (takluyver) wrote :

Wow, someone's actually testing it ;-)

Can you check that clamav-daemon is installed (it should be a requirement if you're using the package) and clamd is running? Have you modified the socket setting for ClamAV at all?

Revision history for this message
Daniel Marrable (marrabld) wrote : Re: [Bug 1021355] Re: App fails to launch

mm will hitting reply work?

Yes clamd is installed and gives the the error
ERROR: Can't open /var/log/clamav/clamav.log in append mode (check
permissions!).

If I run it as sudo :
ERROR: initgroups() failed.

No I have modified nothing. I don't really know much about clamAV I have
used winclam only.

Yea I decided to help test a few apps in hope that someone will do the same
for me :-)

On 5 July 2012 23:38, Thomas Kluyver <email address hidden> wrote:

> Wow, someone's actually testing it ;-)
>
> Can you check that clamav-daemon is installed (it should be a
> requirement if you're using the package) and clamd is running? Have you
> modified the socket setting for ClamAV at all?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1021355
>
> Title:
> App fails to launch
>
> Status in Clamour:
> New
>
> Bug description:
> Running from Unity causes crash report with error:
>
> clamour crashed with ScanError in __init_socket__():Could not reach
> clamd using unix socket (/var/run/clamav/clamd.ctl)
>
> running from the command line gives :
>
> marrabld@laptop:~$ clamour
> /usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:391: Warning:
> g_object_set_property: construct property "type" for object `Window' can't
> be set after construction
> Gtk.Window.__init__(self, type=type, **kwds)
> Traceback (most recent call last):
> File "/usr/bin/clamour", line 34, in <module>
> clamour.main()
> File "/usr/lib/python2.7/dist-packages/clamour/__init__.py", line 35,
> in main
> window = ClamourWindow.ClamourWindow()
> File "/usr/lib/python2.7/dist-packages/clamour_lib/Window.py", line
> 36, in __new__
> new_object.finish_initializing(builder)
> File "/usr/lib/python2.7/dist-packages/clamour/ClamourWindow.py", line
> 52, in finish_initializing
> pyclamd.init_unix_socket('/var/run/clamav/clamd.ctl')
> File "/usr/lib/pymodules/python2.7/pyclamd.py", line 152, in
> init_unix_socket
> ping()
> File "/usr/lib/pymodules/python2.7/pyclamd.py", line 211, in ping
> s = __init_socket__()
> File "/usr/lib/pymodules/python2.7/pyclamd.py", line 494, in
> __init_socket__
> (clamd_SOCKET))
> pyclamd.ScanError: Could not reach clamd using unix socket
> (/var/run/clamav/clamd.ctl)
>
>
> Ubuntu 12.04 AMD64
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/clamour/+bug/1021355/+subscriptions
>

--
Daniel Marrable

Ph.D Candidate
Remote Sensing and Satellite Research Group
Department of Imaging and Applied Physics
Curtin University of Technology

Revision history for this message
Thomas Kluyver (takluyver) wrote :

Yep, replying works.

You shouldn't have to run clamd yourself - it should be running as a
service. Look for it in the process list in system monitor. If it's
not there, try the command:

sudo service clamav-daemon start

I'm just about to go away, so I won't have time to test for you before
the app contest ends. I suspect I won't have time to submit this as
part of the app contest, either - but hopefully I can finish polishing
it later.

Thanks!

Revision history for this message
Daniel Marrable (marrabld) wrote :

okay yes doing sudo service clamav-deamon start then starting clamour
worked. No that I have done that the first time, I can get it to start even
after a reboot now.

Now if I try and scan any files and folders it reports that Couldn't scan
<my file or folder> lstat() failed: Permission denied

even if I scan stuff in my home folder or usb device.

Would you like me to submit another bug for this?

On 6 July 2012 01:59, Thomas Kluyver <email address hidden> wrote:

> Yep, replying works.
>
> You shouldn't have to run clamd yourself - it should be running as a
> service. Look for it in the process list in system monitor. If it's
> not there, try the command:
>
> sudo service clamav-daemon start
>
> I'm just about to go away, so I won't have time to test for you before
> the app contest ends. I suspect I won't have time to submit this as
> part of the app contest, either - but hopefully I can finish polishing
> it later.
>
> Thanks!
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1021355
>
> Title:
> App fails to launch
>
> Status in Clamour:
> New
>
> Bug description:
> Running from Unity causes crash report with error:
>
> clamour crashed with ScanError in __init_socket__():Could not reach
> clamd using unix socket (/var/run/clamav/clamd.ctl)
>
> running from the command line gives :
>
> marrabld@laptop:~$ clamour
> /usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:391: Warning:
> g_object_set_property: construct property "type" for object `Window' can't
> be set after construction
> Gtk.Window.__init__(self, type=type, **kwds)
> Traceback (most recent call last):
> File "/usr/bin/clamour", line 34, in <module>
> clamour.main()
> File "/usr/lib/python2.7/dist-packages/clamour/__init__.py", line 35,
> in main
> window = ClamourWindow.ClamourWindow()
> File "/usr/lib/python2.7/dist-packages/clamour_lib/Window.py", line
> 36, in __new__
> new_object.finish_initializing(builder)
> File "/usr/lib/python2.7/dist-packages/clamour/ClamourWindow.py", line
> 52, in finish_initializing
> pyclamd.init_unix_socket('/var/run/clamav/clamd.ctl')
> File "/usr/lib/pymodules/python2.7/pyclamd.py", line 152, in
> init_unix_socket
> ping()
> File "/usr/lib/pymodules/python2.7/pyclamd.py", line 211, in ping
> s = __init_socket__()
> File "/usr/lib/pymodules/python2.7/pyclamd.py", line 494, in
> __init_socket__
> (clamd_SOCKET))
> pyclamd.ScanError: Could not reach clamd using unix socket
> (/var/run/clamav/clamd.ctl)
>
>
> Ubuntu 12.04 AMD64
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/clamour/+bug/1021355/+subscriptions
>

--
Daniel Marrable

Ph.D Candidate
Remote Sensing and Satellite Research Group
Department of Imaging and Applied Physics
Curtin University of Technology

Revision history for this message
Thomas Kluyver (takluyver) wrote :

Yes, please. It's going to be a few days before I can look into either
bug, though. Thanks!

Revision history for this message
Thomas Kluyver (takluyver) wrote :

It seems to be that when you first install clamour, the dependencies pull in python-pyclamd -> clamav-daemon -> clamav-freshclam. freshclam is an updater utility that will run automatically to pull in recent definitions. But it hasn't run by the time the installation tries to start the ClamAV daemon. So the daemon can't find any definitions, and refuses to start. Without the daemon, Clamour can't start either.

After a couple of minutes, you can manually start the daemon, or restart the computer, and it all works.

That's annoying, because many new users will hit that, but I don't see any good way to fix it. A clear error message would be an improvement, but it's still not ideal. Maybe it could offer to start the daemon.

Revision history for this message
Thomas Kluyver (takluyver) wrote :

P.S. Apologies that it took me several months to look at this, instead of a few days. I just got distracted by other things.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.