Skip to content

Unable to access the file, which is the AWS EC2 windows Machine jcifs.util.transport.TransportException: Connection timeout  #236

@lokeshc915

Description

@lokeshc915

ConnectionOptions options = new ConnectionOptions();
options.set(ADDRESS, "ec2-54-211-254-21.us-west-2.compute.amazonaws.com");
options.set(USERNAME, "");
options.set(PASSWORD, "<password");
options.set(OPERATING_SYSTEM, WINDOWS);
options.set(CONNECTION_TYPE, WINRM_INTERNAL);
options.set("winrmEnableHttps", true);
System.out.println("Establishing Windows server Connection...");
OverthereConnection connection = Overthere.getConnection(ParserConstants.CIFS_PROTOCOL, options);

try {
OverthereFile appHostFile = connection.getFile("C:/Windows/System32/inetsrv/config/applicationHost.config");
BufferedReader r = new BufferedReader(new InputStreamReader(appHostFile.getInputStream()));
String line;
while ((line = r.readLine()) != null) {
System.out.println(line);
}

		r.close();
	} catch (Exception ex) {
           }

-----------------error:------------------------
12:34:35.396 [main] INFO com.xebialabs.overthere.OverthereConnector - Connecting to cifs:winrm_internal://Administrator@ec2-54-213-254-210.us-west-2.compute.amazonaws.com:445:5986
12:34:35.442 [main] DEBUG com.xebialabs.overthere.cifs.CifsFile - Opening CIFS input stream for \ec2-54-211-254-21.us-west-2.compute.amazonaws.com\C$\Windows\System32\inetsrv\config\applicationHost.config
com.xebialabs.overthere.RuntimeIOException: Cannot open \ec2-54-211-254-21.us-west-2.compute.amazonaws.com\C$\Windows\System32\inetsrv\config\applicationHost.config for reading: jcifs.smb.SmbException: Failed to connect: ec2-54-211-254-21.us-west-2.compute.amazonaws.com/54.211.254.21
jcifs.util.transport.TransportException: Connection timeout
at jcifs.util.transport.Transport.connect(Transport.java:174)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions