problems with celery after update

807 views
Skip to first unread message

zerberos

unread,
Apr 15, 2015, 7:31:36 AM4/15/15
to modern-hon...@googlegroups.com
hi,

i have updated mhn & the other scripts (before that everything was running quite well)

Then I downgraded pymongo as in https://github.com/threatstream/mhn/issues/154:

sudo su -
source /opt/mhn/env/bin/activate
pip uninstall pymongo # enter "y" when prompted...
pip install pymongo==2.7.2 
supervisorctl restart all


I still have the following problem -  on the web frontend I get  "Internal Server Error"

The status says (even after restarting):

mhn-celery-beat                  FATAL      Exited too quickly (process log may have details)

mhn-celery-worker                FATAL      Exited too quickly (process log may have details)


worker.err has the following:

(...)

  File "/opt/mhn/env/local/lib/python2.7/site-packages/kombu/utils/__init__.py", line 92, in symbol_by_name

    module = imp(module_name, package=package, **kwargs)

  File "/opt/mhn/env/local/lib/python2.7/site-packages/celery/utils/imports.py", line 101, in import_from_cwd

    return imp(module, package=package)

  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module

    __import__(name)

  File "/opt/mhn/server/mhn/__init__.py", line 41, in <module>

    from mhn.ui.views import ui

  File "/opt/mhn/server/mhn/ui/views.py", line 2, in <module>

    from pygal.style import *

ImportError: No module named pygal.style

    return imp(module, package=package)

  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module

    __import__(name)

  File "/opt/mhn/server/mhn/__init__.py", line 41, in <module>

    from mhn.ui.views import ui

  File "/opt/mhn/server/mhn/ui/views.py", line 2, in <module>

    from pygal.style import *


=======

what is the problem on my system?


Thanks!


Jason Trost

unread,
Apr 15, 2015, 8:42:29 AM4/15/15
to zerberos, modern-hon...@googlegroups.com
pip install pygal

This package was added to the requirements.txt file when the charts were added to the UI.
--
You received this message because you are subscribed to the Google Groups "Modern Honey Network" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modern-honey-net...@googlegroups.com.
To post to this group, send email to modern-hon...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modern-honey-network/b9041192-c19c-48b1-8786-a240c4199434%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Jason Trost | Director of ThreatStream Labs | www.threatstream.com
2317 Broadway, 3rd Floor| Redwood City, CA 94063
Phone:  386.235.0078 | Twitter:  @jason_trost


zerberos

unread,
Apr 17, 2015, 5:21:44 AM4/17/15
to modern-hon...@googlegroups.com, andriu....@gmail.com

Hi


>>pip install pygal


Command successfully execuded, but still:


geoloc                           RUNNING    pid 12328, uptime 0:13:13

honeymap                         RUNNING    pid 8983, uptime 2:40:09

hpfeeds-broker                   RUNNING    pid 8977, uptime 2:40:09

mhn-celery-beat                  FATAL      Exited too quickly (process log may have details)

mhn-celery-worker                BACKOFF    Exited too quickly (process log may have details)

mhn-collector                    RUNNING    pid 8982, uptime 2:40:09

mhn-uwsgi                        RUNNING    pid 8980, uptime 2:40:09

mnemosyne                        RUNNING    pid 8978, uptime 2:40:09



And still the internal server error.


Then I have restarted the debian server, but now it looks even worse:


geoloc                           RUNNING    pid 2208, uptime 0:02:03

honeymap                         RUNNING    pid 2212, uptime 0:02:03

hpfeeds-broker                   FATAL      Exited too quickly (process log may have details)

mhn-celery-beat                  FATAL      Exited too quickly (process log may have details)

mhn-celery-worker                FATAL      Exited too quickly (process log may have details)

mhn-collector                    RUNNING    pid 2211, uptime 0:02:03

mhn-uwsgi                        RUNNING    pid 2209, uptime 0:02:03


mnemosyne                        FATAL      Exited too quickly (process log may have details)




Any Idea?


Thanks


-- 

Andriu


Am Mittwoch, 15. April 2015 14:42:29 UTC+2 schrieb Jason Trost:
pip install pygal

This package was added to the requirements.txt file when the charts were added to the UI.


Jason Trost

unread,
Apr 19, 2015, 12:40:12 AM4/19/15
to zerberos, modern-hon...@googlegroups.com
Can you provide your logs in /var/log/mhn?

zerberos

unread,
Apr 20, 2015, 5:51:34 AM4/20/15
to modern-hon...@googlegroups.com
Hi Jason,

