Probirdas Respected Contributor.
Respected Contributor.
1464 views

HP OO copy file windows to windows

Hi team,

 

I am not able to copy file using Remote sucre copy or FS copy between two windows servers. "I am getting connection refused error".  Using remote copy

protocol : scp,

port 22

Is thee any ports or service should be open for copying??

What is the best operation for copying file and required parameters?

How can we execute VB scripts?

 Below is the error.

==============

{exception=com.jcraft.jsch.JSchException: java.net.ConnectException: Connection refused: connect
at com.jcraft.jsch.Util.createSocket(Util.java:349)
at com.jcraft.jsch.Session.connect(Session.java:215)
at com.jcraft.jsch.Session.connect(Session.java:183)
at com.iconclude.dharma.commons.security.ssh.DefaultSSHSessionCreator.createSession(DefaultSSHSessionCreator.java:75)
at com.iconclude.dharma.commons.security.ssh.SSHOperation.exec(SSHOperation.java:71)
at com.opsware.pas.content.commons.remoteCopy.ScpCopier.getFile(ScpCopier.java:49)
at com.opsware.pas.content.commons.remoteCopy.ScpCopier.getFile(ScpCopier.java:64)
at com.opsware.pas.content.commons.remoteCopy.SimpleCopier.copyTo(SimpleCopier.java:45)
at com.iconclude.content.actions.Remote.RemoteCopyAction.execute(RemoteCopyAction.java:193)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.hp.oo.sdk.plugins.abstracts.BaseActionPlugin.execute(BaseActionPlugin.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.hp.oo.maven.PluginAdapterImpl.executePlugin(PluginAdapterImpl.java:328)
at com.hp.oo.maven.PluginAdapterImpl.execute(PluginAdapterImpl.java:248)
at com.hp.oo.execution.control.actions.contentexecution.ContentExecutionActions.executeContentAction(ContentExecutionActions.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at io.cloudslang.worker.execution.reflection.ReflectionAdapterImpl.executeControlAction(ReflectionAdapterImpl.java:62)
at io.cloudslang.worker.execution.services.ExecutionServiceImpl.executeStep(ExecutionServiceImpl.java:326)
at io.cloudslang.worker.execution.services.ExecutionServiceImpl.execute(ExecutionServiceImpl.java:80)
at io.cloudslang.worker.management.services.SimpleExecutionRunnable.executeRegularStep(SimpleExecutionRunnable.java:167)
at io.cloudslang.worker.management.services.SimpleExecutionRunnable.run(SimpleExecutionRunnable.java:120)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at io.cloudslang.worker.management.services.WorkerThreadFactory$1.run(WorkerThreadFactory.java:33)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at com.jcraft.jsch.Util.createSocket(Util.java:343)
... 35 more
;returnCode=-1;returnResult=java.net.ConnectException: Connection refused: connect;sessionId=;Result=java.net.ConnectException: Connection refused: connect;}

 

Regards,

Uday

Labels (1)
0 Likes
8 Replies
EASJosh Respected Contributor.
Respected Contributor.

Re: HP OO copy file windows to windows

Hi Uday,

I recommend using "FS Copy Inter Machines" (/Base/Library/Operations/File System/Windows Only/FS Copy Inter Machines) if it's a Windows -> Windows copy.

Cheers,
Josh


--------------------------------------
If my post helped you, please click the 'Kudos' button.
0 Likes
Probirdas Respected Contributor.
Respected Contributor.

Re: HP OO copy file windows to windows

Hi ,

 

Thank you for your reply. I have used the same operation as you mentioned for FS copy. And also  used another two operateions as below ,  Getting same error.

Are there any pre-requisites like port and protocol

base->library->operations->remote file transfer

Remote copy

Remote secure copy

 

copy.JPGcopy1.JPG

 

 

0 Likes
EASJosh Respected Contributor.
Respected Contributor.

Re: HP OO copy file windows to windows

Hi,

The fact that your Remote Command Execution is succeeding should mean that the RAS has valid permissions to contact the server and execute commands, which is odd. I've never had an issue before as long as the machine is in the same domain, and has the correct firewall permissions.

Are you able to disable to firewall on the machine temporarily to ensure this is not the issue?

Following on from this, can you also confirm the inputs you're using, and share the specific error message when using the FS Copy Inter Machines.

Cheers,
Josh


--------------------------------------
If my post helped you, please click the 'Kudos' button.
0 Likes
Probirdas Respected Contributor.
Respected Contributor.

Re: HP OO copy file windows to windows

Hi ,

 

Thank you for prompt response. Firewall is off on Both windows servers. I am just tring to copy file from my desktop to another windows server from where my OO studio is located. User credetials are same on both windows.

Do I need to check any pre-requisites ?? regarding ports or protocol.

Can you explain  , How/when can we mention protocols like SCP , FTP, LOCAL  as in the description of the operation

 

 

firewall.JPGFS.JPG

0 Likes
EASJosh Respected Contributor.
Respected Contributor.

Re: HP OO copy file windows to windows

If the firewall is switched off there should be no need to check any ports or protocols.

"Access is denied" generally shows that the machine can be contacted, and the issue lies with the credentials.

I can't test it myself right now, but if I remember rightly, the username needs to be in <domain>\<username> format, IE computername\nordicsa or domain\nordicsa, depending if this user is a domain user or local admin.

Cheers,
Josh


--------------------------------------
If my post helped you, please click the 'Kudos' button.
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: HP OO copy file windows to windows

Hi, 

The access denied message could be in part triggered by windows's UAC (user access control) triggering unexpectedly, on newer windows versions even if the UAC slider is all the way down it is not 100% disabled (you can google how to fully disable it for your specific OS version). Now a couple of things you can try in order to make sure that you are not being messed arround with by  UAC is the following:

- run studio expressly as administrator (right click on the shortcut and select run as administrator). 

- try copying to a "safe" location such as c:\temp (windows for some reason has a more relaxed aproach to that folder). 

Make sure to also use the latest base CP release so that in case there were any fixes on that operation you have them. (i tested the fs copy inter machines operation between a windows 2012r2 and windows 2008  server using base cp 1.9.1 and encountered no problems).

Regards,

Vlad

0 Likes
MOAS Absent Member.
Absent Member.

Re: HP OO copy file windows to windows

Hello Uday,

Hope you are using the operation 'FS Copy Inter Machines- windows only.

I just tried to replicate the same what you have done and worked perfectly for me.

Could you please make sure about the following things.

1. In the operation you dont need to pass any protocol and port number

2. The source and destination path shold be shared.

3.Destination and source path should be in the format of 'mySharedFolder\folderToBeCopied', i can see you have given the complete path.make sure that the whole path is shared.

4. Give the username including the domain

Please check the attachment for your reference.

Regards

Aswina

0 Likes
scuda20 Super Contributor.
Super Contributor.

Re: HP OO copy file windows to windows

In addtion, you may want to look under the OO 10.22 documents for Windows_Remote_Operations_v1.0.pdf and HTTPS_Remote_powershell_for_dummies_v1_0.pdf. I don't know if FS Copy  Inter Machines dotNETWebActions uses wmi or regular windows file sharing methods but RCE use wmi.

Just a suggestion but on my vm templates, I created a c:\patch that is shared out to everyone during deployment in order to make automation easier for any transfers and then go in and delete that share and folder as the last step.

I have found working with W2K3 -> W2K12 and all the clients that you can get a variety of errors ranging from "No route to host", "Connection Refused" and "Failed to run", most of the time it is due to credentials either bad user/pass or double hop where you need CredSSP vs negotiate, etc..

Another way to do multiple transfers that I have found easier is to put a file share on my Windows RAS, then use PS in my flow on the end node to pull/transfer files and folders. You could do the same from Studio. Something like this

cd C:\patch; Net Use M: \\${OO_WRAS_MGMT_IP}\patch /USER:${oouser} ${oopass}; Copy-Item -Path M:\packages\gpo\${domainShort} -Recurse; Net Use M: /delete;

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.