Forum Discussion

mscott426's avatar
mscott426
Occasional Contributor
15 years ago

loadUI EC2 Agent access

I have a loadUI test case that runs on a local agent - an agent exe started from the command line. I have an ec2 loadUI agent instance instantiated from ami-e220d48b. The loadUI test does not run at all if I have the distributed ec2 agent active rather than the ghost agent. I see the system log going by in the system/agent pane but nothing that makes sense. One core thing that looks missing is any kind of ssh key setting.

Is there a field in the agent setup somewhere that I can tell the agent what key or username/password to use for ec2 connection?

7 Replies

  • mscott426's avatar
    mscott426
    Occasional Contributor
    Henrik,

    I did read the loadUI distributed test section. It was sufficiently informative to get me as far as I am. The light was red, dark or light I can't tell. I rebooted the ec2 agent instance and re-ran the tests. Now with the ec2 agent they do run but each fails immediately. Using the ghost agent the tests still pass.

    When I began using a local agent running on my mac the tests failed on the local agent but ran ok on the ghost agent. I could see the agent log on my terminal and it failed due to not finding the file associated with a DataSource of type file. I changed the DataSource type to a grid and those local-agent tests now pass.

    Is there something else that may not be compatible with the ec2 agent? I use java script steps, datasource loops, and several soap requests. Where does the system log file end up that loadUI displays? Possibly I can get a clue if I can read that log file slowly in more detail.

    Any pointers would be appreciated.

    Thanks,
    Mike.
  • mscott426's avatar
    mscott426
    Occasional Contributor
    Henrik,
    Yes you did respond to my support email. However, as I stated, I still have the problem.

    I saw another post that described an issue with inconsistent MD5 hash file errors and reference to file conversion errors. I had seen similar errors so I upgraded to the recent nightly build as recommended.I also had to upgrade the loadUI components on various machines due to incompatibilities with the released version and the nightly builds. I upgraded the agent in my existing ec2 instance. I upgraded my loadUI on both my windows laptop and my Linux EC2 loadUI controller instance. I verified that the EC2 security group allows ssh on port 443. I upgraded the agent on my local linux vm machine which always works. The lights on all of my agents are bright red.

    I created a new project with one simple test step in the soapUI open source edition. I added wireshark to my laptop and watched the request go out and return from the endpoint while using linux vm agent hosted on my laptop. As I cannot see the EC2 agent with wireshark, I ran a curl command from the EC2 agent machine’s command line to ensure that at least http requests could go out through both the EC2 and fedora firewalls and return. I started this agent from the command line to watch the output. The ec2 soapui.log file lists no problem. The agent display shows the project loading, shows the reset command and shows the action event that started the test, but it shows no error. The test simply fails.

    My questions then are what have I missed and how can I get visibility into what else takes place within the EC2 agent?

    19:18:01,898 INFO [ControllerImpl] Client disconnected
    19:18:01,899 INFO [ControllerImpl] Stopping scene: TestCase
    19:18:01,899 INFO [SoapUIProjectLoader] Releasing soapUI project [Sonos loadui testing]
    19:19:34,985 INFO [ControllerImpl] Loading SceneItem 9f0e7a5e-8f7d-4a21-b51d-60a092fd8810
    19:19:34,986 DEBUG [ControllerImpl] REQUESTING DEFINITION: 9f0e7a5e-8f7d-4a21-b51d-60a092fd8810 from: com.eviware.loadui.impl.messaging.BayeuxServiceServerEndpoint$MessageEndpointImpl@5a5622
    19:19:35,998 INFO [HttpClientSupport$Helper] Updating keyStore..
    19:19:36,000 INFO [ControllerImpl] Started scene: TestCase
    19:19:36,553 DEBUG [SoapUISamplerComponent] Setting soapUI project to /root/.loadui/fileStorage/9b01b4036d841ab23a992f7f0d84e445
    19:19:36,554 INFO [SoapUIProjectLoader] Caching soapUI project at [/root/.loadui/fileStorage/9b01b4036d841ab23a992f7f0d84e445]
    19:19:36,556 INFO [WsdlProject] Loaded project from [file:/root/.loadui/fileStorage/9b01b4036d841ab23a992f7f0d84e445]
    19:19:36,563 DEBUG [SoapUISamplerComponent] Setting soapUI TestSuite to SonosSoap TestSuite
    19:19:36,563 DEBUG [SoapUISamplerComponent] Setting soapUI TestCase to getSessionId TestCase
    19:19:36,563 DEBUG [SoapUISamplerComponent] TestCase set to getSessionId TestCase.
    19:19:36,604 INFO [DefaultSoapUICore] Importing preferences from [/root/.loadui/fileStorage/4408c75a1bf795efb3f2e144060f9084]
    19:19:36,606 INFO [HttpClientSupport$Helper] Updating keyStore..
    19:19:36,606 INFO [DefaultSoapUICore] Importing preferences from [/root/.loadui/fileStorage/4408c75a1bf795efb3f2e144060f9084]
    19:19:36,607 INFO [HttpClientSupport$Helper] Updating keyStore..
    19:19:52,784 DEBUG [ControllerImpl] Got command: actionEvent
    19:19:52,785 DEBUG [ModelItemImpl] Triggering action 'RESET' on ModelItem 'SceneItemImpl[label=TestCase]'
    19:20:10,878 DEBUG [ControllerImpl] Got command: actionEvent
    19:20:10,878 DEBUG [ModelItemImpl] Triggering action 'SAMPLE' on ModelItem 'ComponentItemImpl[label=soapUI Runner]'
  • Hi,

    The WSDL should be cached in the soapUI project file, and thus shouldn't be a problem. We ran the tests you sent us, and from what we can tell, they seem to work (the getSessionId TestCase seems to run fine, verified with Wireshark). I did this using two different desktop computers in our office, one running loadUI and one running the loadUI Agent. In distributed mode I click on "Run Once" on the soapUI Runner, the "Running" count goes to 1 and a few moments later, the "Completed" count increments and "Running" goes back down to 0. What exactly is happening when you try to run it? Specifically what do the counters show in the display on the soapUI Runner? I'll see if I can get access to our EC2 instance to do some more testing later today.

    Regards,
    Dain
    eviware.com
  • mscott426's avatar
    mscott426
    Occasional Contributor
    Dain,

    When I run using two computers in my office I get the same good behavior that you do. When I run against an ec2 instance and press "Run Once" on the soapUI Runner, the Running count goes to one and within two seconds the Running count goes to zero, the Completed count goes to one and the Failed count goes to one.

    Thanks for looking into this.
    Mike.
  • Ok, I've tested it using EC2, and I am able to reproduce the failure you're getting. Using the table log component, configured to write to a log file, I was able to find the problem:


    [[Schema Compliance]
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.]","11:10:47:837","Cancelling due to failed test step"


    It seems that the soapUI Runner initializes the embedded soapUI engine as if though there was a UI, which causes some parts of it to fail if no UI is present. Since soapUI is designed to be able to run in a headless environment this should be pretty easy for us to fix. We just need to make sure to launch it in the correct mode. For now you can disable the "Schema Compliance" assertion and the test succeeds, but obviously that's not a very desirable solution, and other parts of your test may fail due to the same reason. I'll look into getting this fixed pretty soon. Thanks for providing us with enough information to locate the cause of the bug!

    Regards,
    Dain
    eviware.com