Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lokeshc915 opened this issue Feb 6, 2019 · 0 comments

Comments

@lokeshc915
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant