{ "info": { "author": "Christian Heimes", "author_email": "c.heimes@semantics.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Sun Public License", "Natural Language :: English", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Java", "Programming Language :: Python", "Topic :: Multimedia :: Graphics", "Topic :: Software Development :: Debuggers" ], "description": "Abstract\n========\n\nSSH-tunnel friendly monitoring of embedded Java Runtimes using MBeans, Java \nManagement Extensions (JMX) and Remote Method Invocation (RMI) for Python and \nPyLucenet.\n\nRationale\n=========\n\njccjmx is a convenience helper for JCC and PyLucene to create a JMX RMI\nconnector at runtime. The usual way to a connector with vmargs \n'-Dcom.sun.management.jmxremote' (or similar) works only on startup. Also\nthis opens two ports (one for the connector and one for the RMI registry).\nThe RMI registry port is assigned dynamically which makes firewall rules\nor SSH/SSL tunnels impossible.\n\njccjmx allows you to start a RMI and JMX connector programmatically without \nrestarting your Python application. The platform MBean server provides live\nmonitoring of JRE's memory usage (heap, caches), JRE's CPU usage, Java threads,\nattached Python threads and more. The JDK is shipped with two GUI programs\nfor monitoring: jconsole and jvisualvm.\n\njccjmx is based on Daniel Fuchs' examples from his blog at Sun (now Oracle).\nI've modified his code and ported it from a premain agent to a standalone\nclass.\n\n\nUsage\n=====\n\nThe import order is crucial! You must import and init lucene and jccjmx in \nthe correct order. Otherwise your process will segfault.\n\n>>> import lucene\n>>> import jccjmx\n\nInitialize the VM for both packages. The second initVM() just adds the CLASSPATH\nof jccjmx.\n\n>>> lucene.initVM() # doctest: +ELLIPSIS\n\n>>> jccjmx.initVM() # doctest: +ELLIPSIS\n\n\nCreate an agent that listens on port 12345. You should create just one\ninstane of JccJmxAgent during the life time of your application.\n\n>>> agent = jccjmx.JccJmxAgent(12345)\n\nBy default the agent is bound to 127.0.0.1. You can specificy another hostname or\nIP address with jccjmx.JccJmxAgent(\"hostname\", portnumber).\n\nA RMI is created immediately and bound to \"*:port\" but no agent is listening yet. You\nhave to activate is explicitly. This allows you to delay the agent.\n\n>>> agent.isActive()\nFalse\n>>> agent.start()\n>>> agent.isActive()\nTrue\n>>> agent.stop()\n>>> agent.isActive()\nFalse\n\nIn order to connect from a remote host you need to know the service URL:\n\n>>> agent.getServiceURL()\nu'service:jmx:rmi://127.0.0.1:12345/jndi/rmi://127.0.0.1:12345/jmxrmi'\n\nFrom a remote host:\n\n$ ssh -L12345:127.0.0.1:12345 server\n$ jconsole service:jmx:rmi://127.0.0.1:12345/jndi/rmi://127.0.0.1:12345/jmxrmi\n\n\nSecurity\n========\n\nThe RMI registry is always bound to all possible network devices. This \nshouldn't be an issue but I can't guarantee it.\n\njccjmx doesn't use SSL to authenticate clients and encrypt the connection. It's\nup to you to use an encrypted tunnel. Future versions of jccjmx may support\nSSL.\n\n\nTrouble shooting\n================\n\nConnection refused\n------------------\n\nYou may get a connection refused error when the RMI hostname isn't set\ncorrectly. jccjmx sets the system property unless it is already set. You can\nforce a correct hostname with e.g.\n\n -Djava.rmi.server.hostname=127.0.0.1\n\n\nIPv4 vs. IPv6\n-------------\n\nJava prefers IPv6 connections over IPv4 connections and usually binds to\nIPv6 TCP. If you are having trouble with a mixed network you can force the\nJRE to prefer IPv4 with\n\n -Djava.net.preferIPv4Stack=true\n\n\nSources\n=======\n\nhttps://blogs.oracle.com/jmxetc/entry/connecting_through_firewall_using_jmx\nhttps://blogs.oracle.com/jmxetc/entry/more_on_premain_and_jmx\nhttps://blogs.oracle.com/jmxetc/entry/jmx_connecting_through_firewalls_using\n\nAuthors\n=======\n\nChristian Heimes\nDaniel Fuchs (original author of the JMX agent) \n\n\nCopyright\n=========\n \nOriginal java code::\n \n Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. \n \nJCC wrapper, start/stop features::\n \n Copyright (C) 2012 semantics GmbH\n\n semantics\n Kommunikationsmanagement GmbH\n Viktoriaallee 45\n D-52066 Aachen\n Germany\n\n Tel.: +49 241 89 49 89 29\n eMail: info(at)semantics.de\n http://www.semantics.de/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.semantics.de", "keywords": "java jcc jmx rmi", "license": "Sun Public License", "maintainer": null, "maintainer_email": null, "name": "jccjmx", "package_url": "https://pypi.org/project/jccjmx/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/jccjmx/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.semantics.de" }, "release_url": "https://pypi.org/project/jccjmx/0.1/", "requires_dist": null, "requires_python": null, "summary": "Java Management Extension (JMX) wrapper for JCC", "version": "0.1" }, "last_serial": 793593, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "907d6331bc8def7a56ce95da7db04eea", "sha256": "6a1927f265e5f8503d30bb2bcc469ccc87dd8e4ed0eb94ad73d7bfdb55aa6315" }, "downloads": -1, "filename": "jccjmx-0.1.tar.gz", "has_sig": false, "md5_digest": "907d6331bc8def7a56ce95da7db04eea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8105, "upload_time": "2012-05-07T16:10:41", "url": "https://files.pythonhosted.org/packages/b1/6a/1d7c3bcd41aa0e01bb8b34253554f05064201ce4fffc21a661713736ddb5/jccjmx-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "907d6331bc8def7a56ce95da7db04eea", "sha256": "6a1927f265e5f8503d30bb2bcc469ccc87dd8e4ed0eb94ad73d7bfdb55aa6315" }, "downloads": -1, "filename": "jccjmx-0.1.tar.gz", "has_sig": false, "md5_digest": "907d6331bc8def7a56ce95da7db04eea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8105, "upload_time": "2012-05-07T16:10:41", "url": "https://files.pythonhosted.org/packages/b1/6a/1d7c3bcd41aa0e01bb8b34253554f05064201ce4fffc21a661713736ddb5/jccjmx-0.1.tar.gz" } ] }