Welcome to my website. I am always posting links to photo albums, art, technology and other creations. Everything that you will see on my numerous personal sites is powered by the formVistaTM Website Management Engine.


  • Subscribe to this RSS Feed
  • Error attaching to process: sun.jvm.hotspot.debugger.DebuggerException: Can't attach to the process [SOLVED]
    09/09/2015 10:20AM

    If you are attempting to use jmap or another Java memory analysis tool to connect to a running JVM to generate a heap dump, even when running jmap as the same user as that of the running process, and encounter the following error:

    Attaching to process ID 2712, please wait...
    Error attaching to process: sun.jvm.hotspot.debugger.DebuggerException: Can't attach to the process

    Following is the (likely) solution to your problem.

    It is likely that the ptrace_scope setting for your system is set to a restrictive mode which will not allow another process access to the memory space of the other process.  See this link for more details.

    The fix is to update the setting in /proc/sys/kernel/yama/ptrace_scope.

    First, verify the current setting:

    $ cat /proc/sys/kernel/yama/ptrace_scope

    1, indicates a restricted setting.  To update it so that another process with the same UID can attach to that processes memory space do the following (as root)

    # echo 0 | tee /proc/sys/kernel/yama/ptrace_scope

    Now, checking that value should return 0

    $ cat /proc/sys/kernel/yama/ptrace_scope

    At this point you should now be able to do a heapdump with jmap on your process with a command similar to the following:

    $ jmap -J-d64 -heap 2712

  • Firewall for Ubuntu 14.04 LTS
    09/01/2015 4:16PM

    For whatever reason, Ubuntu 14.04 does not seem to come with a firewall.

    There are however two packages which provide, both a firewall and a handy GUI front-end for it.  UncomplicatedFireWall is the main package (ufw) and the GUI is gufw.

    To install:

    # apt-get install gufw

    This will install the front-end and the dependent packages

    To turn it on:

    # ufw enable

    The default is to block all incoming traffic.

    To update and add your own firewall rules and allow incoming connections

    # gufw

    The GUI is quite intuitive and allows advanced users the ability to create their own custom rules.

  • Possible Remediation for Stagefright Android Vulnerability
    07/27/2015 9:56AM

    By now, everyone is aware of the Stagefright vulnerability in Android.  It isn't as much the name of the vulnerability but a media player library used in Android.

    It seems that one of the ways to remediate the vulnerability is to configure your text messaging application to NOT auto-retrieve Multimedia messages (MMS).  On my phone that is under the Advanced Settings, "Auto-retrieve Automatically retrieve messages".

    The other thing that I did was disable Google Hangouts.  I don't use it on my phone anyway so I probably should have turned it off to begin with.

    If anyone has any other ideas, or corrections to this post, please contact me and I will update it.  (I am in the process of openning up the blog to comments).

  • Hadoop Cluster Sizing Wizard by Hortonworks
    07/13/2015 1:36PM

    Anyone who does any Hadoop development or systems engineering arrives at the "how should I size my cluster" question.

    Hortonworks has a very nice cluster sizing calculator that takes into account the basic use-cases and data profile to help get you started with your hardware requirements.

  • Generate a Randome String of a Specified Size with a Shell Script
    06/24/2015 12:48PM

    The following is a one-liner for generating a random string of a fixed size in bash, where the possible characters to use in the string are any digit, letter, and a newline.

    By adding the newline, you are fairly sure to prevent getting one long line of text.

    $ < /dev/urandom tr -dc "[:digit:][:alpha:][\n]" | head -c1000 > file.out

Advanced Search