Using Indy SDK in react native

error observed:

org.hyperledger.indy.sdk.InvalidStateException: The SDK library experienced an unexpected internal error.

This is my code snippet:

    @ReactMethod 
    public void openPool(Promise promise ){
        Log.i("RNIndy", "inside openpool");
        String poolName = "indy_pool";
        try{

            try{
                poolName = PoolUtils.createPoolLedgerConfig();
                Log.i("RNIndy", "pool name is " + poolName);
            } catch (PoolLedgerConfigExistsException e) {
                Log.i("RNIndy", e.getMessage());
            }

            Log.i("RNIndy", "created genesis config");
            Pool.setProtocolVersion(2);
            Log.i("RNIndy", "protocol version set");
            Pool poolHandle = Pool.openPoolLedger(poolName, null).get();
            Log.i("RNIndy", "resolving poolHandle");
            promise.resolve(poolHandle); 
        }catch (Exception e) {
                e.printStackTrace();
                Log.i("RNIndy",e.getMessage());
                promise.reject("Exception", e.getMessage());
        }   
    }

Erro occurs at Pool poolHandle = Pool.openPoolLedger(poolName, null).get();

I am running on an android device and error happens when openPool is called
can someone guide me?

I am using indy v 1.14.1

It was an issue with how I built my image and run the containers.
I had run them using these commands:

docker build -f ci/indy-pool.dockerfile -t indy_pool .
docker run -itd -p 9701-9708:9701-9708 indy_pool

I deleted the containers and built and run using following commands and it started working.

docker build --build-arg pool_ip=<host_ip> -f ci/indy-pool.dockerfile -t indy_pool .
docker run -itd -p <host_ip>:9701-9708:9701-9708 indy_pool