Selenium packages not available from nagios repository

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
piktoy
Posts: 24
Joined: Fri Jul 06, 2012 10:13 am

Selenium packages not available from nagios repository

Post by piktoy »

Hi,

Can check with this packages, one of the requirements to download is not available from repositories, kindly advise.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Selenium packages not available from nagios repository

Post by lmiltchev »

Try this link:
http://assets.nagios.com/downloads/nagi ... .06.tar.gz

There were some bad links in the documentation. They should be fixed now. Let us know if you have any more issues.
Be sure to check out our Knowledgebase for helpful articles and solutions!
piktoy
Posts: 24
Joined: Fri Jul 06, 2012 10:13 am

Re: Selenium packages not available from nagios repository

Post by piktoy »

Hi

Thank you, manage to download and compile the packages successfully, but encounter error when trying to rung the script.

Please help :(

[root@150 selenium]# telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.

[root@150 selenium]# perl LIFEHUBPERL
Error requesting http://localhost:4444/selenium-server/driver/:
Failed to start new browser session: Error while launching browser
# Looks like your test died before it could output anything.

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

[root@150 selenium]# java -jar selenium-server-standalone-2.25.0.jar
Sep 19, 2012 8:41:20 AM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
08:41:41.543 INFO - Java: Sun Microsystems Inc. 20.0-b11
08:41:41.551 INFO - OS: Linux 2.6.18-194.el5 i386
08:41:41.592 INFO - v2.25.0, with Core v2.25.0. Built from revision 17482
08:41:42.039 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
08:41:42.042 INFO - Version Jetty/5.1.x
08:41:42.045 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
08:41:42.047 INFO - Started HttpContext[/selenium-server,/selenium-server]
08:41:42.047 INFO - Started HttpContext[/,/]
08:41:42.126 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@1549f94
08:41:42.126 INFO - Started HttpContext[/wd,/wd]
08:41:42.171 INFO - Started SocketListener on 0.0.0.0:4444
08:41:42.171 INFO - Started org.openqa.jetty.jetty.Server@d6c16c
08:42:09.624 INFO - Checking Resource aliases
08:42:09.637 INFO - Command request: getNewBrowserSession[*chrome, https://elogin.lifeisgreat.com.sg/] on session null
08:42:09.644 INFO - creating new remote session
08:42:09.829 INFO - Allocated session 16b7316d154b44e2bb76301cf7bce5dc for https://elogin.lifeisgreat.com.sg/, launching...
jar:file:/usr/local/selenium/selenium-server-standalone-2.25.0.jar!/customProfileDirCUSTFFCHROME
08:42:10.002 INFO - Preparing Firefox profile...
08:42:30.142 ERROR - Failed to start new browser session, shutdown browser and clear all session data
java.lang.RuntimeException: Timed out waiting for profile to be created!
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChromeLauncher.java:308)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.populateCustomProfileDirectory(FirefoxChromeLauncher.java:120)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:90)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchRemoteSession(FirefoxChromeLauncher.java:347)
at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:399)
at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:143)
at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:104)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:811)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:437)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:407)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:151)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:914)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
08:42:30.159 INFO - Got result: Failed to start new browser session: Error while launching browser on session null
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Selenium packages not available from nagios repository

Post by scottwilkerson »

This looks like it couldn't open a firefox session. I'm going to have the person who wrote our Selenium docs take a look at this..
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Selenium packages not available from nagios repository

Post by slansing »

Have you attempted to use:

Code: Select all

*firefox
Instead of the Chrome browser for the script's launch options. Chrome "as stated in the documentation" is a special version of Firefox you may not have? When creating this documentation only Firefox standard was used for testing as it is the most readily available browser cross platform.

Can you post your custom selenium script here? Blocking out sensitive information.
piktoy
Posts: 24
Joined: Fri Jul 06, 2012 10:13 am

Re: Selenium packages not available from nagios repository

Post by piktoy »

Hi,

i registered from a customer support index, but i was not able to post a topic? i cant find the new topic button to post, please assist
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Selenium packages not available from nagios repository

Post by scottwilkerson »

If you have purchased XI please contact [email protected] with your customer ID to get your forum username added to the customer list in the forum
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
piktoy
Posts: 24
Joined: Fri Jul 06, 2012 10:13 am

Re: Selenium packages not available from nagios repository

Post by piktoy »

scottwilkerson wrote:If you have purchased XI please contact [email protected] with your customer ID to get your forum username added to the customer list in the forum
Thank you, will email the customer id to [email protected], will you be able to help me on this error, recorded and playback from selenium ide no error, however when i try the command

Code: Select all