Here are the logs..

Thanks
Andriu
collector.err
mhn.log
worker.err
worker.log

Jason Trost

unread,
Apr 20, 2015, 1:16:38 PM4/20/15
to zerberos, modern-hon...@googlegroups.com
HPFeeds broker will fail to start if mongodb is not running so try this:

sudo su - 
cd /opt/mhn
source env/bin/activate
pip install -r server/requirements.txt

supervisorctl stop all
/etc/init.d/mongod start
chmod 777 /var/log/mhn/mhn.log
supervisorctl start mhn-celery-worker
supervisorctl start mhn-celery-beat
supervisorctl start all

zerberos

unread,
Apr 20, 2015, 2:45:18 PM4/20/15
to modern-hon...@googlegroups.com
great, everything running now - except geoloc (FATAL, Exited too quickly)

I tried to restart geloc: ERROR (abnormal termination)

So still some minor thing missing...here  the tail from geoloc.err:

Parsing config file: /opt/hpfeeds/geoloc.json
Traceback (most recent call last):
  File "/opt/hpfeeds/env/local/lib/python2.7/site-packages/hpfeeds.py", line 137        , in connect
    self.s.connect((addr, self.port))
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 111] Connection refused
connected to @hp2
Traceback (most recent call last):
  File "/opt/hpfeeds/examples/geoloc/geoloc.py", line 98, in main
    hpc.run(on_message, on_error)
  File "/opt/hpfeeds/env/local/lib/python2.7/site-packages/hpfeeds.py", line 188        , in run
    message_callback(str(ident), str(chan), content)
  File "/opt/hpfeeds/examples/geoloc/geoloc.py", line 83, in on_message
    traceback.print_exc(file=sys.stdout)
NameError: free variable 'traceback' referenced before assignment in enclosing s        cope


Thank you very much for your help.


Am Mittwoch, 15. April 2015 13:31:36 UTC+2 schrieb zerberos:

Jason Trost

unread,
Apr 24, 2015, 1:05:13 PM4/24/15
to zerberos, modern-hon...@googlegroups.com
Sorry for the delay. I was at the RSA conference all week and am just
now catching up on email.

This error indicates that your hpfeeds broker is not running OR that
geoloc is misconfigured and has the wrong IP for the hpfeeds broker.
Can you check your supervisorctl and make sure the hpfeeds-broker is
running? If it is not, please send me its log from /var/log/mhn/

--Jason
> --
> You received this message because you are subscribed to the Google Groups
> "Modern Honey Network" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to modern-honey-net...@googlegroups.com.
> To post to this group, send email to modern-hon...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/modern-honey-network/e863a339-9b2b-4e91-98c9-8ccae417eb61%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



sneaky...@gmail.com

unread,
Jun 11, 2015, 6:59:40 PM6/11/15
to modern-hon...@googlegroups.com, andriu....@gmail.com

chmod 777 /var/log/mhn/mhn.log worked for me on Ubuntu 14.04 - Thanks.

mhn-celery-worker                FATAL      Exited too quickly (process log may have details)


mark@ubuntu:/var/log/mhn$ tail /var/log/mhn/mhn-celery-worker.err

    mhn.config['LOG_FILE_PATH'], maxBytes=10240, backupCount=5)

  File "/usr/lib/python2.7/logging/handlers.py", line 117, in __init__

    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)

  File "/usr/lib/python2.7/logging/handlers.py", line 64, in __init__

    logging.FileHandler.__init__(self, filename, mode, encoding, delay)

  File "/usr/lib/python2.7/logging/__init__.py", line 903, in __init__

    StreamHandler.__init__(self, self._open())

  File "/usr/lib/python2.7/logging/__init__.py", line 928, in _open

    stream = open(self.baseFilename, self.mode)

IOError: [Errno 13] Permission denied: '/var/log/mhn/mhn.log'


-Mark

Jim Clausing

unread,
Jun 12, 2015, 10:30:06 AM6/12/15
to sneaky...@gmail.com, modern-hon...@googlegroups.com, andriu....@gmail.com
Seriously?  777 on a log file?  What uid/gid is the process running under and set the permissions on the log file appropriately?  If you want the quick fix of making it writable by anyone on the system 666 is plenty, no need to make a log file executable.  I thought we had moved past that kind of knee jerk response in the early 1980s.  Sorry if that sounds a little snarky, but come on.

---Jim

--
You received this message because you are subscribed to the Google Groups "Modern Honey Network" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modern-honey-net...@googlegroups.com.
To post to this group, send email to modern-hon...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages