Docker Registry – HTTP status: 503 Service Unavailable

October 15, 2019 Leave a comment

Occasionally the ‘docker pull’ command would return a HTTP Status: 503 Service Unavailable error. This error might happen because of docker registry outage. In case of such error message, as a first step, check the following URL –

When I was troubleshooting similar issue – I logged into and actually found that a few docker services were down, including docker registry.

If this is all Green, then consider other troubleshooting options.


Screen Shot 2019-10-15 at 10.01.38 PMScreen Shot 2019-10-15 at 10.01.51 PM

Categories: Uncategorized

Switching easily between Java JDKs on Mac OS X

April 17, 2017 Leave a comment

Quickly switching between multiple java versions on Mac Terminal

Wim Deblauwe's Blog

I just came upon a neat little trick to easily switch what JDK you are using on the command line on Mac OS X (10.9.2 is the version I am using), courtesy of this AskDifferent answer.

First, add the following aliases in ~/.profile file:

alias setJdk6='export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)'
alias setJdk7='export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)'
alias setJdk8='export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)'

Open a new terminal window or use source ~/.profile to load the aliases.

Now you can easily switch between the installed JDKs:

> setJdk6

We can verify that Maven picks this up correctly:

> mvn --version
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: /Applications/maven/apache-maven-3.0.4
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.9.2", arch: "x86_64", family: "mac"

To go to JDK 7:

> setJdk7

And Maven shows:

> mvn --version
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)

View original post 90 more words

Categories: Uncategorized

error: RPC failed; curl 56 SSLRead() return error -9806 fatal: The remote end hung up unexpectedly fatal: early EOF

April 17, 2017 Leave a comment

I came across this error when cloning a large git repository using a WiFi connection.

One quick setting to help overcome is to increase the http.postBuffer size in git and restart the cloning process. Use following command to increase the postBuffer size.

git config –global http.postBuffer 8M

In my case after trial and error I adjusted it to 8M. This may vary depending on the data which is pulled.

http.postBuffer from git documentation

Maximum size in bytes of the buffer used by smart HTTP transports when POSTing data to the remote system. For requests larger than this buffer size, HTTP/1.1 and Transfer-Encoding: chunked is used to avoid creating a massive pack file locally. Default is 1 MiB, which is sufficient for most requests.For reference – Git documentation link to various git config options

Git documentation for more git-config options – git-config documentation


Categories: Uncategorized

Retrieve passwords from FileZilla

April 23, 2014 1 comment

FileZilla client stores connection credentials in plain text. Following are the steps to recover lost FTP credentials from filezilla in Windows 7

Step 1: Open folder C:\Users\<YourName>\AppData\Roaming\FileZilla (If FileZilla is not found in Roaming folder, search it in other folders of AppData )

Step 2: Open file recentservers.xml. This file will contains the information all the recent connections made through file zilla along with passowords.

That’s it. By now we should have retrieved our lost passwords.


Categories: Uncategorized Tags:

Automatic requests being fired while executing a JAX-WS web service asynhronous call

June 17, 2013 Leave a comment

Further to my earlier post about how to send asynchronous requests using jax-ws. There might be an issue with long running server side operations when an asynchronous call is invoked. The issue could be that the asynchronous request the user has sent can automatically get triggered again after some point in time, causing undesirable effects on the server side.

Going deep and trying to understand the problem, I observed that the same client was sending a new request which was a replica of the original request. This was causing the server side operations to run again, and was giving undesired results.  On searching the web I came across this bug from Sun website.

SOAP request’s in the raw form are sent as HTTP post requests. In Java (JDK) implementation of POST, when a POST request is sent using, the client waits for a fixed amount of time to receive a response from the server. If no response is received during the stipulated time it automatically fires the same request to the server, and JDK implementation is programmed with this assumption. Since POST requests are non idempotent (One which modifies database or server side when performing an operation Eg: POST, PUT, DELETE http methods) it may have undersirable effects in some conditions and the user may not want the request to be retried again by HTTPClient.

JDK provides a flexibility to the user to avoid the default auto retry behavior. This behavior is controlled by using the property

which is by default set to true. If we want the default retry behavior to be disabled, just set

in the system properties (-D

Note: Setting the property programmatically using System.setProperty(“ “, false) may not work as the value is initialized in the static block in the HttpClient class of JDK. More details in the reference section.


Categories: web services Tags: ,

How to make asynchronous call to SOAP Web Service using JAX-WS

June 8, 2013 2 comments

Before I show an example of how to invoke asynchronous web service using JAX-WS let’s take a brief know how about synchronous and asynchronous calls.

Synchronous Web service call : A program calling the web service sends a request to the web service and waits till the web service returns the response, before executing the next statement.

Asynchronous Web service call : A program calling the web service sends a request to the web service and proceeds with the execution of remaining statements even before the web service has returned any response.  (This may be because a web service might take time to compute and generate the response, and the client doesn’t want to wait till it receives the response)

I was trying a scenario where I send a web service request and was not interested in the response. The web service would usually take a longer time to process and because of this the program execution in the client was stuck at the web service invocation call. This usually is the case with any of the synchronous call. I just wanted to send the request to the web service and proceed with execution remaining steps in the client without waiting for the web service to return.

Example of how to make asynchronous calls to JAX-WS Web service

1) Create a sample JAX-WS Web service and publish it

public class SimpleSOAPServiceImpl{

