Sonatype products are heavily dependent on the Hypertext Transport Protocol (HTTP) and Transport Layer Security (TLS). These protocols need to successfully navigate through complex organizational network infrastructures and occasionally experience problems which are better debugged in isolation from a Sonatype product experiencing the problem.
Sonatype products are also Java based and use common HTTP client shared libraries. Sometimes particular issues need to be replicated with specific Java or HTTP client versions.
To aid this advanced debugging, Sonatype offers a Java based pseudo client which can in some scenarios help isolate the root cause of a networking related problem.
When should I use urlpoke?
The tool is typically used on the advice of Sonatype support staff.
While trivial to use, it should be considered one of the last resorts needed after the more common debugging techniques have not provided enough info.
What does urlpoke do?
URLPoke is a Java based command line socket connection and limited HTTP/TLS client. It can connect to specified IP/host ports, and perform basic verification that such connections can be established without error.
Why use urlpoke instead of ...?
Experience has shown that some networking issues are only reproducible using specific Java client libraries and versions that closely match those used by Sonatype products.
URLPoke requires Java 7 or greater. Typically you want to ensure that the exact same Java runtime used to run a Sonatype product experiencing a problem is also used to execute urlpoke.
Ideally run this tool on the same host and user where the Sonatype product experiencing the problem is located. This reduces the variables which could be contributing to the problem.
How to use it
The jar is a self contained executable. To get help, simply launch it without arguments:
> java -jar urlpoke.jar ==20 [INFO] org.sonatype.support.URLPoke - c995bd1f1abc6d4afc1c46748e14456a9d31e96e (201601131605) ==25 [INFO] org.sonatype.support.URLPoke - 2016-01-13 20:05:49,902+0000 ==26 [INFO] org.sonatype.support.URLPoke - Missing arguments ======================================================================================================= java [-D system properties] -jar urlpoke.jar [options ...] url JVM System Properties ( java -Dname=value ): http://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html -Dhttp.proxyHost (default: ) -Dhttp.proxyPort (default: 80) -Dhttp.nonProxyHosts (default: localhost|127.*|[::1]) -Dhttps.proxyHost (default: ) -Dhttps.proxyPort (default: 443) -Dhttp.agent (default: “Java/”) -Djavax.net.debug (default: not set) -Djava.net.useSystemProxies (default: false) -Djava.net.preferIPv4Stack (default: false) -Djavax.net.ssl.trustStore (default: see https://goo.gl/25QhV6) Program System Properties ( java -Dname=value ): -DproxyHost proxy server host name -DproxyPort proxy server port -DproxyUser proxy server authorization user -DproxyPass proxy server authorization password -Duser target url authorization user -Dpass target url authorization password Program Options: -sys print effective system properties and continue -ssl shorthand for -Djavax.net.debug=ssl -all shorthand for -Djavax.net.debug=all and URLConnection logging (prints Authorization headers!) -debug HTTP header logging (prints Authorization headers!) -pauth use pre-emptive auth instead of two stage auth -hc use Apache HTTP Client instead of Java URLConnection <url> a URL with one of these protocols [https http ssl plain] Java Networking Reference: https://blogs.oracle.com/java-platform-group/entry/diagnosing_tls_ssl_and_https http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html http://docs.oracle.com/javase/6/docs/technotes/guides/net/properties.html http://docs.oracle.com/javase/7/docs/technotes/guides/net/http-auth.html http://docs.oracle.com/javase/7/docs/technotes/guides/net/proxies.html http://docs.oracle.com/javase/7/docs/technotes/guides/net/properties.html http://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html http://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html http://docs.oracle.com/javase/8/docs/technotes/guides/net/index.html http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/ReadDebug.html http://en.wikipedia.org/wiki/Transport_Layer_Security#TLS_handshake http://www.oracle.com/technetwork/java/javase/documentation/cve-2014-3566-2342133.html =======================================================================================================