summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/Connection.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update from trunk r1375509 through r1450773asyncstoreKim van der Riet2013-02-281-66/+12
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1451244 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3858: Updated code to include recent refactoring by Gordon (gsim) - see ↵Kim van der Riet2012-08-271-0/+8
| | | | | | QPID-4178. git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1377715 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3858: Updated branch - merged from trunk r.1368650Kim van der Riet2012-08-031-7/+61
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1368910 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3858: Updated branch - merged from trunk r.1333987Kim van der Riet2012-05-041-6/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1334037 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3603: Merge new HA foundations.Alan Conway2012-02-171-18/+20
| | | | | | | Merged from qpid-3603-7. This is basic support for the new HA approach. For information & limitations see qpid/cpp/design_docs/new-ha-design.txt. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1245587 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3603: Added public broker::Connection::isLink function.Alan Conway2012-01-181-16/+16
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1233088 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3438Michael Goulish2012-01-051-2/+1
| | | | | | | | | | Remove unnecessary changes to broker. The cluster code does not really need to know that the cnx error was due to auth failure. Any failure before the cnx has opened should cause the cnx to be removed from the 'local' map, or a cnx leak will occur. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1227616 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3438Michael Goulish2011-12-161-1/+2
| | | | | | | fix cluster causing cnx leak when bad credentials are given in login attempt. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1215127 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3553: prevent multiple connection-tune-ok controls from leaving ↵Gordon Sim2011-11-031-4/+8
| | | | | | dangling pointers in timer git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1197218 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3033: Segmentation fault while processing session.attachAlan Conway2011-08-181-10/+1
| | | | | | | | | | | | | | | The initial fix for this bug was incomplete. The original bug was triggered by a faulty client sending session.attach before connection.open. The special case is when the session.attach is on channel 0. This commit fixes the broker for all cases where a faulty client sends frames before completly opening the connection. Older versions of the Java client are known to send this faulty sequence sporadically, see https://issues.apache.org/jira/browse/QPID-3042. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1159329 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3288: "[C++] Broker sets federation link tag as empty string () when no ↵Kim van der Riet2011-06-061-3/+3
| | | | | | tag is present in the client/server properties" git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1132623 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3121: Cluster management inconsistency when using persistent store.Alan Conway2011-03-071-0/+3
| | | | | | | | | | | | | | | | | | | | With the store doing async completions, completion IO callbacks could be queued differently on different nodes. This led to inconsistent management changes in a cluster when a connection was modified in an IO callback. Fix was to mark IO callback processing as not cluster safe, so connections don't record management stats during an IO callback. Test changes: - enable durable tests in test_management. - add substitutions to mask known issue of inconsistent "stats changed" messages. - add transactional client to test_management. - ignore heartbeat connection close logs in cluster_test_logs.py - make brokertest.retry more accurate - fix minor bug in brokertest.log_ready. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1078947 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2630: ensure that exclusive, auto-deleted queues are freed up on early ↵Gordon Sim2011-03-011-8/+0
| | | | | | deletion (remove some confusion between connection and session scope for these) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1075777 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3084: apply Alan's fix to allow io callbacks to run during a cluster ↵Kenneth Anthony Giusti2011-02-241-11/+15
| | | | | | update. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1074332 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2935: merge producer flow control (C++ broker).Kenneth Anthony Giusti2011-02-191-2/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1072356 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3033 Bug 674183 - Segmentation fault while processing session.attachAlan Conway2011-02-021-1/+4
| | | | | | | | | If a faulty client sent invalid frames to a connection that was not yet in the open state, the broker would core dump. The fix is to close the connection with a 'framing-error' in this case. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1066661 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3007: Don't record management statistics in cluster-unsafe contexts.Alan Conway2011-02-011-2/+4
| | | | | | | | | | A few frames are sent in cluster-unsafe contexts, e.g. heartbeat timer callbacks and during initial connection negotiation. Don't update the connection's management counters in these contexts to avoid inconsistent management data in a cluster. There are very few such frames so this does not unduly distort the management data. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1066215 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2991: added message counts to connection stats; fixed xxxToClient statsGordon Sim2011-01-111-4/+43
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1057578 13f79535-47bb-0310-9956-ffa450edef68
* SASLizing Interbroker LinksMichael Goulish2010-10-201-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------- 1. Brokers already knew how to handle the server side of SASLized links, but not the client side. So we promoted the client-side SASL code from the client library to the common library so that the broker could also use it. This affected SaslFactory.{h,cpp} and Sasl.h TODO -- can the server-side and client-side code be unified here? 2. Some of the SASL verbs in broker/ConnectionHandler.cpp are expanded: start, secure, tune. 3. broker/SecureConnection is altered to get the client-broker and the server-broker to agree on when the security layer should be inserted. 4. the python tool qpid-route is modified so that, in the "route add" command, you can specify the security mechanism for SASL to use. TODO -- should we also pass in {min,max}SSF ? 5. Changes in broker/LinkRegistry to allow the information input by qpid-route to be passed up to where it is needed. 6. A bash script test run by "make check" that creates a SASLized federation link and sends some messages down it. TODO - write a python unit test instead of a bash script. I think I uncovered a bug in the python code when I tried. 7. NOTE - testing for this feature does not work with versions of SASL earlier than 2.1.22, becuase I can't tell SASL to use a SASL database file in a nonstandard location. The test is disabled for earlier versions. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1024541 13f79535-47bb-0310-9956-ffa450edef68
* Code cleanup in broker directory.Alan Conway2010-10-141-1/+2
| | | | | | | | - Removed un-necessary #includes for broker/Queue.h - Removed "using std::string" in header files. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1022679 13f79535-47bb-0310-9956-ffa450edef68
* Give timer tasks a name for logging purposes.Alan Conway2010-08-261-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@989925 13f79535-47bb-0310-9956-ffa450edef68
* Make management+cluster test more aggressive.Alan Conway2010-06-231-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@957337 13f79535-47bb-0310-9956-ffa450edef68
* Fix cluster broker crashes when management is active.Alan Conway2010-06-221-10/+20
| | | | | | | | | | | | Cluser brokers were exiting with errors "modified cluster state outside cluster context" and "confirmed < (50+0) but only sent < (49+0)" Fix was to: - delay completion of incoming update till update connection closes. - delay addding new connections to managment until connection is announced. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@956882 13f79535-47bb-0310-9956-ffa450edef68
* Fix cluster-safe assertion in connection negotiation.Alan Conway2010-06-091-1/+11
| | | | | | | | See https://bugzilla.redhat.com/show_bug.cgi?id=602347. In a cluster, raise the management connect event when processing cluster.announce. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@953147 13f79535-47bb-0310-9956-ffa450edef68
* Cluster handle connection-negotiation phase in local broker.Alan Conway2010-06-081-2/+1
| | | | | | | | | | | | | | | | | The connection negotiation phase up to the "open" or "open-ok" frame establishes whether/what encryption to use for the rest of the connection. With this patch a cluster broker completes the initial negotiation with its local clients and only then begins multicasting to other brokers. The local broker decrypts if necessary and multicasts in the clear. This replaces a problematic locking scheme that was formerly in place which caused deadlocks. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@952692 13f79535-47bb-0310-9956-ffa450edef68
* Cluster + SecurityMichael Goulish2010-05-141-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------------------------------- * initial observation of a problem was a 2% failure rate in perftests of 20,000 messages against a cluster with security enabled. Problem was occasional receit of encrypted frames before the security codec had been enabled. This is fixed with locking in cluster code (no new locks in broker code) and a callback that is fired by broker::ConnectionHandler::Handler to tell the cluster code when the opening handshake has finished. This was never a problem in the non-clustered broker before because everything happened in a single thread. * the brokers that "shadow" the connection must not have null authenticators rather than real ones, so that they go through all the motions but don't do anythig. Only the directly-connected broker can perform the security handshake. * once the directly-connected broker receives the real user ID from its callback, it mcasts that ID to all other brokers. Otherwise the shadowing brokers will al think that the user ID is "anonymous". Check this by doing a substantial perftest, and using qpid-stat -c localhost:PORT to confirm that the brokers all have the same userID for the same connection. * the user ID, negotiated during the Sasl security startup, is communicated from the directly connected broker to all other cluster brokers. * If security is *not* being used, then this code should *not* tell the brokers anything about the userID -- or it will step on the value that is being set by other code pathways. * test program at cpp/src/tests/cluster_authentication_soak is not yet fully automated -- run it with something like "sudo ./cluster_authentication_soak 500" git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@944158 13f79535-47bb-0310-9956-ffa450edef68
* Fix QPID-2435. This patch removes the "publishNow" feature from the broker ↵Ted Ross2010-03-051-1/+1
| | | | | | agent. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@919619 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2412: Support for EXTERNAL mechanism on client-authenticated SSL ↵Gordon Sim2010-03-051-2/+4
| | | | | | | | | | | | connections. On SSL connection where the clients certificate is authenticated (requires the --ssl-require-client-authentication option at present), the clients identity will be taken from that certificate (it will be the CN with any DCs present appended as the domain, e.g. CN=bob,DC=acme,DC=com would result in an identity of bob@acme.com). This will enable the EXTERNAL mechanism when cyrus sasl is in use. The client can still negotiate their desired mechanism. There is a new option on the ssl module (--ssl-sasl-no-dict) that allows the options on ssl connections to be restricted to those that are not vulnerable to dictionary attacks (EXTERNAL being the primary example). git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@919487 13f79535-47bb-0310-9956-ffa450edef68
* Consistent connection names across a cluster.Alan Conway2010-02-051-3/+3
| | | | | | | | | - use the same host:port for connections and their shadows. - add shadow property to managment connection to identify shadows. - updated qpid-stat and qpid-cluster to filter on shadow property. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@907123 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2347: Signal deletion of queue to active subscribers via a ↵Gordon Sim2010-01-221-0/+4
| | | | | | resource-deleted exception. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@902055 13f79535-47bb-0310-9956-ffa450edef68
* Removed dead code: OutputTask::hasOutput and Queue::checkForMessages.Alan Conway2010-01-141-2/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@899356 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2188 , support for maxConnections, limit is set to brokerCarl C. Trieloff2009-11-171-0/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@881517 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1899: Applied patch from Ken Giusti to tie in SASL enctryption to the ↵Gordon Sim2009-11-091-1/+2
| | | | | | handling of the --require-encrypted option git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@834108 13f79535-47bb-0310-9956-ffa450edef68
* Added immediate-publish for new connections and agents. This solves a race ↵Ted Ross2009-10-221-1/+1
| | | | | | | | | | | | condition where a QMF console may learn about an object before it learns about the agent that controls that object. Changed log category for QMF messages from debug to trace. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@828685 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2078: Ensure sessions are cleaned up when their connection is closed by ↵Gordon Sim2009-09-011-2/+4
| | | | | | management. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@810094 13f79535-47bb-0310-9956-ffa450edef68
* Change all broker users of broker::Timer to use sys::TimerAndrew Stitcher2009-07-301-32/+19
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@799273 13f79535-47bb-0310-9956-ffa450edef68
* Add directory to #includeAlan Conway2009-07-141-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@793909 13f79535-47bb-0310-9956-ffa450edef68
* Reverted checkins 793119, 793120, 793121, 793122 because of problems with ↵Kim van der Riet2009-07-131-19/+32
| | | | | | heartbeats and the store tests. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@793602 13f79535-47bb-0310-9956-ffa450edef68
* Change all broker users of broker::Timer to use sys::TimerAndrew Stitcher2009-07-101-32/+19
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@793121 13f79535-47bb-0310-9956-ffa450edef68
* Federation: Propagation of dynamic bindings is now done on the thread ↵Ted Ross2009-07-021-6/+9
| | | | | | | | | | | servicing the federation link (connection). Also, some minor cleanup of unneeded recursive includes. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@790698 13f79535-47bb-0310-9956-ffa450edef68
* Once we're aborting the connection due to traffic timeout make sureAndrew Stitcher2009-06-231-1/+6
| | | | | | | we cancel heartbeats git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@787811 13f79535-47bb-0310-9956-ffa450edef68
* Ensure that the ConnectionTimeoutTask does not block other tasks (e.g. ↵Gordon Sim2009-06-171-21/+33
| | | | | | ConnectionHeartbeatTask) by having the timeout changed after it has been submitted. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@785733 13f79535-47bb-0310-9956-ffa450edef68
* Don't start the broker Connection heartbeat timers if theAndrew Stitcher2009-06-111-1/+1
| | | | | | | connection isn't a local connection. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@783791 13f79535-47bb-0310-9956-ffa450edef68
* Stop timers on receiving Connection::closed() from lower levelsAndrew Stitcher2009-06-111-0/+4
| | | | | | | as well as sending close() to them. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@783790 13f79535-47bb-0310-9956-ffa450edef68
* Add flag to broker Connection so that it knows if it is aAndrew Stitcher2009-06-111-1/+2
| | | | | | | local or shadow connection git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@783789 13f79535-47bb-0310-9956-ffa450edef68
* Fix of the previous client heartbeat changes:Andrew Stitcher2009-06-081-0/+3
| | | | | | | | | | - Changes to the cluster code were previously missed - It's neater and more correct to reset the traffic timeout for all connection traffic, not just traffic in a session git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@782696 13f79535-47bb-0310-9956-ffa450edef68
* - Added heartbeat generation to the client (actually echo back anyAndrew Stitcher2009-06-081-15/+53
| | | | | | | | | broker generated heartbeat) - Broker now disconnects client if it receives no traffic in 2 heartbeat intervals (which is now the same as the client behvaiour) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@782651 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1843 - Cleaned up the interface to the broker's internal management agent.Ted Ross2009-05-111-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@773570 13f79535-47bb-0310-9956-ffa450edef68
* Fix issues when cluster is run with persistence enabled.Alan Conway2009-04-111-1/+2
| | | | | | | | | | - Handle partial failures (e.g. due to disk error): failing brokers shut down, others continue. - Enable persistence in cluster tests. - Correct message status in DeliveryRecord updates. - Remove qpid.update queue when update complete - avoid it becoming persistent git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@764204 13f79535-47bb-0310-9956-ffa450edef68
* Changed the producer rate limit timer callbackAndrew Stitcher2009-02-241-5/+9
| | | | | | | | so that it generates a callback serialised with the connection git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@747587 13f79535-47bb-0310-9956-ffa450edef68