Archived community.zenoss.org | full text search
Skip navigation
1 2 3 Previous Next 21828 Views 39 Replies Latest reply: Sep 11, 2013 3:08 PM by Emocke RSS Go to original post
  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    15. Aug 29, 2012 6:32 PM (in response to sunnydave)
    Re: Can't keep zenhub running

    Dave:

     

    Looking at the zenhub logs, nothing sticks out. Whats the memory load on this box look like?

     

    For the VM Ware applicance, it's definitely a case where rabbit isn't accessible. As root can you run '/usr/sbin/rabbitmqctl list_queues -p /zenoss' and post the result? If the bin isnt found, mlocate rabbitmqctl and use that path to run it. You could also try running $ZENHOME/bin/zenoss_upgrade_pre as the root user to have zenoss go through its usual upgrade steps which include configuring rabbits exchanges. I don't know if that'll fix the problem on the VM Ware product, however.

     

    Best,

    --Shane Scott (Hackman238)

  • cjhudock Newbie 3 posts since
    Aug 28, 2012
    Currently Being Moderated
    17. Aug 29, 2012 9:01 PM (in response to sunnydave)
    Re: Can't keep zenhub running

    I have found the VMware snapshot function extremely helpful.  But I have no

    solution to the problem.  If I modify the config files  such as

    /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-eth0  the

    system becomes unstable. I believe I should use some utility to make the

    changes in a more structured way.

     

     

     

    I ended up adding a reservation in the DHCP server to have a consistent IP

    address and not touching the network files at all.

     

     

     

    Chuck

  • dpetzel Rank: Brown Belt 1,141 posts since
    Oct 17, 2010
    Currently Being Moderated
    19. Aug 30, 2012 8:49 PM (in response to sunnydave)
    Re: Can't keep zenhub running

    Did you clip out the actual queues, or do you really have no queues? Here are the queues I have on my system:

     

    [root@localhost ~]# rabbitmqctl list_queues -p /zenoss

    Listing queues ...

    celery  0

    zenoss.queues.zep.signal        0

    zenoss.queues.zep.modelchange   0

    zenoss.queues.zep.migrated.summary      0

    zenoss.queues.zep.rawevents     0

    zenoss.queues.zep.heartbeats    0

    zenoss.queues.zep.zenevents     0

    localhost.localdomain.celeryd.pidbox    0

    zenoss.queues.zep.migrated.archive      0

    ...done.

     

    What does the output of netstat look like in regards to rabbitmq?

    netstat -ano | grep 5672

  • dpetzel Rank: Brown Belt 1,141 posts since
    Oct 17, 2010
    Currently Being Moderated
    20. Aug 30, 2012 9:04 PM (in response to dpetzel)
    Re: Can't keep zenhub running

    Can you run the following commands and provide the output?

     

    List the configured RabbitMQ Users:

    rabbitmqctl list_users

     

    List your Zenoss AMQP Settings:

    cat /opt/zenoss/etc/global.conf | grep amqp

     

    Dump the permissions for the currently configured amqpuser

    amqp_user=`cat /opt/zenoss/etc/global.conf | grep amqpuser | gawk '{print $2}'`

    rabbitmqctl list_user_permissions -p /zenoss $amqp_user

  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    21. Sep 5, 2012 12:48 PM (in response to sunnydave)
    Re: Can't keep zenhub running

    sunnydave:

     

    Hum, something is seriously wrong. Have you tried running $ZENHOME/bin/zenoss_upgrade_pre as the root user? This will go through all the upgrade steps including rebuilding the rabbit queues and configuring zenoss to talk to them.

     

    Best,

    --Shane Scott (Hackman238)

  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    23. Sep 11, 2012 11:07 AM (in response to sunnydave)
    Re: Can't keep zenhub running

    Dave:

     

    No problem, we all get busy.

     

    Glad to hear it's working now! I had a feeling it might be resource related. Keep an eye on it and happy ZenOSSing!

     

    Best,

    --Shane Scott (Hackman238)

  • BillyBob Newbie 2 posts since
    Oct 1, 2012
    Currently Being Moderated
    24. Oct 1, 2012 12:39 PM (in response to Shane Scott)
    Re: Can't keep zenhub running

    Shane,

     

    I'm seeing this same problem with zenhub after reconfiguring the CentOS VM demo to run on a bridged LAN in VMware Workstation.

     

     

    The demo VM was configured to use VMnet1 (host-only), I moved to VMnet0 (bridged) and altered the files network, ifcfg-eth0, hosts. Zenoss starts up and talks at the expected static address, but configuring scanning jobs fails silently.

     

    When I check the log files I find zenhub has exited:

     

    2012-09-28 11:15:05,924 INFO zen.HubService.RenderConfig: Starting graph retrieval listener on port 8090
    2012-09-28 11:15:09,041 INFO zen.zenoss.protocols.amqp: amqp connection was closed [Errno 104] Connection reset by peer
    2012-09-28 11:15:12,046 INFO zen.zenoss.protocols.amqp: amqp connection was closed [Errno 104] Connection reset by peer
    2012-09-28 11:15:12,047 ERROR zen.ZenHub: Unable to send an event
    Traceback (most recent call last):
      File "/opt/zenoss/Products/ZenHub/zenhub.py", line 576, in sendEvent
        self.zem.sendEvent(Event(**kw))
      File "/opt/zenoss/Products/ZenEvents/MySqlSendEvent.py", line 60, in sendEvent
        event = self._publishEvent(event)
      File "/opt/zenoss/Products/ZenEvents/MySqlSendEvent.py", line 82, in _publishEvent
        publisher.publish(event)
      File "/opt/zenoss/Products/ZenMessaging/queuemessaging/publisher.py", line 283, in publish
        self._publish("$RawZenEvents", routing_key, event, mandatory=mandatory, immediate=immediate)
      File "/opt/zenoss/Products/ZenMessaging/queuemessaging/publisher.py", line 302, in _publish
        mandatory, immediate)
      File "/opt/zenoss/Products/ZenMessaging/queuemessaging/publisher.py", line 376, in publish
        headers=headers, declareExchange=declareExchange)
      File "/opt/zenoss/lib/python/zenoss/protocols/amqp.py", line 138, in publish
        raise Exception("Could not publish message. Connection may be down")
    Exception: Could not publish message. Connection may be down
    2012-09-28 11:15:18,005 INFO zen.zenoss.protocols.amqp: amqp connection was closed [Errno 104] Connection reset by peer
    2012-09-28 11:15:21,009 INFO zen.zenoss.protocols.amqp: amqp connection was closed [Errno 104] Connection reset by peer

     

    When I attempt $ZENHOME/bin/zenoss_upgrade_pre as root:


    [root@zenoss bin]# $ZENHOME/bin/zenoss_upgrade_pre
    -bash: /bin/zenoss_upgrade_pre: No such file or directory

    [root@zenoss bin]# pwd
    /opt/zenoss/bin
    [root@zenoss bin]# ./zenoss_upgrade_pre
    ./zenoss_upgrade_pre: line 32: /bin/zenoss_startup_config: No such file or directory
    ./zenoss_upgrade_pre: line 35: /bin/shared-functions.sh: No such file or directory
    ./zenoss_upgrade_pre: line 36: /bin/install-functions.sh: No such file or directory
    ./zenoss_upgrade_pre: line 39: confirm_jre: command not found
    ./zenoss_upgrade_pre: line 42: confirm_rrd: command not found
    ./zenoss_upgrade_pre: line 45: shebang: command not found
    ./zenoss_upgrade_pre: line 49: update_conf_files: command not found
    grep: /etc/zope.conf: No such file or directory
    ./zenoss_upgrade_pre: line 54: create_zodb_db: command not found
    -bash: /bin/python: No such file or directory
    ./zenoss_upgrade_pre: line 62: upgrade_conf_options_42: command not found
    ./zenoss_upgrade_pre: line 65: /bin/zenoss_startup_config: No such file or directory
    sed: can't read /etc/zenstatus.conf: No such file or directory
    ./zenoss_upgrade_pre: line 79: start_rabbitmq: command not found
    ./zenoss_upgrade_pre: line 82: configure_amqp: command not found
    ./zenoss_upgrade_pre: line 85: /bin/zenoss_upgrade_patch_zenpacks.sh: No such file or directory
    ./zenoss_upgrade_pre: line 88: create_zep_db: command not found
    ./zenoss_upgrade_pre: line 93: remove_zep_jdbc_config: command not found
    ./zenoss_upgrade_pre: line 97: create_zodb_session_db: command not found
    ./zenoss_upgrade_pre: line 100: patch_zopectl_and_runzope: command not found
    ./zenoss_upgrade_pre: line 103: upgrade_to_persistent_sessions: command not found
    ./zenoss_upgrade_pre: line 115: run_zenmigrate: command not found
    [root@zenoss bin]#

    

     

    Should I be doing zenoss_upgrade_pre as the zenoss user?

  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    25. Oct 1, 2012 12:43 PM (in response to BillyBob)
    Re: Can't keep zenhub running

    Mark:

     

    Sounds like paths didn't get setup.

     

    In your /root/.bashrc add the following:

     

    # User specific aliases and functions

    export ZENHOME="/opt/zenoss"

    export PATH="${ZENHOME}/bin:${PATH}"

    export PYTHONPATH="/opt/zenoss/lib/python"

    export LD_LIBRARY_PATH="/opt/zenoss/lib"

     

    And make sure your /root/.bash_profile contains the following:

     

    # Get the aliases and functions

    if [ -f ~/.bashrc ]; then

    . ~/.bashrc

    fi

     

    Once done exit the root user then re su root. echo $ZENHOME. If it returns /opt/zenoss then give the $ZENHOME/bin/zenoss_upgrade_pre again.

     

    Best,

    --Shane Scott (Hackman238)

  • BillyBob Newbie 2 posts since
    Oct 1, 2012
    Currently Being Moderated
    26. Oct 1, 2012 1:45 PM (in response to Shane Scott)
    Re: Can't keep zenhub running

    Shane,

     

    The environment settings allowed the preconfig to work, and I can now create/submit jobs that run and

    complete successfully.

     

    Thank you for the assist.

     

    Mark

  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    27. Oct 1, 2012 1:46 PM (in response to BillyBob)
    Re: Can't keep zenhub running

    Mark:

     

    Anytime!

     

    Best,

    --Shane Scott (Hackman238)

  • J C Newbie 5 posts since
    Oct 11, 2012
    Currently Being Moderated
    28. Oct 11, 2012 7:34 PM (in response to Shane Scott)
    Re: Can't keep zenhub running

    Thanks guys...this solved my problem with zenhub not running.

     

    1. su - root
    2. /etc/init.d/zenoss stop                                       # stop zenoss
    3. cat << EOF >> .bashrc                                     # add ENV's
      export ZENHOME="/opt/zenoss"
      export PATH="${ZENHOME}/bin:${PATH}"
      export PYTHONPATH="/opt/zenoss/lib/python"
      export LD_LIBRARY_PATH="/opt/zenoss/lib"
      EOF
    4. /etc/init.d/zenoss start                                      # start zenoss
    5. $ZENHOME/bin/zenctl xstatus |grep zenhub      # ck zenhub staus
      Running        26316      zenhub

     

    Nice to find a thread with an answer instead of just the questions... 

     

    Excellent work zenmasters of zenoss!

  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    29. Oct 11, 2012 10:45 PM (in response to J C)
    Re: Can't keep zenhub running

    JC:

     

    Anytime.

     

    Best,

    --Shane Scott (Hackman238)

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points