[root@nagmine selenium]# perl lifehub2
ok 1 - open, /sso/jsp/login.jsp?site2pstoretoken=v1.2~D0DE34AC~0DAD980CAA8D3F8823AA41E9297A2548D41C0AFF65F24DA4BC66B24F55F906294301056F418AFB275414263951B218A0CD800C6B41CCB2962895651425A028BBEC74AA8C809D2B89AFAE24AFCD2E2C859EDEFABD4CE61EEEE19A9A5E1FD82B6299E62BB205DDE24312658E0AD8A49FF44F1BCBD6DB47D574780691045CC60C93F227F06F489C6CF14447DF564FC2C06DC26673D08231E9C30F5B1D9CBCAE8D26F2F0C63CE52C46B078D9083ED4A01E4F97623F03038738FEBC16A1AFF6D09225B24169F89D72D9BA&p_error_code=&p_submit_url=https%3A%2F%2Furl.com%2Fsso%2Fauth&p_cancel_url=http%3A%2F%2Furl.com&ssousername=
ok 2 - type, name=ssousername, userid
ok 3 - type, name=password, password
ok 4 - click, id=btn_submit
ok 5 - wait_for_page_to_load, 30000
[b]# Error requesting http://localhost:4444/selenium-server/driver/:
# ERROR: Element id=OTP not found
not ok 6 - click, id=OTP[/b]
[b]#   Failed test 'click, id=OTP'
#   at lifehub2 line 18.[/b]
==========================================

Code: Select all

[root@nagmine selenium]# cat lifehub2
use strict;
use warnings;
use Time::HiRes qw(sleep);
use Test::WWW::Selenium;
use Test::More "no_plan";
use Test::Exception;

my $sel = Test::WWW::Selenium->new( host => "localhost", 
                                    port => 4444, 
                                    browser => "*firefox", 
                                    browser_url => "https://url.com/" );

$sel->open_ok("/sso/jsp/login.jsp?site2pstoretoken=v1.2~D0DE34AC~0DAD980CAA8D3F8823AA41E9297A2548D41C0AFF65F24DA4BC66B24F55F906294301056F418AFB275414263951B218A0CD800C6B41CCB2962895651425A028BBEC74AA8C809D2B89AFAE24AFCD2E2C859EDEFABD4CE61EEEE19A9A5E1FD82B6299E62BB205DDE24312658E0AD8A49FF44F1BCBD6DB47D574780691045CC60C93F227F06F489C6CF14447DF564FC2C06DC26673D08231E9C30F5B1D9CBCAE8D26F2F0C63CE52C46B078D9083ED4A01E4F97623F03038738FEBC16A1AFF6D09225B24169F89D72D9BA&p_error_code=&p_submit_url=https%3A%2F%2Furl.com%2Fsso%2Fauth&p_cancel_url=http%3A%2F%2Furl.com&ssousername=");
$sel->type_ok("name=ssousername", "userid");
$sel->type_ok("name=password", "password");
$sel->click_ok("id=btn_submit");
$sel->wait_for_page_to_load_ok("30000");
$sel->click_ok("id=OTP");
$sel->wait_for_page_to_load_ok("30000");
$sel->type_ok("id=OTIP", "123456");
$sel->click_ok("id=OTP");
$sel->wait_for_page_to_load_ok("30000");
WAIT: {
    for (1..60) {
        if (eval { $sel->is_element_present("link=Home") }) { pass; last WAIT }
        sleep(1);
    }
    fail("timeout");
}
=====================

selenium ide source:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="https://url.com/" />
<title>New Test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">New Test</td></tr>
</thead><tbody>
<tr>
	<td>open</td>
	<td>/sso/jsp/login.jsp?site2pstoretoken=v1.2~D0DE34AC~0DAD980CAA8D3F8823AA41E9297A2548D41C0AFF65F24DA4BC66B24F55F906294301056F418AFB275414263951B218A0CD800C6B41CCB2962895651425A028BBEC74AA8C809D2B89AFAE24AFCD2E2C859EDEFABD4CE61EEEE19A9A5E1FD82B6299E62BB205DDE24312658E0AD8A49FF44F1BCBD6DB47D574780691045CC60C93F227F06F489C6CF14447DF564FC2C06DC26673D08231E9C30F5B1D9CBCAE8D26F2F0C63CE52C46B078D9083ED4A01E4F97623F03038738FEBC16A1AFF6D09225B24169F89D72D9BA&p_error_code=&p_submit_url=https%3A%2F%2Furl.com%2Fsso%2Fauth&p_cancel_url=http%3A%2F%2Furl.com&ssousername=</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>name=ssousername</td>
	<td>userid</td>
</tr>
<tr>
	<td>type</td>
	<td>name=password</td>
	<td>password</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>id=btn_submit</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>id=OTP</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>id=OTIP</td>
	<td>123456</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>id=OTP</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>link=Home</td>
	<td></td>
