locked
Not able to connect to azure trail account from Java code RRS feed

  • Question

  • Hi All,

    I am using Azure trail account to connect to Azure Storage Explorer.

    I am getting timed out error while I am trying to connect to azure account from Java code.

    CloudStorageAccount account = new CloudStorageAccount(new StorageCredentialsAccountAndKey("xxxx","xxxx==")); CloudBlobClient blobClient = account.createCloudBlobClient(); CloudBlobContainer blobContainer = blobClient.getContainerReference("aaa"); for (ListBlobItem blob : blobContainer.listBlobs()) { System.out.println(blob.getUri()); }

    Exception in thread "main" java.util.NoSuchElementException: An error occurred while enumerating the result, check the original exception for details.
    	at com.microsoft.windowsazure.services.core.storage.utils.implementation.LazySegmentedIterator.hasNext(LazySegmentedIterator.java:113)
    	at sst.testclient.Dummy.prepareContainerReference(Dummy.java:219)
    	at sst.testclient.Dummy.main(Dummy.java:54)
    Caused by: com.microsoft.windowsazure.services.core.storage.StorageException: The server encountered an unknown failure: 
    	at com.microsoft.windowsazure.services.core.storage.StorageException.translateException(StorageException.java:120)
    	at com.microsoft.windowsazure.services.core.storage.utils.implementation.ExecutionEngine.executeWithRetry(ExecutionEngine.java:147)
    	at com.microsoft.windowsazure.services.core.storage.utils.implementation.LazySegmentedIterator.hasNext(LazySegmentedIterator.java:109)
    	... 2 more
    Caused by: java.net.ConnectException: Connection timed out: connect

    Can some one please help me on this. thanks in adavanced.

    Friday, June 14, 2013 5:48 PM

Answers