Failed to connect IPC port : Access denied error is coming when running tests from remote machine

Ask general questions here.
meharsudha
Posts: 5
Joined: Thu Sep 20, 2018 2:28 pm

Failed to connect IPC port : Access denied error is coming when running tests from remote machine

Post by meharsudha » Tue Sep 25, 2018 8:31 am

Hi ,

We have ranorex tests on one machine and we want to run the tests from other remote machine within network using command line for example
cmd - /c C:\Automation\xxx\xxx\xx\bin\Debug\xx.exe /zr /zrf:C:\xxReports\xx.html from powershell script.
It is throwing error Failed to connect to an IPC port: Access is denied for some controls in the test.
This error only appear when we run from remote machine. When we run the tests from same machine (where we have tests) via this command line it runs and able to generate reports also.

We have followed this link " failed-to-instrument-wpf-process-t12282.html " to solve this IPC port problem but there is no change in our case.

Can someone help us how to solve this error . What is the root cause of it? Please refer to attachment for error details .Please reply ASAP . Request to support team.
Attachments
IPCPort.png
IPCPort.png (81.76 KiB) Viewed 113 times

Shakib
Posts: 31
Joined: Tue Jan 06, 2015 7:22 am

Re: Failed to connect IPC port : Access denied error is coming when running tests from remote machine

Post by Shakib » Tue Sep 25, 2018 9:51 am

Hi,

You can try to run/ execute ranorex test script on ranorex agent through parent machine instead of doing through remote desktop.

Regards,
Shakib

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Failed to connect IPC port : Access denied error is coming when running tests from remote machine

Post by odklizec » Tue Sep 25, 2018 10:02 am

Hi,

Agree with Shakib. You should either consider using Ranorex remote execution (8.3 will support command line remote execution) or something more sophisticated and much more reliable in a long term run, like Jenkins, Bamboo or similar continuous integration solution.

As for your problem, it's hard to tell what's wrong without seeing the entire power shell command line you are using. My guess is that the test is started with insufficient rights? Have you examined Ranorex user guide, regarding WPF instrumentation problems?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

meharsudha
Posts: 5
Joined: Thu Sep 20, 2018 2:28 pm

Re: Failed to connect IPC port : Access denied error is coming when running tests from remote machine

Post by meharsudha » Tue Sep 25, 2018 10:42 am

Hi,
This is our requirement to run tests from other machine . We need it for continuous integration.
We have one machine where CCNet is installed where no ranorex installation is there. We need to run from this machine to other machine where our tests should run using runtime license.
Regarding to rights we have given administrator rights for ranorex(Automating ) and Automated application (our windows application) and also to powershell from where it will trigger.
The powershell script will have remote session entry line and only this line cmd - /c C:\Automation\xxx\xxx\xx\bin\Debug\xx.exe /zr /zrf:C:\xxReports\xx.htmlremote which will enter to the session , run the test and put the report in the reports folder.

We have gone through user guide for WPF instrumentation problem we have also followed those steps but no use

Ranorex agent needs ranorex studio to run which wont serve our purpose as we need to run tests with runtime license. when will this access denied error will come any idea?

Thanks
Sudha

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Failed to connect IPC port : Access denied error is coming when running tests from remote machine

Post by odklizec » Tue Sep 25, 2018 11:37 am

Hi,

What happens, is you run the test directly on that machine? Does it work? Simply connect to the machine (via RD) and start the exe manually. If it still does not work, then there is something missing or improperly configured.

At next, I would personally recommend to install Ranorex Studio on the target machine. If for nothing else, then for debugging purposes. You see, at some point, the test you developed on one machine may fail on runtime machine. So you will have to debug it there ;) And no, running tests on machine with installed Studio should not eat your Studio license. Just make sure the license type is set to Auto or Runtime. In both cases, if you simply run the test (without opening Studio), Ranorex should pickup the runtime license.

I'm using Continuous integration too and I have no need for using remote sessions and powershell. Everything is managed from continuous integration software (Jenkins). My jobs are configured to build the tests at 'build' machine and then copy the bin and data artifacts to 'test' machine, where the test is also started. Everything is managed by Jenkins job. I'm using one for build and another for test (per each test). So if you need to use powershell and RD (which is unreliable and must stay open during running the test), you should maybe consider a different continuous integration solution? ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

meharsudha
Posts: 5
Joined: Thu Sep 20, 2018 2:28 pm

Re: Failed to connect IPC port : Access denied error is coming when running tests from remote machine

Post by meharsudha » Tue Sep 25, 2018 1:35 pm

Hi ,
We are following CCNet for continuous integration for all other automation projects. So, we cant change it for now. Yes, Jenkins and teamcity is having smooth process for integrating ranorex projects. It would be good if Ranorex team can provide us a easy and good steps for integrating ranorex projects for CCNet also in guide or forum or a webinar.

Now, i have changed my approach from Remote machine to same machine. But i want to run tests from CCNet (installed on same machine )which trigger powershell script to run the tests ( .exe) on same machine.
In this case CCNet and ranorex tests are on same machine. When i run it now IPC port : Access denied is not coming.

But report is showing black screens now and not able to find the elements. VM on which tests are running is not locked and no screen saver and even changed the properties of CCnet service to interact with desktop. Why this black screen is coming ?why it is not able to identify the elements from ccnet? Is this because automated and automating process are running in background ? If so how to solve this? Refer attachment for black screen report .

Thanks for your reply
Sudha
Attachments
BlackScreenError.png
BlackScreenError.png (33.75 KiB) Viewed 85 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Failed to connect IPC port : Access denied error is coming when running tests from remote machine

Post by odklizec » Tue Sep 25, 2018 2:41 pm

Hi,

Black screenshot means that Ranorex does not have access to desktop. The most probably reason is, that CCNet is running as a windows service, which is a big nono! Apps started as windows service does not have enough privileges to access the desktop. So you must find another way how to run ccnet server. Please check the Jenkins integration guide...
https://www.ranorex.com/#ci-tool
It may not directly help with CCNet integration, but it should give some direction.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration