TracNav menu
-
System Links
- AboutNavigation concerning this panel
- Edit Wiki Text to URL mappings
- RecentChanges
- TitleIndex
- {6} All tickets
-
vDBI instances
- http://cms01.phys.ntu.edu.tw/dbi/
- http://cms02.phys.ntu.edu.tw/dbi/
- http://dayabay.phys.ntu.edu.tw/dbi/
- http://belle7.nuu.edu.tw/dbi/
- http://dayabay.ihep.ac.cn/dbi/
-
Other DB interfaces
- http://web.dyb.ihep.ac.cn/phpMyAdmin
-
HFAG/b2c
- cms01 scrape under review
- cms01 rez editing
- hfag ''published'' scrape
-
Mercurial Repos
- http://belle7.nuu.edu.tw/hg/
- http://cms01.phys.ntu.edu.tw/hg/
-
Repository list //tracs
- //tracs/aberdeen midas/mxml/roody/…
- //tracs/mdybsvn READ ONLY IHEP mirror
- //tracs/tracdev add-ons to Trac
- //tracs/heprez HFAG/b2charm sources
- //tracs/env with primary wiki
- //tracs/data for data only, not sources
- SOP
-
IHEP dybsvn
- dybsvn:/ prefix hop
- ihep:/ intertrac hop
- trac.log
-
IHEP dybaux
- http://dayabay.ihep.ac.cn/tracs/dybaux
-
Other Tracs
- rum
-
Tag Clumps
- tagged:TODO
- tagged:UnitTest
- tagged:Aberdeen
- tagged:Debug
- tagged:G4dyb
- tagged:HFAG
-
ELogs
- http://dayabay.ihep.ac.cn:8099/ IHEP ELog
- http://web.dyb.ihep.ac.cn:8099/ OnSite ELog
-
Dayabay Search
- swish dyb search
- Sympa Searchable Mail Archive
-
Dayabay Wikis
- BNL public wiki
- BNL private wiki
- IHEP twiki
- IHEP Internal
-
Docdb
- DocDB
- DocDB Calendar
- DYB Project DocDB
- AD Elog
-
Dayabay Nightly
- dybinst-nightly
- Nightly-manual.pdf
-
BNL Wiki Pages
- db:Offline_Documentation list of offline docdb
- db:SVN_Statistics
- db_:SVN
- db:Help:Contents
- db:Special:Recentchanges
- dbp:Special:Recentchanges
- dbp:SimulationGroup
- dbp:UserManual
-
Check
- Dayabay At Work
- Contacts
- Caltech TWiki
- IHEP public page
- Nathaniels G4dyb Doxygen
- IHEP cvsweb
- IHEP cvs_server
- mantis
-
Migrating pages to Mediawiki
- MigratePageToBNL
-
Mailing List Archives
- Simulation
- Offline
- General
-
Dayabay tools
- Introduction
- Active Tickets (ie what to break next)
- Sources of ready to analyse .root files
-
Usage Tips and introduction to this space
- Advantages of Trac
- Using InterWiki and InterTrac links
- Introduction to Trac Web App
-
Building Dayabay sw and pre-requisites
- Building Pre-requisites
- Building CLHEP
- Building Geant4
- Building G4dybApp.exe
-
Developing Dayabay SW
- RevisionList
- ManualMerge
- Branching for your Study
- Merge Back to the MotherShip
- RepositoryLayout
- IHEP SVN Repository
- dybsvn:/
-
Geant4 Modular Geometry Editing
- G4ModularEditing
- G4SensitiveSkinEdit
- G4SensitiveSkinEditTesting
- G4SensitiveSkinEditNotes
- AcrylicDimensions
- Modular Geometry Editing in G4dyb
-
Documented CVS Commits
- UserTalkBlyth dbp:User_talk:Blyth
- Running G4dyb with a seed file dbp
- PeskyCollectionNotFound dbp
- SetOptPhotonPolar dbp
- PhysOff dbp
-
Dayabay SW Usage
- Good Places to Breakpoint in G4dyb
- Interactive Use/Debugging of G4dybApp.exe
-
Autovalidation
- Validation of G4dybApp.exe
- AutovalidationSuggestions
- Nathaniels List
-
Geometry
- VGM sourceforge
-
Mac OS X specific
- Geant4 Xcode
- G4dyb Xcode
- G4dyb Xcode Build
- Setting Up SCM in Xcode
- X11 - Cocoa copy/paste setup
- XcodeDebuggingTips
- XcodeRootCint
-
Source Code Management (SCM)
- AlternativesToSVN
- SVN
- SVN_Merge
- SVNMirror
- SVNwithSVNWorkflow
- CVSwithSVNWorkflow
- SVNCleanRevision
- SVNMigrateRepository
- ConflictResolution
- Bring Folder Under SCM
- Subversion Tips
- Subversion Book
- CVS Book
- SVN Users List
-
SCM development
- CVSwithSVN
- CVSwithSVNTest
- CVSMysteries
- SVNDumpLoad
-
Debugging with GDB
- DebuggingTips
-
Linux IDE
- Kdevelop IDE
- vi/vim with others plugins
-
Dayabay Simulation Studies
- Fake SD Debugging
- Acrylic Transmission
- Sensitive Detector Debugging
- SimWorkshopRoughNotes
-
Dayabay Offline
- DybSvnOrganization
- DybInstComments
- CMT
- DBITest
- MySQLMac
- db:Database
- G4dybComputingDependencies
- XMLLogging
- MediaWikiSuggestions
-
Optical Photons
- Optical Photons in Geant4
- Optical Photons in G4dyb
- dbp:OpticalPhotonTrajectories
-
Geant4
- Geant4 tutorials/guides
- Geant Macro
- G4 For Application Developer
- G4 For Toolkit Developer (class descriptions)
- G4 Tutorial Paris June 2007
- G4 Generated Macro Documentation
- G4 HyperNews Search
- G4 documentation index
- Geant4 FAQ
- Geant4 9.0 Release Notes
-
Gaudi
- GaudiFollowAlong
- db:Gaudi_Learning_Resources
- db:GaudiObjDesc
- db:Gaudi_and_Python_aware_data
- Gaudi User Guide v9
- AthenaExamples
-
Visualization
- The Open Inventor 3D Viewer
-
NERSC facilities
- UsingPDSF
- nim.nersc.gov for account management
- TWiki:PDSFUserGuide
- NERSC help
- PDSF linux cluster
- modules environment controller
-
Wiki Pages
- dbp:Mailing_Lists
- TWiki:AntineutrinoDetectorSimulations
- dbp:AntineutrinoDetectorSimulations
- Simulation Workshop June 27-28
-
Root
- Root Search
- Root Reference
- RootLearningTips
- Debugging Root with GDB
-
Tai-Hsiangs page
- Taihsiang's page
- ToDo
- Question
- My G4dyb FAQ
- My G4dyb Building pre-requisties FAQ
- Setting of my geant4 install
- Root Learning Tips
- Optical property study of acrylic sample
- Notes
- MaterialsDatabase
- Measurement Method
- LaTex Learning
- Study notes of VME
- NuWa usage tips
- Python/IPython
- Taihsiang's Learning tips
- Training Fresh Students
- Lambda 650 Spectrometer Status Log
- 3m Acrylic Vessel Status Log
- Acrylic Study
- My Simulation Task
-
Wun-syong's page
- 3m AV Environment Control
-
Data
- XML Data Table and Usage
- Transmission of Acrylic Sample
- VME Calibration
-
Aberdeen
- Aberdeen Event Visualization
- Aberdeen Event Reconstruction
- Aberdeen VME
- Aberdeen VME Log
- Aberdeen VME FAQ
- Aberdeen Data Format
- Aberdeen Neutron Detector Reconstruction
-
Tools Background
- Bash Function Hints
- Using YUM on RedHat
- Debugging With GDB
- Condor Quick Start
- Linux Documentation
- bash shell reference
- Apple GDB Introduction
- For Microsoft Users
-
Trac Links
- Trac Hacks
- Trac Mail Archive
-
Local
- DesktopRecovery
- Google Meetings Calendar
- [dyw_2_9:log:@1:latest dyw_2_9 revision log ]
- NTUHEP issue tracking
- {1} Active Tickets
-
HFAG
- HFAGNearlyFull
- Docbook2TracWiki
- Where things are for HFAG webapp
- PerformanceMonitoring
- BelleUpdating
- BelleUpdatingWorkflow
- HFAGSourceControl
- devhfag:docs/operations.xml
- devhfag:docs/sources.xml
- //tracs/heprez/timeline
- EPS2007 19-25 July
- LP2007 13-18 Aug
- RabbitMQ : AMQP messaging implentation (Message Oriented Middleware)
- Node N : RabbitMQ installation
- Node N : ejabberd 2.0.5
- Node C : RabbitMQ installation
-
Exercising the Rabbit
- Erlang
- try onlamp example
- running rabbitmq server
-
administration of rabbitmq server with rabbitmqctl
- sudo rabbitmqctl list_users
- sudo rabbitmqctl list_vhosts
- sudo rabbitmqctl list_permissions
- sudo rabbitmqctl list_user_permissions guest
- sudo rabbitmqctl list_queues
- sudo rabbitmqctl list_exchanges
- sudo rabbitmqctl list_bindings
- sudo rabbitmqctl list_connections
- can explicitly give a virtual host parameter ... contrary to help message …
- permissons elucidates the the model
- AMQP model
- py-amqplib : python client for : Advanced Message Queuing Procotol (AMQP)
- Carrot : a layer on top of amqplib
- Celery : Distributed Task Management : uses carrot
- rabbitmq-c
- rabbitmq-server on OSX ?
RabbitMQ : AMQP messaging implentation (Message Oriented Middleware)
For messaging DAQ events, like begin-of-run first considered : lowish level apache axis2C (built on libcurl +libxml2) wiki:RunInfo
- but this needs the receiver to be awake at all times... there is no queuing, so you will loose messages.
Hence consider AMQP implementation, RabbitMQ
RabbitMQ tagged
- #276 ABORT: rootmq_init failed rc : 61 '''Opening socket : Connection refused''' (new) (RabbitMQ RootMQ)
- #279 Serialized TObject messages kill ejabberd/mod_rabbitmq bridged iChat consumers (new) (Ejabberd RabbitMQ RootMQ iChat)
- #280 raw aborts of rootmq consumer complaining : Expected Header (new) (AbtViz RabbitMQ RootMQ)
- #316 macports rabbitmq-server not built properly on G (closed) (RabbitMQ SSL)
- #317 macports rabbitmq-server expires after 60s with : '''ERROR: unexpected epmd error: address''' (closed) (Address Erlang RabbitMQ epmd)
- AberdeenOnlineEventDisplay Aberdeen Online Event Display : using (AMPQ) Message Queues to hold the events (AMQP Aberdeen Glib MVC RabbitMQ Threads)
- Celery Celery : a distributed task queue using AMQP messaging (AMQP Carrot Celery Django RabbitMQ RunInfo)
- Ejabberd EJabberD : Erlang Jabber Daemon : XMPP compliant message server (AMQP Jabber Messaging RabbitMQ)
- ModRabbitMQ mod_rabbitmq / rabbitmq-xmpp : an ejabberd module (AMQP Ejabberd Erlang Jabber RabbitMQ XMPP)
- RabbitMQAdmin RabbitMQ Admin Interfaces (Erlang RabbitMQ)
- RabbitMQC RabbitMQ-C (AMQP RabbitMQ)
- RabbitMQFanout RabbitMQ Fanout (AMQP Bunny RabbitMQ)
- RabbitMQTopic RabbitMQ Topic Exchange Investigations (AMQP Ejabberd ModRabbitMQ RabbitMQ RootMQ Topic XMPP)
- RootMQ RootMQ : Bringing Messaging to ROOT (AMQP ROOT RabbitMQ)
- RootMQConfig RootMQ Config (AMQP RabbitMQ RootMQ)
- RootMQDebug RootMQ Debug (AMQP RabbitMQ RootMQ)
- RootMQEarlyInvestigations RootMQ Early Investigations (AMQP ROOT RabbitMQ RootMQ)
- RootMQTesting RootMQ Testing (AMQP RabbitMQ RootMQ)
AMQP tagged
- #251 notifymq bus error when ENV_PRIVATE_PATH not defined ... should be a clean abort (new) (AMQP Private)
- #252 pip install carrot succeeds without json module ... (closed) (AMQP Carrot JSON)
- #323 unkludged rabbitmq-c still fails to rootcint (new) (AMQP RabbitMQ-c rmqc rootcint)
- AberdeenOnlineEventDisplay Aberdeen Online Event Display : using (AMPQ) Message Queues to hold the events (AMQP Aberdeen Glib MVC RabbitMQ Threads)
- Celery Celery : a distributed task queue using AMQP messaging (AMQP Carrot Celery Django RabbitMQ RunInfo)
- Ejabberd EJabberD : Erlang Jabber Daemon : XMPP compliant message server (AMQP Jabber Messaging RabbitMQ)
- MidasMQ Midas MQ (AMQP Aberdeen Midas Root RunInfo)
- ModRabbitMQ mod_rabbitmq / rabbitmq-xmpp : an ejabberd module (AMQP Ejabberd Erlang Jabber RabbitMQ XMPP)
- Pika Pika (AMQP Pika)
- RabbitMQ RabbitMQ : AMQP messaging implentation (Message Oriented Middleware) (AMQP Aberdeen Carrot Celery Django Messaging)
- RabbitMQC RabbitMQ-C (AMQP RabbitMQ)
- RabbitMQFanout RabbitMQ Fanout (AMQP Bunny RabbitMQ)
- RabbitMQTopic RabbitMQ Topic Exchange Investigations (AMQP Ejabberd ModRabbitMQ RabbitMQ RootMQ Topic XMPP)
- RootMQ RootMQ : Bringing Messaging to ROOT (AMQP ROOT RabbitMQ)
- RootMQConfig RootMQ Config (AMQP RabbitMQ RootMQ)
- RootMQDebug RootMQ Debug (AMQP RabbitMQ RootMQ)
- RootMQEarlyInvestigations RootMQ Early Investigations (AMQP ROOT RabbitMQ RootMQ)
- RootMQTesting RootMQ Testing (AMQP RabbitMQ RootMQ)
Messaging Queue Evaluation :
AMQP introductions
Intro to AMQP and its usage from python
Other AMQP implementations / additions
0MQ : AMQP implementation in C++
Apache Qpid C++
Redhat MRG... commercial on top of Qpid
C++ Client Messaging with qpid
OpenAMQ
Carrot : originally part of Celery
Carrot+Celery click counting with django example in celery docs
- http://ask.github.com/celery/tutorials/clickcounter.html
- excellent example : wiki:RunInfo django consumer could follow this rather closely ...
Other Messaging Protocols + …
RestMS : good marketing spiel, little in way of implementations yet
- http://www.restms.org/article:introduction-to-restms
- http://www.restms.org/
- http://www.imatix.com/articles:introduction-to-restms
A RestMS implementation on the Python Django Web Framework.
XMPP : formerly Jabber
- supported by many IP clients : including iChat / Adium
ejabberd : Erlang Jabber Daemon
ejabberd mod_rabbitmq : Gateway between ejabberd and RabbitMQ
The mod_rabbitmq module implements an ejabberd extension module which gateways AMQP (as implemented by RabbitMQ) to XMPP.
- http://hg.rabbitmq.com/rabbitmq-xmpp/raw-file/default/doc/index.html
- http://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol
orbited : pure JavaScript/HTML socket in the browser
Allow messaging (AMQP) in the browser ... could have a DAQ bot to notify happening(new runs)/errors etc..
Node N : RabbitMQ installation
Following EPEL hookup with redhat-;redhat-epel5 ... see wiki:Yum
[blyth@belle7 e]$ sudo yum --enablerepo=epel install rabbitmq-server [sudo] password for blyth: Loaded plugins: kernel-module epel 100% |=========================| 3.4 kB 00:00 epel/primary_db 100% |=========================| 2.6 MB 00:01 Setting up Install Process Resolving Dependencies There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them. The program yum-complete-transaction is found in the yum-utils package. --> Running transaction check ---> Package rabbitmq-server.i386 0:1.7.2-1.el5 set to be updated --> Processing Dependency: erlang for package: rabbitmq-server --> Running transaction check ---> Package erlang.i386 0:R12B-5.8.el5 set to be updated --> Processing Dependency: tk for package: erlang --> Processing Dependency: libodbc.so.1 for package: erlang --> Running transaction check ---> Package tk.i386 0:8.4.13-5.el5_1.1 set to be updated ---> Package unixODBC.i386 0:2.2.11-7.1 set to be updated --> Finished Dependency Resolution Beginning Kernel Module Plugin Finished Kernel Module Plugin Dependencies Resolved ======================================================================================================================================================================================================== Package Arch Version Repository Size ======================================================================================================================================================================================================== Installing: rabbitmq-server i386 1.7.2-1.el5 epel 495 k Installing for dependencies: erlang i386 R12B-5.8.el5 epel 39 M tk i386 8.4.13-5.el5_1.1 sl-security 889 k unixODBC i386 2.2.11-7.1 sl-base 832 k Transaction Summary ======================================================================================================================================================================================================== Install 4 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 42 M Is this ok [y/N]: y Downloading Packages: (1/4): rabbitmq-server-1. 100% |=========================| 495 kB 00:00 (2/4): unixODBC-2.2.11-7. 100% |=========================| 832 kB 00:07 (3/4): tk-8.4.13-5.el5_1. 100% |=========================| 889 kB 00:08 (4/4): erlang-R12B-5.8.el 100% |=========================| 39 MB 00:40 warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 217521f6 epel/gpgkey 100% |=========================| 1.7 kB 00:00 Importing GPG key 0x217521F6 "Fedora EPEL <epel@fedoraproject.org>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL Is this ok [y/N]: y Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : unixODBC 1/4 Installing : tk 2/4 Installing : erlang 3/4 Installing : rabbitmq-server 4/4 Installed: rabbitmq-server.i386 0:1.7.2-1.el5 Dependency Installed: erlang.i386 0:R12B-5.8.el5 tk.i386 0:8.4.13-5.el5_1.1 unixODBC.i386 0:2.2.11-7.1 Complete! [blyth@belle7 e]$
N rabbitmq-server is 1.7.2 (on C its 1.7.0)
[blyth@belle7 e]$ sudo yum --enablerepo=epel info rabbitmq-server
Loaded plugins: kernel-module
Installed Packages
Name : rabbitmq-server
Arch : i386
Version : 1.7.2
Release : 1.el5
Size : 1.2 M
Repo : installed
Summary : The RabbitMQ server
URL : http://www.rabbitmq.com/
License : MPLv1.1
Description: RabbitMQ is an implementation of AMQP, the emerging standard for high
: performance enterprise messaging. The RabbitMQ server is a robust and
: scalable implementation of an AMQP broker.
Node N : ejabberd 2.0.5
[blyth@belle7 e]$ sudo yum --enablerepo=epel install ejabberd Loaded plugins: kernel-module Setting up Install Process Resolving Dependencies There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them. The program yum-complete-transaction is found in the yum-utils package. --> Running transaction check ---> Package ejabberd.i386 0:2.0.5-8.el5 set to be updated --> Processing Dependency: fedora-usermgmt for package: ejabberd --> Running transaction check ---> Package fedora-usermgmt.noarch 0:0.8.91-1.el5 set to be updated --> Processing Dependency: fedora-usermgmt-core = 0.8.91-1.el5 for package: fedora-usermgmt --> Processing Dependency: instance(fedora-usermgmt) for package: fedora-usermgmt --> Processing Dependency: setup(fedora-usermgmt) for package: fedora-usermgmt --> Running transaction check ---> Package fedora-usermgmt-core.noarch 0:0.8.91-1.el5 set to be updated ---> Package fedora-usermgmt-default-fedora-setup.noarch 0:0.8.91-1.el5 set to be updated ---> Package fedora-usermgmt-shadow-utils.noarch 0:0.8.91-1.el5 set to be updated --> Finished Dependency Resolution Beginning Kernel Module Plugin Finished Kernel Module Plugin Dependencies Resolved ======================================================================================================================================================================================================== Package Arch Version Repository Size ======================================================================================================================================================================================================== Installing: ejabberd i386 2.0.5-8.el5 epel 766 k Installing for dependencies: fedora-usermgmt noarch 0.8.91-1.el5 epel 6.6 k fedora-usermgmt-core noarch 0.8.91-1.el5 epel 7.6 k fedora-usermgmt-default-fedora-setup noarch 0.8.91-1.el5 epel 6.6 k fedora-usermgmt-shadow-utils noarch 0.8.91-1.el5 epel 7.4 k Transaction Summary ======================================================================================================================================================================================================== Install 5 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 794 k Is this ok [y/N]: y Downloading Packages: (1/5): fedora-usermgmt-de 100% |=========================| 6.6 kB 00:00 (2/5): fedora-usermgmt-0. 100% |=========================| 6.6 kB 00:00 (3/5): fedora-usermgmt-sh 100% |=========================| 7.4 kB 00:00 (4/5): fedora-usermgmt-co 100% |=========================| 7.6 kB 00:00 (5/5): ejabberd-2.0.5-8.e 100% |=========================| 766 kB 00:00 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : fedora-usermgmt-default-fedora-setup 1/5 Installing : fedora-usermgmt-core 2/5 Installing : fedora-usermgmt-shadow-utils 3/5 Installing : fedora-usermgmt 4/5 Installing : ejabberd 5/5 Generating SSL certificate /etc/ejabberd/ejabberd.pem... Installed: ejabberd.i386 0:2.0.5-8.el5 Dependency Installed: fedora-usermgmt.noarch 0:0.8.91-1.el5 fedora-usermgmt-core.noarch 0:0.8.91-1.el5 fedora-usermgmt-default-fedora-setup.noarch 0:0.8.91-1.el5 fedora-usermgmt-shadow-utils.noarch 0:0.8.91-1.el5 Complete!
Node C : RabbitMQ installation
EPEL hookup
redhat- redhat-epel
sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/4/i386/epel-release-4-9.noarch.rpm Password: Retrieving http://download.fedora.redhat.com/pub/epel/4/i386/epel-release-4-9.noarch.rpm warning: /var/tmp/rpm-xfer.USbInY: V3 DSA signature: NOKEY, key ID 217521f6 Preparing... ########################################### [100%] 1:epel-release ########################################### [100%]
sudo yum install erlang
(rumenv)[blyth@cms01 ~]$ sudo yum install erlang Loading "kernel-module" plugin Loading "protectbase" plugin Loading "versionlock" plugin Loading "tsflags" plugin Loading "changelog" plugin Loading "installonlyn" plugin Setting up Install Process Setting up repositories Reading repository metadata in from local files 31 packages excluded due to repository protections Reading version lock configuration Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Downloading header for erlang to pack into transaction set. erlang-R11B-2.3.el4.i386. 100% |=========================| 533 kB 00:01 ---> Package erlang.i386 0:R11B-2.3.el4 set to be updated --> Running transaction check --> Processing Dependency: libodbc.so.1 for package: erlang --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Downloading header for unixODBC to pack into transaction set. unixODBC-2.2.11-1.RHEL4.1 100% |=========================| 25 kB 00:01 ---> Package unixODBC.i386 0:2.2.11-1.RHEL4.1 set to be updated --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: erlang i386 R11B-2.3.el4 epel 37 M Installing for dependencies: unixODBC i386 2.2.11-1.RHEL4.1 slc-base 851 k Transaction Summary ============================================================================= Install 2 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 37 M Is this ok [y/N]: y Downloading Packages: (1/2): erlang-R11B-2.3.el 100% |=========================| 37 MB 01:06 (2/2): unixODBC-2.2.11-1. 100% |=========================| 851 kB 00:05 warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 217521f6 Public key for erlang-R11B-2.3.el4.i386.rpm is not installed Retrieving GPG key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL Importing GPG key 0x217521F6 "Fedora EPEL <epel@fedoraproject.org>" Is this ok [y/N]: y Key imported successfully Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: unixODBC ######################### [1/2] Installing: erlang ######################### [2/2] Installed: erlang.i386 0:R11B-2.3.el4 Dependency Installed: unixODBC.i386 0:2.2.11-1.RHEL4.1 Complete!
(rumenv)[blyth@cms01 ~]$ sudo rpm -Uvh http://www.rabbitmq.com/releases/rabbitmq-server/v1.7.0/rabbitmq-server-1.7.0-1.i386.rpm Password: Retrieving http://www.rabbitmq.com/releases/rabbitmq-server/v1.7.0/rabbitmq-server-1.7.0-1.i386.rpm warning: /var/tmp/rpm-xfer.pZ4KXK: V3 DSA signature: NOKEY, key ID 056e8e56 Preparing... ########################################### [100%] 1:rabbitmq-server ########################################### [100%]
(rumenv)[blyth@cms01 ~]$ rpm -ql rabbitmq-server /etc/logrotate.d/rabbitmq-server /etc/rabbitmq /etc/rc.d/init.d/rabbitmq-server /usr/lib/rabbitmq /usr/lib/rabbitmq/bin /usr/lib/rabbitmq/bin/rabbitmq-activate-plugins /usr/lib/rabbitmq/bin/rabbitmq-deactivate-plugins /usr/lib/rabbitmq/bin/rabbitmq-env /usr/lib/rabbitmq/bin/rabbitmq-multi /usr/lib/rabbitmq/bin/rabbitmq-server /usr/lib/rabbitmq/bin/rabbitmqctl /usr/lib/rabbitmq/lib /usr/lib/rabbitmq/lib/rabbitmq_server-1.7.0 /usr/lib/rabbitmq/lib/rabbitmq_server-1.7.0/ebin /usr/lib/rabbitmq/lib/rabbitmq_server-1.7.0/ebin/gen_server2.beam /usr/lib/rabbitmq/lib/rabbitmq_server-1.7.0/ebin/priority_queue.beam /usr/lib/rabbitmq/lib/rabbitmq_server-1.7.0/ebin/rabbit.app /usr/lib/rabbitmq/lib/rabbitmq_server-1.7.0/ebin/rabbit.beam /usr/lib/rabbitmq/lib/rabbitmq_server-1.7.0/ebin/rabbit_access_control.beam ... /usr/lib/rabbitmq/lib/rabbitmq_server-1.7.0/sbin/rabbitmqctl /usr/sbin/rabbitmq-activate-plugins /usr/sbin/rabbitmq-deactivate-plugins /usr/sbin/rabbitmq-multi /usr/sbin/rabbitmq-server /usr/sbin/rabbitmqctl /usr/share/doc/rabbitmq-server-1.7.0 /usr/share/doc/rabbitmq-server-1.7.0/LICENSE /usr/share/doc/rabbitmq-server-1.7.0/LICENSE-MPL-RabbitMQ /usr/share/man/man1/rabbitmq-activate-plugins.1.gz /usr/share/man/man1/rabbitmq-deactivate-plugins.1.gz /usr/share/man/man1/rabbitmq-multi.1.gz /usr/share/man/man1/rabbitmq-server.1.gz /usr/share/man/man1/rabbitmqctl.1.gz /usr/share/man/man5/rabbitmq.conf.5.gz /var/lib/rabbitmq /var/log/rabbitmq
(rumenv)[blyth@cms01 ~]$ rabbitmqctl /usr/sbin/rabbitmqctl: line 43: cd: /var/lib/rabbitmq: Permission denied Usage: rabbitmqctl [-q] [-n <node>] <command> [<arg> ...] Available commands: stop - stops the RabbitMQ application and halts the node stop_app - stops the RabbitMQ application, leaving the node running start_app - starts the RabbitMQ application on an already-running node reset - resets node to default configuration, deleting all data force_reset cluster <ClusterNode> ... status rotate_logs [Suffix] add_user <UserName> <Password> delete_user <UserName> change_password <UserName> <NewPassword> list_users add_vhost <VHostPath> delete_vhost <VHostPath> list_vhosts set_permissions [-p <VHostPath>] <UserName> <Regexp> <Regexp> <Regexp> clear_permissions [-p <VHostPath>] <UserName> list_permissions [-p <VHostPath>] list_user_permissions <UserName> list_queues [-p <VHostPath>] [<QueueInfoItem> ...] list_exchanges [-p <VHostPath>] [<ExchangeInfoItem> ...] list_bindings [-p <VHostPath>] list_connections [<ConnectionInfoItem> ...] Quiet output mode is selected with the "-q" flag. Informational messages are suppressed when quiet mode is in effect. <node> should be the name of the master node of the RabbitMQ cluster. It defaults to the node named "rabbit" on the local host. On a host named "server.example.com", the master node will usually be rabbit@server (unless RABBITMQ_NODENAME has been set to some non-default value at broker startup time). The output of hostname -s is usually the correct suffix to use after the "@" sign. The list_queues, list_exchanges and list_bindings commands accept an optional virtual host parameter for which to display results. The default value is "/". <QueueInfoItem> must be a member of the list [name, durable, auto_delete, arguments, node, messages_ready, messages_unacknowledged, messages_uncommitted, messages, acks_uncommitted, consumers, transactions, memory]. The default is to display name and (number of) messages. <ExchangeInfoItem> must be a member of the list [name, type, durable, auto_delete, arguments]. The default is to display name and type. The output format for "list_bindings" is a list of rows containing exchange name, routing key, queue name and arguments, in that order. <ConnectionInfoItem> must be a member of the list [node, address, port, peer_address, peer_port, state, channels, user, vhost, timeout, frame_max, recv_oct, recv_cnt, send_oct, send_cnt, send_pend]. The default is to display user, peer_address, peer_port and state. Only root should run rabbitmqctl
Exercising the Rabbit
Erlang
- concurrency baked in
- http://www.trapexit.org/ forum
- http://www.erlang.org/faq/faq.html
- http://onlamp.com/onlamp/2007/09/13/introduction-to-erlang.html
erl
- standalone ? or talking to the node ?
- do not see the RabbitMQ server in the list of jobs ?
[blyth@cms01 ~]$ erl
Erlang (BEAM) emulator version 5.5.2 [source] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.5.2 (abort with ^G)
1>
User switch command
--> ?
c [nn] - connect to job
i [nn] - interrupt job
k [nn] - kill job
j - list all jobs
s - start local shell
r [node] - start remote shell
q - quit erlang
? | h - this message
--> j
1* {shell,start,[init]}
try onlamp example
1> c(example).
{ok,example}
2> example:fact(3).
..
7> example:fact(25).
15511210043330985984000000
running rabbitmq server
[blyth@cms01 ~]$ sudo /etc/init.d/rabbitmq-server start Starting rabbitmq-server: SUCCESS
Or equivalently :
sudo /sbin/service rabbitmq-server start
[blyth@cms01 ~]$ ps -p 3519 -f UID PID PPID C STIME TTY TIME CMD rabbitmq 3519 1 0 10:00 ? 00:00:28 /usr/lib/erlang/erts-5.5.2/bin/beam -W w -K true -A30 -- -root /usr/lib/erlang -progname erl -- -home /var/lib/rabbitmq -pa /usr/lib/rabbitmq/lib/rabbitmq_server-1.7.0/sbin/../ebin -noshell -noinput -s rab
- beam : Bogdan/Bjorn Erlang Abstract Machine
[blyth@cms01 ~]$ ps aux | grep rabbit
rabbitmq 3513 0.0 0.0 2552 244 ? S 10:00 0:00 /usr/lib/erlang/erts-5.5.2/bin/epmd -daemon
rabbitmq 3519 0.3 0.3 330244 7700 ? Ssl 10:00 0:00 /usr/lib/erlang/erts-5.5.2/bin/beam -W w -K true -A30 -- -root /usr/lib/erlang -progname erl -- -home /var/lib/rabbitmq -pa /usr/lib/rabbitmq/lib/rabbitmq_server-1.7.0/sbin/../ebin -noshell -noinput -s rabbit -sname rabbit -boot start_sasl -kernel inet_default_listen_options [{nodelay,true},{sndbuf,16384},{recbuf,4096}] -kernel inet_default_connect_options [{nodelay,true}] -rabbit tcp_listeners [{"0.0.0.0", 5672}] -sasl errlog_type error -kernel error_logger {file,"/var/log/rabbitmq/rabbit.log"} -sasl sasl_error_logger {file,"/var/log/rabbitmq/rabbit-sasl.log"} -os_mon start_cpu_sup true -os_mon start_disksup false -os_mon start_memsup false -os_mon start_os_sup false -os_mon memsup_system_only true -os_mon system_memory_high_watermark 0.95 -mnesia dir "/var/lib/rabbitmq/mnesia/rabbit" -noshell -noinput
rabbitmq 3566 0.0 0.0 1828 396 ? Ss 10:00 0:00 inet_gethost 4
rabbitmq 3567 0.0 0.0 1880 548 ? S 10:00 0:00 inet_gethost 4
blyth 3617 0.0 0.0 3704 652 pts/5 S+ 10:05 0:00 grep rabbit
The erlang beam process is the rabbitmq server :
/usr/lib/erlang/erts-5.5.2/bin/beam
-W w -K true
-A30 --
-root /usr/lib/erlang -progname erl --
-home /var/lib/rabbitmq
-pa /usr/lib/rabbitmq/lib/rabbitmq_server-1.7.0/sbin/../ebin
-noshell
-noinput
-s rabbit
-sname rabbit
-boot start_sasl
-kernel inet_default_listen_options [{nodelay,true},{sndbuf,16384},{recbuf,4096}]
-kernel inet_default_connect_options [{nodelay,true}]
-rabbit tcp_listeners [{"0.0.0.0", 5672}]
-sasl errlog_type error
-kernel error_logger {file,"/var/log/rabbitmq/rabbit.log"}
-sasl sasl_error_logger {file,"/var/log/rabbitmq/rabbit-sasl.log"}
-os_mon start_cpu_sup true
-os_mon start_disksup false
-os_mon start_memsup false
-os_mon start_os_sup false
-os_mon memsup_system_only true
-os_mon system_memory_high_watermark 0.95
-mnesia dir "/var/lib/rabbitmq/mnesia/rabbit"
-noshell -noinput
[blyth@cms01 ~]$ sudo rabbitmqctl status
Status of node rabbit@cms01 ...
[{running_applications,[{rabbit,"RabbitMQ","1.7.0"},
{mnesia,"MNESIA CXC 138 12","4.3.3"},
{os_mon,"CPO CXC 138 46","2.1.1"},
{sasl,"SASL CXC 138 11","2.1.4"},
{stdlib,"ERTS CXC 138 10","1.14.2"},
{kernel,"ERTS CXC 138 10","2.11.2"}]},
{nodes,[rabbit@cms01]},
{running_nodes,[rabbit@cms01]}]
...done.
What is additional process doing ...
- tis port mapping daemon
[blyth@cms01 ~]$ ps aux | grep erl blyth 32348 0.0 0.0 1840 416 ? S Oct16 0:00 /usr/lib/erlang/erts-5.5.2/bin/epmd -daemon
when kill it ... fail to connect
- and cannot recover for a few mins? until after other processes expire
[blyth@cms01 ~]$ sudo rabbitmqctl status
Status of node rabbit@cms01 ...
Error: unable to connect to node rabbit@cms01: nodedown
diagnostics:
- nodes and their ports on cms01: [{rabbitmqctl23430,38228}]
- current node: rabbitmqctl23430@cms01
- current node home dir: /var/lib/rabbitmq
- current node cookie hash: veo0B5ewCjhABInOBtb0pQ==
[blyth@cms01 ~]$ ps aux | grep erl blyth 32348 0.0 0.0 1840 412 ? S Oct16 0:00 /usr/lib/erlang/erts-5.5.2/bin/epmd -daemon
[blyth@cms01 ~]$ sudo /sbin/service rabbitmq-server status Password: Status of all running nodes... Error: no_nodes_running
[blyth@cms01 ~]$ sudo ls -l /var/log/rabbitmq/ total 28 -rw-r--r-- 1 rabbitmq rabbitmq 0 Oct 18 04:02 rabbit.log -rw-r--r-- 1 rabbitmq rabbitmq 724 Oct 16 21:00 rabbit.log.1 -rw-r--r-- 1 rabbitmq rabbitmq 323 Oct 18 04:02 rabbit.log.2.gz -rw-r--r-- 1 rabbitmq rabbitmq 0 Oct 16 20:35 rabbit-sasl.log -rw-r--r-- 1 rabbitmq rabbitmq 0 Oct 16 20:35 rabbit-sasl.log.1 [blyth@cms01 ~]$
administration of rabbitmq server with rabbitmqctl
[blyth@cms01 ~]$ sudo rabbitmqctl Usage: rabbitmqctl [-q] [-n <node>] <command> [<arg> ...] Available commands: stop - stops the RabbitMQ application and halts the node stop_app - stops the RabbitMQ application, leaving the node running ## does the "node" mean the epmd ? erlang port mapping daemon start_app - starts the RabbitMQ application on an already-running node reset - resets node to default configuration, deleting all data force_reset cluster <ClusterNode> ... status rotate_logs [Suffix] add_user <UserName> <Password> delete_user <UserName> change_password <UserName> <NewPassword> list_users add_vhost <VHostPath> delete_vhost <VHostPath> list_vhosts set_permissions [-p <VHostPath>] <UserName> <Regexp> <Regexp> <Regexp> clear_permissions [-p <VHostPath>] <UserName> list_permissions [-p <VHostPath>] list_user_permissions <UserName> list_queues [-p <VHostPath>] [<QueueInfoItem> ...] list_exchanges [-p <VHostPath>] [<ExchangeInfoItem> ...] list_bindings [-p <VHostPath>] list_connections [<ConnectionInfoItem> ...] Quiet output mode is selected with the "-q" flag. Informational messages are suppressed when quiet mode is in effect. <node> should be the name of the master node of the RabbitMQ cluster. It defaults to the node named "rabbit" on the local host. On a host named "server.example.com", the master node will usually be rabbit@server (unless RABBITMQ_NODENAME has been set to some non-default value at broker startup time). The output of hostname -s is usually the correct suffix to use after the "@" sign. The list_queues, list_exchanges and list_bindings commands accept an optional virtual host parameter for which to display results. The default value is "/". <QueueInfoItem> must be a member of the list [name, durable, auto_delete, arguments, node, messages_ready, messages_unacknowledged, messages_uncommitted, messages, acks_uncommitted, consumers, transactions, memory]. The default is to display name and (number of) messages. <ExchangeInfoItem> must be a member of the list [name, type, durable, auto_delete, arguments]. The default is to display name and type. The output format for "list_bindings" is a list of rows containing exchange name, routing key, queue name and arguments, in that order. <ConnectionInfoItem> must be a member of the list [node, address, port, peer_address, peer_port, state, channels, user, vhost, timeout, frame_max, recv_oct, recv_cnt, send_oct, send_cnt, send_pend]. The default is to display user, peer_address, peer_port and state.
sudo rabbitmqctl list_users
sudo rabbitmqctl list_users Listing users ... guest ...done.
sudo rabbitmqctl list_vhosts
[blyth@cms01 ~]$ sudo rabbitmqctl list_vhosts Listing vhosts ... / ...done.
sudo rabbitmqctl list_permissions
[blyth@cms01 ~]$ sudo rabbitmqctl list_permissions Listing permissions in vhost "/" ... guest .* .* .* ...done.
sudo rabbitmqctl list_user_permissions guest
[blyth@cms01 ~]$ sudo rabbitmqctl list_user_permissions guest Listing permissions for user "guest" ... / .* .* .* ...done.
sudo rabbitmqctl list_queues
[blyth@cms01 ~]$ sudo rabbitmqctl list_queues Listing queues ... ...done.
sudo rabbitmqctl list_exchanges
blyth@cms01 ~]$ sudo rabbitmqctl list_exchanges
Listing exchanges ...
amq.rabbitmq.log topic
amq.match headers
amq.headers headers
amq.topic topic
amq.direct direct
amq.fanout fanout
direct
...done.
Implicit VHostPath of /
[blyth@cms01 ~]$ sudo rabbitmqctl list_exchanges -p "/"
Listing exchanges ...
amq.rabbitmq.log topic
amq.match headers
amq.headers headers
amq.topic topic
amq.direct direct
amq.fanout fanout
direct
...done.
sudo rabbitmqctl list_bindings
[blyth@cms01 ~]$ sudo rabbitmqctl list_bindings Listing bindings ... ...done.
sudo rabbitmqctl list_connections
[blyth@cms01 ~]$ sudo rabbitmqctl list_connections Listing connections ... ...done.
can explicitly give a virtual host parameter ... contrary to help message does not work for list_exchanges
[blyth@cms01 ~]$ sudo rabbitmqctl list_queues "/"
Listing queues ...
...done.
[blyth@cms01 ~]$ sudo rabbitmqctl list_bindings "/"
Listing bindings ...
...done.
[blyth@cms01 ~]$ sudo rabbitmqctl list_exchanges "/"
Listing exchanges ...
Error: {bad_argument,'/'}
permissons elucidates the the model
Resources, i.e. exchanges and queues, are named entities inside a particular virtual host; the same name denotes a different resource in each virtual host.
RabbitMQ distinguishes between configure, write and read operations on a resource. The configure operations create or destroy resources, or alter their behaviour. The write operations inject messages into a resource. And the read operations retrieve messages from a resource.
| AMQP command | configure | write | read |
| exchange.declaree | exchange | ||
| exchange.delete | exchange | ||
| queue.declare | queue | ||
| queue.delete | queue | ||
| queue.bind | queue | exchange | |
| basic.publish | exchange | ||
| basic.get | queue | ||
| basic.consume | queue | ||
| queue.purge | queue |
Permissions are expressed as a triple of regular expressions - one each for configure, write and read - on per-vhost basis. The user is granted the respective permission for operations on all resources with names matching the regular expressions. (Note: For convenience RabbitMQ maps AMQP's default exchange's blank name to 'amq.default' when performing permission checks.)
Some AMQP operations can create resources with server-generated names. Every user has configure, write and read permissions for such resources. However, the names are strong and not discoverable as part of the protocol, only through management functionality. Therefore these resources are in effect private to the user unless they choose to dilvuge their names to other users.
RabbitMQ may cache the results of access control checks on a per-connection or per-channel basis. Hence changes to user permissions may only take effect when the user reconnects.
AMQP model
AMQP Spec 0_8
- http://jira.amqp.org/confluence/download/attachments/720900/amqp0-8.pdf?version=1
- https://jira.amqp.org/jira/secure/BrowseProject.jspa
- not symmetrical : clients produce and consume messages, while servers queue and route messages
vhosts contain :
vhosts contain queues, exchanges messages have a routing key queues contain messages until a consumer siphons them off : created programatically by consumers (not by config) exchanges contain bindings (routers with routing tables : routes/bindings) : created by consumers in order to send message bindings link the exchange to a queue based on routing key, multiple bindings per exchange are allowed
exchanges come in various types ... handling matching to routing keys differently :
direct exact match topic pattern match eg audit.* (single word match) audit.# (multiple word match ) fanout no match ... simply bind the queue to exchange
py-amqplib : python client for : Advanced Message Queuing Procotol (AMQP)
- http://pypi.python.org/pypi?:action=display&name=amqplib
- http://code.google.com/p/py-amqplib/
- http://barryp.org/software/py-amqplib/
Carrot : Higher level AMQP .. with django integration
pip install amqplib
[blyth@cms01 ~]$ pip install amqplib
Downloading/unpacking amqplib
Downloading amqplib-0.6.1.tgz (53Kb): 53Kb downloaded
Running setup.py egg_info for package amqplib
Installing collected packages: amqplib
Running setup.py install for amqplib
Successfully installed amqplib
[blyth@cms01 ~]$ python -c "import amqplib"
Set up private vals for connection config, following carrot django config naming ..
try out rabbits and warrens example
local messaging works ... remote (from ) doesnt
- after iptables opening
- http://old.nabble.com/Subscribe-to-remote-rabbitmq-queue-td25360216.html
[blyth@cms01 e]$ netstat -an | grep 5672
tcp 0 0 0.0.0.0:5672 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5672 127.0.0.1:39187 ESTABLISHED
tcp 0 0 127.0.0.1:39187 127.0.0.1:5672 ESTABLISHED
trying from Belle control room, over wireless : always get Operation timed out : probably KEK firewall
MA53-52:rabbits_and_warrens blyth$ python amqp_publisher.py kek2
{'host': '..edu.tw:5672', .... , 'virtual_host': '/', 'insist': False}
Traceback (most recent call last):
File "amqp_publisher.py", line 5, in <module>
v = AMQPConnection.vhost()
File "/Users/blyth/env/messaging/rabbits_and_warrens/amqp_connection.py", line 8, in vhost
v = cls( host="%s:%s" % ( p('AMQP_SERVER'), p('AMQP_PORT') ) , userid=p('AMQP_USER'), password=p('AMQP_PASSWORD'), virtual_host=p('AMQP_VHOST'), insist=False )
File "/Users/blyth/env/messaging/rabbits_and_warrens/amqp_connection.py", line 14, in __init__
conn = amqp.Connection( **kwa )
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/amqplib/client_0_8/connection.py", line 125, in __init__
self.transport = create_transport(host, connect_timeout, ssl)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/amqplib/client_0_8/transport.py", line 220, in create_transport
return TCPTransport(host, connect_timeout)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/amqplib/client_0_8/transport.py", line 58, in __init__
self.sock.connect((host, port))
File "<string>", line 1, in connect
socket.error: (60, 'Operation timed out')
trying from NUU : sometimes get No route to host suspect general issue of dodgy network with N
Before opening the port for N, get immediate No route to host :
[blyth@belle7 rabbits_and_warrens]$ python amqp_publisher.py nuu
...
socket.error: (113, 'No route to host')
After opening the port the send appears successful ... but do not receive the message
- following a restart of the consumer on C ... can send from N, but not reliably :
[blyth@belle7 rabbits_and_warrens]$ python amqp_publisher.py nuu2
{'host': 'cms01.phys.ntu.edu.tw:5672', ... 'virtual_host': '/', 'insist': False}
Traceback (most recent call last):
File "amqp_publisher.py", line 5, in ?
v = AMQPConnection.vhost()
File "/data1/env/local/env/home/messaging/rabbits_and_warrens/amqp_connection.py", line 8, in vhost
v = cls( host="%s:%s" % ( p('AMQP_SERVER'), p('AMQP_PORT') ) , userid=p('AMQP_USER'), password=p('AMQP_PASSWORD'), virtual_host=p('AMQP_VHOST'), insist=False )
File "/data1/env/local/env/home/messaging/rabbits_and_warrens/amqp_connection.py", line 14, in __init__
conn = amqp.Connection( **kwa )
File "/usr/lib/python2.4/site-packages/amqplib/client_0_8/connection.py", line 125, in __init__
self.transport = create_transport(host, connect_timeout, ssl)
File "/usr/lib/python2.4/site-packages/amqplib/client_0_8/transport.py", line 220, in create_transport
return TCPTransport(host, connect_timeout)
File "/usr/lib/python2.4/site-packages/amqplib/client_0_8/transport.py", line 58, in __init__
self.sock.connect((host, port))
File "<string>", line 1, in connect
socket.error: (113, 'No route to host')
[blyth@belle7 rabbits_and_warrens]$
[blyth@belle7 rabbits_and_warrens]$
[blyth@belle7 rabbits_and_warrens]$ python amqp_publisher.py nuu2
[blyth@belle7 rabbits_and_warrens]$
- maybe the timeout is set too low ? setting it to 5s doesnt improve things
- also using IPs rather than names doesnt not solve the issue
- google:"intermittent 'No route to host'"
- never fails from grid1 P, local NTU node
amqplib Multi-node experimentation
Run consumers on C and P, starting them with :
rabbitmq-ex-consumer
Publishing messages from C and P
rabbitmq-ex-publisher `hostname`
- get consumed alternately by each consumer
Publishing from a 3rd node C2, messages again get consumed alternately between the consumers on C and P, See same round-robin behaviour from N ... but modulo frequent (maybe 50% of attempts ) failures :
socket.error: (113, 'No route to host')
sudo rabbitmqctl -q list_connections
[blyth@cms01 rabbits_and_warrens]$ sudo rabbitmqctl -q list_connections
Password:
guest 127.0.0.1 39612 running
guest 140.112.102.250 57086 running
sudo rabbitmqctl -q list_exchanges
[blyth@cms01 rabbits_and_warrens]$ sudo rabbitmqctl -q list_exchanges
amq.rabbitmq.log topic
amq.match headers
amq.headers headers
sorting_room direct
amq.topic topic
amq.direct direct
amq.fanout fanout
direct
Carrot : a layer on top of amqplib
- http://ask.github.com/carrot/introduction.html
- provides conveniences for sending binary data + ...
sudo pip -v install carrot
MA53-52:rabbits_and_warrens blyth$ sudo pip -v install carrot
Downloading/unpacking carrot
Using version 0.6.0 (newest of versions: 0.6.0, 0.5.1, 0.5.0, 0.4.5, 0.4.4, 0.4.3, 0.4.2, 0.4.1, 0.4.0, 0.3.9, 0.3.8, 0.3.6, 0.3.3, 0.3.2, 0.3.1, 0.3.0, 0.2.1, 0.2.0)
Downloading carrot-0.6.0.tar.gz (59Kb): 59Kb downloaded
Running setup.py egg_info for package carrot
running egg_info
creating pip-egg-info/carrot.egg-info
writing requirements to pip-egg-info/carrot.egg-info/requires.txt
writing pip-egg-info/carrot.egg-info/PKG-INFO
writing top-level names to pip-egg-info/carrot.egg-info/top_level.txt
writing dependency_links to pip-egg-info/carrot.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/carrot.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info/carrot.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pip-egg-info/carrot.egg-info/SOURCES.txt'
Downloading/unpacking anyjson (from carrot)
Using version 0.2.2 (newest of versions: 0.2.2, 0.2.1, 0.2.0, 0.1)
Downloading anyjson-0.2.2.tar.gz
Running setup.py egg_info for package anyjson
running egg_info
creating pip-egg-info/anyjson.egg-info
writing pip-egg-info/anyjson.egg-info/PKG-INFO
writing top-level names to pip-egg-info/anyjson.egg-info/top_level.txt
writing dependency_links to pip-egg-info/anyjson.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/anyjson.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info/anyjson.egg-info/SOURCES.txt'
writing manifest file 'pip-egg-info/anyjson.egg-info/SOURCES.txt'
Requirement already satisfied (use --upgrade to upgrade): amqplib in /opt/local/lib/python2.5/site-packages (from carrot)
Installing collected packages: anyjson, carrot
Running setup.py install for anyjson
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/anyjson
copying anyjson/__init__.py -> build/lib/anyjson
running install_lib
creating /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/anyjson
copying build/lib/anyjson/__init__.py -> /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/anyjson
byte-compiling /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/anyjson/__init__.py to __init__.pyc
running install_egg_info
running egg_info
writing anyjson.egg-info/PKG-INFO
writing top-level names to anyjson.egg-info/top_level.txt
writing dependency_links to anyjson.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'anyjson.egg-info/SOURCES.txt'
writing manifest file 'anyjson.egg-info/SOURCES.txt'
Copying anyjson.egg-info to /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/anyjson-0.2.2-py2.5.egg-info
running install_scripts
writing list of installed files to '/tmp/pip-Ux-r5E-record/install-record.txt'
Removing source in /Users/blyth/env/messaging/rabbits_and_warrens/build/anyjson
Running setup.py install for carrot
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/carrot
copying carrot/__init__.py -> build/lib/carrot
copying carrot/connection.py -> build/lib/carrot
copying carrot/messaging.py -> build/lib/carrot
copying carrot/serialization.py -> build/lib/carrot
creating build/lib/carrot/backends
copying carrot/backends/__init__.py -> build/lib/carrot/backends
copying carrot/backends/base.py -> build/lib/carrot/backends
copying carrot/backends/pyamqplib.py -> build/lib/carrot/backends
copying carrot/backends/pystomp.py -> build/lib/carrot/backends
copying carrot/backends/queue.py -> build/lib/carrot/backends
running install_lib
creating /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot
copying build/lib/carrot/__init__.py -> /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot
creating /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot/backends
copying build/lib/carrot/backends/__init__.py -> /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot/backends
copying build/lib/carrot/backends/base.py -> /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot/backends
copying build/lib/carrot/backends/pyamqplib.py -> /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot/backends
copying build/lib/carrot/backends/pystomp.py -> /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot/backends
copying build/lib/carrot/backends/queue.py -> /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot/backends
copying build/lib/carrot/connection.py -> /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot
copying build/lib/carrot/messaging.py -> /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot
copying build/lib/carrot/serialization.py -> /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot
byte-compiling /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot/__init__.py to __init__.pyc
byte-compiling /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot/backends/__init__.py to __init__.pyc
byte-compiling /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot/backends/base.py to base.pyc
byte-compiling /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot/backends/pyamqplib.py to pyamqplib.pyc
byte-compiling /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot/backends/pystomp.py to pystomp.pyc
byte-compiling /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot/backends/queue.py to queue.pyc
byte-compiling /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot/connection.py to connection.pyc
byte-compiling /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot/messaging.py to messaging.pyc
byte-compiling /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot/serialization.py to serialization.pyc
running install_egg_info
running egg_info
writing requirements to carrot.egg-info/requires.txt
writing carrot.egg-info/PKG-INFO
writing top-level names to carrot.egg-info/top_level.txt
writing dependency_links to carrot.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'carrot.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'carrot.egg-info/SOURCES.txt'
Copying carrot.egg-info to /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/carrot-0.6.0-py2.5.egg-info
running install_scripts
writing list of installed files to '/tmp/pip-GfvOPd-record/install-record.txt'
Removing source in /Users/blyth/env/messaging/rabbits_and_warrens/build/carrot
Successfully installed anyjson carrot
tryout carrot
[blyth@cms01 carrot]$ python carrot_consumer_binary.py
enter binary consumer loop ... {'password': 'guest', 'hostname': 'localhost', 'userid': 'guest', 'port': '5672', 'virtual_host': '/'}
import_picture_callback <carrot.backends.pyamqplib.Message object at 0xb7be252c>
< carrot.backends.pyamqplib.Message object at 0xb7be252c ; binary image/jpeg {'exchange': u'feed', 'consumer_tag': u'carrot.messaging.Consumer-b56a5282-90c3-43a2-81d5-c57b2ec229c3', 'routing_key': u'import_pictures', 'redelivered': False, 'delivery_tag': 1, 'channel': <amqplib.client_0_8.channel.Channel object at 0xb7bd87cc>} 1 >
34478 34478 34478
[blyth@cms01 carrot]$ python carrot_binary.py /home/blyth/aberdeen/roody/html/roody-plot.jpg
publish_binary sending /home/blyth/aberdeen/roody/html/roody-plot.jpg
- observe systematic behaviour :the send succeeds on even attempts, but fails on odd ones ?
Celery : Distributed Task Management : uses carrot
- http://www.slideshare.net/idangazit/an-introduction-to-celery
- http://groups.google.com/group/celery-users/
C installation : pip install celery
[blyth@cms01 ~]$ pip install celery
Downloading/unpacking celery
Downloading celery-0.8.0.tar.gz (489Kb): 489Kb downloaded
Running setup.py egg_info for package celery
/data/env/system/python/Python-2.5.1/lib/python2.5/distutils/dist.py:263: UserWarning: Unknown distribution option: 'extra_requires'
warnings.warn(msg)
no previously-included directories found matching 'testproj/*.pyc'
no previously-included directories found matching 'docs/*.pyc'
no previously-included directories found matching 'contrib/*.pyc'
no previously-included directories found matching 'celery/*.pyc'
no previously-included directories found matching 'bin/*.pyc'
no previously-included directories found matching 'docs/.build'
Downloading/unpacking django-unittest-depth (from celery)
Downloading django-unittest-depth-0.6.tar.gz
Running setup.py egg_info for package django-unittest-depth
Downloading/unpacking anyjson (from celery)
Downloading anyjson-0.2.2.tar.gz
Running setup.py egg_info for package anyjson
Downloading/unpacking carrot>=0.6.0 (from celery)
Downloading carrot-0.6.0.tar.gz (59Kb): 59Kb downloaded
Running setup.py egg_info for package carrot
Downloading/unpacking python-daemon>=1.4.8 (from celery)
Downloading python-daemon-1.5.2.tar.gz (40Kb): 40Kb downloaded
Running setup.py egg_info for package python-daemon
warning: no files found matching 'TODO'
Downloading/unpacking multiprocessing (from celery)
Downloading multiprocessing-2.6.2.1.tar.gz (108Kb): 108Kb downloaded
Running setup.py egg_info for package multiprocessing
Requirement already satisfied (use --upgrade to upgrade): amqplib in /data/env/system/python/Python-2.5.1/lib/python2.5/site-packages (from carrot>=0.6.0->celery)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /data/env/system/python/Python-2.5.1/lib/python2.5/site-packages/setuptools-0.6c11-py2.5.egg (from python-daemon>=1.4.8->celery)
Downloading/unpacking lockfile>=0.7 (from python-daemon>=1.4.8->celery)
Downloading lockfile-0.8.tar.gz
Running setup.py egg_info for package lockfile
Installing collected packages: anyjson, carrot, celery, django-unittest-depth, lockfile, multiprocessing, python-daemon
Running setup.py install for anyjson
Running setup.py install for carrot
Running setup.py install for celery
/data/env/system/python/Python-2.5.1/lib/python2.5/distutils/dist.py:263: UserWarning: Unknown distribution option: 'extra_requires'
warnings.warn(msg)
changing mode of build/scripts-2.5/celeryd from 664 to 775
changing mode of build/scripts-2.5/celeryinit from 664 to 775
no previously-included directories found matching 'testproj/*.pyc'
no previously-included directories found matching 'docs/*.pyc'
no previously-included directories found matching 'contrib/*.pyc'
no previously-included directories found matching 'celery/*.pyc'
no previously-included directories found matching 'bin/*.pyc'
no previously-included directories found matching 'docs/.build'
changing mode of /data/env/system/python/Python-2.5.1/bin/celeryd to 775
changing mode of /data/env/system/python/Python-2.5.1/bin/celeryinit to 775
Running setup.py install for django-unittest-depth
Running setup.py install for lockfile
Running setup.py install for multiprocessing
building 'multiprocessing._multiprocessing' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I/data/env/system/python/Python-2.5.1/include/python2.5 -c Modules/_multiprocessing/multiprocessing.c -o build/temp.linux-i686-2.5/Modules/_multiprocessing/multiprocessing.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I/data/env/system/python/Python-2.5.1/include/python2.5 -c Modules/_multiprocessing/socket_connection.c -o build/temp.linux-i686-2.5/Modules/_multiprocessing/socket_connection.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I/data/env/system/python/Python-2.5.1/include/python2.5 -c Modules/_multiprocessing/semaphore.c -o build/temp.linux-i686-2.5/Modules/_multiprocessing/semaphore.o
gcc -pthread -shared build/temp.linux-i686-2.5/Modules/_multiprocessing/multiprocessing.o build/temp.linux-i686-2.5/Modules/_multiprocessing/socket_connection.o build/temp.linux-i686-2.5/Modules/_multiprocessing/semaphore.o -L/data/env/system/python/Python-2.5.1/lib -lrt -lpython2.5 -o build/lib.linux-i686-2.5/multiprocessing/_multiprocessing.so
Running setup.py install for python-daemon
warning: no files found matching 'TODO'
Successfully installed anyjson carrot celery django-unittest-depth lockfile multiprocessing python-daemon
rabbitmq-c
rabbitmq-c build on G
autoreconf -i
MA53-52:rabbitmq-c blyth$ autoreconf -i glibtoolize: putting auxiliary files in `.'. glibtoolize: copying file `./ltmain.sh' glibtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and glibtoolize: rerunning glibtoolize, to keep the correct libtool macros in-tree. glibtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. configure.ac:11: installing `./config.guess' configure.ac:11: installing `./config.sub' configure.ac:3: installing `./install-sh' configure.ac:3: installing `./missing' examples/Makefile.am: installing `./depcomp'
./configure ... fails for lack of codegen/amqp-0.8.json
MA53-52:rabbitmq-c blyth$ ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... ./install-sh -c -d ... checking for ANSI C header files... (cached) yes checking location of AMQP codegen directory... configure: error: could not find AMQP spec file at "'/usr/local/env/messaging/rabbitmq-c/codegen/amqp-0.8.json'"
grab the amqp-0.8.json from mercurial : allows configure to succeed
mkdir codegen cd codegen curl -O http://hg.rabbitmq.com/rabbitmq-codegen/raw-file/a62e87645861/amqp-0.8.json
This is insufficient ... the make fails while doing :
PYTHONPATH=/usr/local/env/messaging/rabbitmq-c/codegen python2.5 ./codegen.py header /usr/local/env/messaging/rabbitmq-c/codegen/amqp-0.8.json amqp_framing.h
Traceback (most recent call last):
File "./codegen.py", line 34, in <module>
from amqp_codegen import *
ImportError: No module named amqp_codegen
make[2]: *** [amqp_framing.h] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
==== clone rabbitmq-codegen into rabbitmq-c/codegen
MA53-52:rabbitmq-c blyth$ hg clone http://hg.rabbitmq.com/rabbitmq-codegen codegen
now fails for lack of simplejson
MA53-52:rabbitmq-c blyth$ which pip
/opt/local/Library/Frameworks/Python.framework/Versions/2.5/bin/pip
MA53-52:rabbitmq-c blyth$ sudo pip install simplejson
Password:
Downloading/unpacking simplejson
Downloading simplejson-2.0.9.tar.gz (115Kb): 115Kb downloaded
Running setup.py egg_info for package simplejson
Installing collected packages: simplejson
Running setup.py install for simplejson
building 'simplejson._speedups' extension
/usr/bin/gcc-4.0 -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c simplejson/_speedups.c -o build/temp.macosx-10.5-ppc-2.5/simplejson/_speedups.o
/usr/bin/gcc-4.0 -L/opt/local/lib -bundle -undefined dynamic_lookup build/temp.macosx-10.5-ppc-2.5/simplejson/_speedups.o -o build/lib.macosx-10.5-ppc-2.5/simplejson/_speedups.so
Successfully installed simplejson
now make succeeds
MA53-52:rabbitmq-c blyth$ make make all-recursive Making all in librabbitmq PYTHONPATH=/usr/local/env/messaging/rabbitmq-c/codegen python2.5 ./codegen.py header /usr/local/env/messaging/rabbitmq-c/codegen/amqp-0.8.json amqp_framing.h PYTHONPATH=/usr/local/env/messaging/rabbitmq-c/codegen python2.5 ./codegen.py body /usr/local/env/messaging/rabbitmq-c/codegen/amqp-0.8.json amqp_framing.c make all-am /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT amqp_mem.lo -MD -MP -MF .deps/amqp_mem.Tpo -c -o amqp_mem.lo amqp_mem.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT amqp_mem.lo -MD -MP -MF .deps/amqp_mem.Tpo -c amqp_mem.c -fno-common -DPIC -o .libs/amqp_mem.o ... /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT amqp_api.lo -MD -MP -MF .deps/amqp_api.Tpo -c -o amqp_api.lo amqp_api.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT amqp_api.lo -MD -MP -MF .deps/amqp_api.Tpo -c amqp_api.c -fno-common -DPIC -o .libs/amqp_api.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT amqp_api.lo -MD -MP -MF .deps/amqp_api.Tpo -c amqp_api.c -o amqp_api.o >/dev/null 2>&1 mv -f .deps/amqp_api.Tpo .deps/amqp_api.Plo /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT amqp_framing.lo -MD -MP -MF .deps/amqp_framing.Tpo -c -o amqp_framing.lo amqp_framing.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT amqp_framing.lo -MD -MP -MF .deps/amqp_framing.Tpo -c amqp_framing.c -fno-common -DPIC -o .libs/amqp_framing.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT amqp_framing.lo -MD -MP -MF .deps/amqp_framing.Tpo -c amqp_framing.c -o amqp_framing.o >/dev/null 2>&1 mv -f .deps/amqp_framing.Tpo .deps/amqp_framing.Plo /bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -Wall -o librabbitmq.la -rpath /usr/local/lib amqp_mem.lo amqp_table.lo amqp_connection.lo amqp_socket.lo amqp_debug.lo amqp_api.lo amqp_framing.lo libtool: link: gcc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/librabbitmq.0.dylib .libs/amqp_mem.o .libs/amqp_table.o .libs/amqp_connection.o .libs/amqp_socket.o .libs/amqp_debug.o .libs/amqp_api.o .libs/amqp_framing.o -install_name /usr/local/lib/librabbitmq.0.dylib -compatibility_version 1 -current_version 1.0 -Wl,-single_module libtool: link: dsymutil .libs/librabbitmq.0.dylib || : libtool: link: (cd ".libs" && rm -f "librabbitmq.dylib" && ln -s "librabbitmq.0.dylib" "librabbitmq.dylib") libtool: link: ar cru .libs/librabbitmq.a amqp_mem.o amqp_table.o amqp_connection.o amqp_socket.o amqp_debug.o amqp_api.o amqp_framing.o libtool: link: ranlib .libs/librabbitmq.a libtool: link: ( cd ".libs" && rm -f "librabbitmq.la" && ln -s "../librabbitmq.la" "librabbitmq.la" ) Making all in tests gcc -DHAVE_CONFIG_H -I. -I.. -I../librabbitmq -g -O2 -Wall -MT test_tables.o -MD -MP -MF .deps/test_tables.Tpo -c -o test_tables.o test_tables.c mv -f .deps/test_tables.Tpo .deps/test_tables.Po /bin/sh ../libtool --tag=CC --mode=link gcc -I../librabbitmq -g -O2 -Wall ../librabbitmq/librabbitmq.la -o test_tables test_tables.o libtool: link: gcc -I../librabbitmq -g -O2 -Wall -o .libs/test_tables test_tables.o ../librabbitmq/.libs/librabbitmq.dylib Making all in examples gcc -DHAVE_CONFIG_H -I. -I.. -I../librabbitmq -g -O2 -Wall -MT amqp_sendstring.o -MD -MP -MF .deps/amqp_sendstring.Tpo -c -o amqp_sendstring.o amqp_sendstring.c mv -f .deps/amqp_sendstring.Tpo .deps/amqp_sendstring.Po gcc -DHAVE_CONFIG_H -I. -I.. -I../librabbitmq -g -O2 -Wall -MT example_utils.o -MD -MP -MF .deps/example_utils.Tpo -c -o example_utils.o example_utils.c mv -f .deps/example_utils.Tpo .deps/example_utils.Po ... mv -f .deps/amqp_bind.Tpo .deps/amqp_bind.Po /bin/sh ../libtool --tag=CC --mode=link gcc -I../librabbitmq -g -O2 -Wall ../librabbitmq/librabbitmq.la -o amqp_bind amqp_bind.o example_utils.o libtool: link: gcc -I../librabbitmq -g -O2 -Wall -o .libs/amqp_bind amqp_bind.o example_utils.o ../librabbitmq/.libs/librabbitmq.dylib gcc -DHAVE_CONFIG_H -I. -I.. -I../librabbitmq -g -O2 -Wall -MT amqp_listenq.o -MD -MP -MF .deps/amqp_listenq.Tpo -c -o amqp_listenq.o amqp_listenq.c mv -f .deps/amqp_listenq.Tpo .deps/amqp_listenq.Po /bin/sh ../libtool --tag=CC --mode=link gcc -I../librabbitmq -g -O2 -Wall ../librabbitmq/librabbitmq.la -o amqp_listenq amqp_listenq.o example_utils.o libtool: link: gcc -I../librabbitmq -g -O2 -Wall -o .libs/amqp_listenq amqp_listenq.o example_utils.o ../librabbitmq/.libs/librabbitmq.dylib MA53-52:rabbitmq-c blyth$
rabbitmq-c build on C
rabbitmq-c-build
configure step fails ...
checking location of AMQP codegen directory... configure: error: could not find AMQP spec file at "'/codegen/amqp-0.8.json'"
- how to tell configure where to look for the codegen dir ?
./configure AMQP_CODEGEN_DIR=../rabbitmq-codegen
rabbitmq-c build on G : do again with sibling rabbitmq-codegen for simplicity, following configure.ac hint
Succeeds to
rabbitmq-c-build
checking location of AMQP codegen directory... /usr/local/env/messaging/rabbitmq-c/../rabbitmq-codegen
back to C
It appears that ac_abs_confdir is PWD on G, allowing it to work ... but is blank on C ?
From configure.ac :
AC_MSG_CHECKING(location of AMQP codegen directory)
sibling_codegen_dir="$ac_abs_confdir/../rabbitmq-codegen"
AMQP_CODEGEN_DIR=$(test -d "$sibling_codegen_dir" && echo "$sibling_codegen_dir" || echo "$ac_abs_confdir/codegen")
AMQP_SPEC_JSON_PATH="$AMQP_CODEGEN_DIR/amqp-0.8.json"
if test -f "$AMQP_SPEC_JSON_PATH"
then
AC_MSG_RESULT($AMQP_CODEGEN_DIR)
else
AC_MSG_ERROR(could not find AMQP spec file at "'$AMQP_SPEC_JSON_PATH'")
fi
[blyth@cms01 rabbitmq-c]$ which autoreconf /usr/bin/autoreconf [blyth@cms01 rabbitmq-c]$ autoreconf -i configure.ac: installing `./install-sh' configure.ac: installing `./missing' examples/Makefile.am: installing `./depcomp'
cf on G, autoreconf -i does much more :
MA53-52:rabbitmq-c blyth$ autoreconf -i
glibtoolize: putting auxiliary files in `.'.
glibtoolize: copying file `./ltmain.sh'
glibtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
glibtoolize: rerunning glibtoolize, to keep the correct libtool macros in-tree.
glibtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:11: installing `./config.guess'
configure.ac:11: installing `./config.sub'
configure.ac:3: installing `./install-sh'
configure.ac:3: installing `./missing'
examples/Makefile.am: installing `./depcomp'
A manual fix to configure.ac and autoconf run
sibling_codegen_dir="$ac_abs_confdir/../rabbitmq-codegen" ## ac_abs_confdir draws a blank on C is PWD on G sibling_codegen_dir="../rabbitmq-codegen" ## nope this needs to be absolute sibling_codegen_dir="/data/env/local/env/messaging/rabbitmq-codegen"
succeeds to get the configure and make to complete
test message sending from C
- see wiki:RabbitMQC
[blyth@cms01 examples]$ rabbitmq-c-sendstring === rabbitmq-c-sendstring : /data/env/local/env/messaging/rabbitmq-c/examples/amqp_sendstring localhost 5672 sendstring sendstring "cms01.phys.ntu.edu.tw Wed Nov 4 17:48:20 CST 2009" Closing channel: server channel error 404, message: NOT_FOUND - no exchange 'sendstring' in vhost '/'[blyth@cms01 examples]$
- get sendstring to succeed after creating a consumer ... with carrot-consumer
rabbitmq-server on OSX ?
macports developsments (Jan 2010)
Hopefully avoids loadsa unneeded dependencies
sudo port install rabbitmq-server : aborted install as taking too long
- why so many dependencies ... wxWidgets ?
simon:~ blyth$ sudo port install rabbitmq-server Password: ---> Fetching tcl ---> Attempting to fetch tcl8.5.6-src.tar.gz from http://nchc.dl.sourceforge.net/tcl ---> Verifying checksum(s) for tcl ---> Extracting tcl ---> Configuring tcl ---> Building tcl ---> Staging tcl into destroot ---> Installing tcl @8.5.6_0 ---> Activating tcl @8.5.6_0 ---> Cleaning tcl ---> Fetching xorg-scrnsaverproto ---> Attempting to fetch scrnsaverproto-1.1.0.tar.bz2 from http://distfiles.macports.org/xorg-scrnsaverproto ---> Verifying checksum(s) for xorg-scrnsaverproto ---> Extracting xorg-scrnsaverproto ---> Configuring xorg-scrnsaverproto ---> Building xorg-scrnsaverproto ---> Staging xorg-scrnsaverproto into destroot ---> Installing xorg-scrnsaverproto @1.1.0_0 ---> Activating xorg-scrnsaverproto @1.1.0_0 ---> Cleaning xorg-scrnsaverproto ---> Fetching xorg-libXScrnSaver ---> Attempting to fetch libXScrnSaver-1.1.3.tar.bz2 from http://distfiles.macports.org/xorg-libXScrnSaver ---> Verifying checksum(s) for xorg-libXScrnSaver ---> Extracting xorg-libXScrnSaver ---> Configuring xorg-libXScrnSaver ---> Building xorg-libXScrnSaver ---> Staging xorg-libXScrnSaver into destroot ---> Installing xorg-libXScrnSaver @1.1.3_0 ---> Activating xorg-libXScrnSaver @1.1.3_0 ---> Cleaning xorg-libXScrnSaver ---> Fetching tk ---> Attempting to fetch tk8.5.6-src.tar.gz from http://distfiles.macports.org/tcltk ---> Verifying checksum(s) for tk ---> Extracting tk ---> Configuring tk ---> Building tk ---> Staging tk into destroot ---> Installing tk @8.5.6_1 ---> Activating tk @8.5.6_1 ---> Cleaning tk ---> Fetching xorg-randrproto ---> Attempting to fetch randrproto-1.3.0.tar.bz2 from http://distfiles.macports.org/xorg-randrproto ---> Verifying checksum(s) for xorg-randrproto ---> Extracting xorg-randrproto ---> Configuring xorg-randrproto ---> Building xorg-randrproto ---> Staging xorg-randrproto into destroot ---> Installing xorg-randrproto @1.3.0_0 ---> Activating xorg-randrproto @1.3.0_0 ---> Cleaning xorg-randrproto ---> Fetching xorg-libXrandr ---> Attempting to fetch libXrandr-1.3.0.tar.bz2 from http://distfiles.macports.org/xorg-libXrandr ---> Verifying checksum(s) for xorg-libXrandr ---> Extracting xorg-libXrandr ---> Configuring xorg-libXrandr ---> Building xorg-libXrandr ---> Staging xorg-libXrandr into destroot ---> Installing xorg-libXrandr @1.3.0_0 ---> Activating xorg-libXrandr @1.3.0_0 ---> Cleaning xorg-libXrandr ---> Fetching libsdl ---> Verifying checksum(s) for libsdl ---> Extracting libsdl ---> Applying patches to libsdl ---> Configuring libsdl ---> Building libsdl ---> Staging libsdl into destroot ---> Installing libsdl @1.2.13_6 ---> Activating libsdl @1.2.13_6 ---> Cleaning libsdl ---> Fetching smpeg ---> Attempting to fetch smpeg-0.4.4.tar.gz from ftp://ftp.tw.FreeBSD.org/pub/FreeBSD/ports/distfiles/ ---> Attempting to fetch ltconfig13 from http://distfiles.macports.org/smpeg ---> Attempting to fetch ltmain13 from http://distfiles.macports.org/smpeg ---> Verifying checksum(s) for smpeg ---> Extracting smpeg ---> Applying patches to smpeg ---> Configuring smpeg ---> Building smpeg ---> Staging smpeg into destroot ---> Installing smpeg @0.4.4_8 ---> Activating smpeg @0.4.4_8 ---> Cleaning smpeg ---> Fetching libsdl_mixer ---> Verifying checksum(s) for libsdl_mixer ---> Extracting libsdl_mixer ---> Configuring libsdl_mixer ---> Building libsdl_mixer ---> Staging libsdl_mixer into destroot ---> Installing libsdl_mixer @1.2.8_1 ---> Activating libsdl_mixer @1.2.8_1 ---> Cleaning libsdl_mixer ---> Fetching wxWidgets ---> Attempting to fetch wxWidgets-2.8.10.tar.bz2 from http://nchc.dl.sourceforge.net/wxwindows ---> Verifying checksum(s) for wxWidgets ---> Extracting wxWidgets ---> Applying patches to wxWidgets ---> Configuring wxWidgets ---> Building wxWidgets ^C simon:~ blyth$ simon:~ blyth$