	public String sayHello(@WebParam(name = "echo") String echo) {
		try {
			Thread.sleep(1000*60*5); // Sleep for 5 minutes
			return "Hello "+echo;
		catch(InterruptedException ex) {
			// Exception Handling code here..
		return null;

	public static void main(String args[]) {
		Endpoint.publish("http://localhost:1234/MySOAPService", new SimpleSOAPServiceImpl());

2) Create a binding xml to be used with wsimport

<!--?xml version="1.0" encoding="UTF-8" standalone="yes"?-->

        <!-- Applies to all the methods in the wsdl. If set to true all the methods can be          invoked asynchronously -->

        <!-- Applies asynchronous binding only to selected methods -->
        <!-- Uncomment below binding section, when the above 'enableAsyncMapping' tag         is set to false -->
        <bindings node="wsdl:definitions/wsdl:portType[@name='SimpleSOAPServiceImpl']/wsdl:operation[@name='sayHello']">

3) Run wsimport to generate client artifacts. (I ran from command prompt)

D:/> wsimport http://localhost:1234/MySOAPService?wsdl -b asyncBinding.xml -s .

4) Check the generated interface after running wsimport. This will have 2 extra methods(sayHelloAsync) for each method which was specified in the binding file

// Asynchronous Method
public Response sayHelloAsync(
		@WebParam(name = "echo", targetNamespace = "")
		String echo);

// Asynchronous Method
public Future<?> sayHelloAsync(
        @WebParam(name = "echo", targetNamespace = "")
        String echo,
        @WebParam(name = "asyncHandler", targetNamespace = "")
        AsyncHandler asyncHandler);

// Synchronous Method
public String sayHello(
        @WebParam(name = "echo", targetNamespace = "")
        String echo);

5) Invoke the web service from client

public class Client {
	public static void main(String args[]) throws Exception {
		SimpleSOAPServiceImplService service = new SimpleSOAPServiceImplService();
		SimpleSOAPServiceImpl port = service.getSimpleSOAPServiceImplPort();

		port.sayHelloAsync("This is Asynchrous call.. ");
		// port.sayHello("This is synchronous call");

		System.out.println("Execute this statement before async call is complete.. ");


The above client prints Execute this statement before async call is complete.. even before the web service actually finishes processing.

The beauty of making asynchronous calls from JAX-WS is that the web service need not be modified to support any asynchronous calls and remains as is. All magic happens at the client side.

Following reference document details the usage of making asynchronous calls using JAXWS


Categories: web services Tags: ,

Path Vs Classpath

As a Java Developer one frequently encounters these terms but often gets confused when to use what.

Here I found an informative article explaining both:

Note: Following content is reflected from the above article.

Still a lot of people don’t understand the purpose of these system variables. They don’t know when to set it, what it really does and therefore cannot determine that this IS or IS NOT a path or classpath problem.

The PATH variable is a Windows system variable that Windows uses to find executable files. When you type a command in the cmd window, e.g. “javac”, Windows will search in your PATH to find the program to execute. The search sequence is as follows:

Current Dir > PATH Variable > Command Interpreter

In the example, the interpreter will first look in the Current Dir for a, javac.exe or javac.bat respectively. If found, it will be executed. If not it continues its search through the PATH variable in definition sequence and extension sequence. This means for PATH=C:\Temp;C:\Windows, C:\Temp\ will be searched 1st, followed by C:\Temp\javac.exe, C:\Temp\javac.bat, C:\Windows\, and so on.

Once the PATH is exhausted, the interpreter will be checked if it is a interpreter command (such as “copy”). If so it will be invoked. Finally the interpreter will return a “Bad command or file name” if the command is not found.

All these means that if you’re getting a “Bad command or file name”, it is likely a PATH problem. It also means if you’re somehow running the wrong program, it may be a program of the same name in a path earlier than yours (useful for java version conflicts).

The CLASSPATH variable is a Java runtime system variable that Java uses to find class files. When Java tries to load a class, it will lookup its ClassLoader. If the class is not yet loaded, Java tries to find the class in the CLASSPATH variable. Sometimes the CLASSPATH may be appended from the runtime command line directly.

This means that if you’re getting a ClassNotFoundException during runtime, or “Unable to resolve symbol” during compile, you may have a CLASSPATH problem. (NOTE: Typos and other errors may also raise same compile error). If the classes are in the current directory and still cannot be found try adding “.” (current dir) to the classpath or check if the sources are in java packages.

To check the current PATH on cmd, type “PATH” or “set PATH”. To check the CLASSPATH, type “set CLASSPATH”.

To fix the PATH or CLASSPATH, you can either set it on the command line directly or set it through System Environment Variables. To set it from cmd, type “set CLASSPATH=someClassPath”. To append to the existing PATH or CLASSPATH, use %xxx%. E.g. “set CLASSPATH=%CLASSPATH%;.” to append the current directory into the classpath without affecting the existing classpath. Setting the variables on cmd only persists for that session. If you start another cmd or close this cmd the variables will be reset.

To persist the variables permanantly, you can set it through System Environment Variables. For XP Pro, go to the “System Properties” first. You can get there by

  1. Start > Control Panel > System
  2. Start, right-click “My Computer”, select “Properties”
  3. Press [WindowsKey]+[Break] simultaneously

with option 3 being the fastest. From there, click the “Advanced” tab and click “Environment Variables” at the bottom. Set either the User variables or System variables. The User variables only affect your Windows Login, and System variables will affect everyone. User variables will overwrite any System variable settings.



Categories: Uncategorized Tags: ,