</tr>

</tbody></table>
</body>
</html>
======================================
selenium ide logs;

Code: Select all

[info] Executing: |open | /sso/jsp/login.jsp?site2pstoretoken=v1.2~D0DE34AC~0DAD980CAA8D3F8823AA41E9297A2548D41C0AFF65F24DA4BC66B24F55F906294301056F418AFB275414263951B218A0CD800C6B41CCB2962895651425A028BBEC74AA8C809D2B89AFAE24AFCD2E2C859EDEFABD4CE61EEEE19A9A5E1FD82B6299E62BB205DDE24312658E0AD8A49FF44F1BCBD6DB47D574780691045CC60C93F227F06F489C6CF14447DF564FC2C06DC26673D08231E9C30F5B1D9CBCAE8D26F2F0C63CE52C46B078D9083ED4A01E4F97623F03038738FEBC16A1AFF6Durl.com&ssousername= | |
[info] Executing: |type | name=ssousername | <userid> |
[info] Executing: |type | name=password | <password> |
[info] Executing: |clickAndWait | id=btn_submit | |
[info] Executing: |clickAndWait | id=OTP | |
[info] Executing: |type | id=OTIP | 123456 |
[info] Executing: |clickAndWait | id=OTP | |
[info] Executing: |waitForElementPresent | link=Home | |
Last edited by scottwilkerson on Fri Mar 29, 2013 8:52 am, edited 3 times in total.
Reason: wrapped in code
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Selenium packages not available from nagios repository

Post by slansing »

Have you attempted the addition of "Pause on Fail" to the IDE? Without it, the IDE may spin it's wheels until a timeout value is met.. please have a look at this firefox addon:

https://addons.mozilla.org/en-us/firefo ... enium-ide/

This seems to be more an issue on the IDE's end and not your test case script. I am curious to see how this addon will play out once you add it.
piktoy
Posts: 24
Joined: Fri Jul 06, 2012 10:13 am

Re: Selenium packages not available from nagios repository

Post by piktoy »

Hi

Same thing, after installing the addons power debugger, no problem on ide recorder but when running this command,
how will i resolve this is urgent on our production applications monitoring.

[root@nagmine selenium]# perl <filename>
ok 1 - open, /sso/jsp/login.jsp?site2pstoretoken=v1.2~D0DE34AC~B94869D5078F6E4E8DB56999AC4315594A0CA947E3523D6E8202EA86395F8856B9803672829ABDCD003AD0DFDA86CEE9367EDBEAA14616DF3AC7AFFA868192B5D699327998FD5A002E6E2BF3DD651A5AA7E500AA4E1D83F3800AD6A8269E0A4389FB4A1B0E1D1A9D99D3784C5B75D632101361ACAF2C6276881EB5DD692BDC100B04E88BFCA813642D888D0A28289DD8D12F1B2A6FC2EFBC77238CA89DF8E41F6531529D2873F69A73FA9067A9A66259E7158F42344E7DC27AB5D3DCCBBD0AB731E963DD3A47EECA&p_error_code=&p_submit_url=https%3A%2F%2Frul.com%2Fsso%2Fauth&p_cancel_url=http%3A%2F%2Furl.com&ssousername=
ok 2 - type, name=ssousername, userid
ok 3 - type, name=password, password
ok 4 - click, id=btn_submit
ok 5 - wait_for_page_to_load, 30000
# Error requesting http://localhost:4444/selenium-server/driver/:
# ERROR: Element id=OTP not found
not ok 6 - click, id=OTP
# Failed test 'click, id=OTP'
# at lifehub5 line 18.
# Error requesting http://localhost:4444/selenium-server/driver/:
# Timed out after 30000ms
not ok 7 - wait_for_page_to_load, 30000
# Failed test 'wait_for_page_to_load, 30000'
# at lifehub5 line 19.
# Error requesting http://localhost:4444/selenium-server/driver/:
# ERROR: Element id=OTIP not found
not ok 8 - type, id=OTIP, 123456
# Failed test 'type, id=OTIP, 123456'
# at lifehub5 line 20.
# Error requesting http://localhost:4444/selenium-server/driver/:
# ERROR: Element id=OTP not found
not ok 9 - click, id=OTP
# Failed test 'click, id=OTP'
# at lifehub5 line 21.
# Error requesting http://localhost:4444/selenium-server/driver/:
# Timed out after 30000ms
not ok 10 - wait_for_page_to_load, 30000
# Failed test 'wait_for_page_to_load, 30000'
# at lifehub5 line 22.
1..10
# Looks like you failed 5 tests of 10.
[root@nagmine selenium]#
You do not have the required permissions to view the files attached to this post.
Locked