18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Need desperate help with running sahi suite via ant

NewYorker123NewYorker123 Members
edited June 2013 in Sahi - Open Source
No matetr what I do, I am unable to run sahi suite using firefox. I will extremely appreciate if someone can guide me in the right direction:

Firefox version: 21.0
Sahi Version: install_sahi_v43_20130206

Set Up:

Computer Name: tester

User Variable's
SAHI_HOME = C:\Sahi
SAHI_USERDATA_DIR=C:\Sahi\userdata

C:\>ant -f c:\Sahi\demo.xml
Buildfile: c:\Sahi\demo.xml
sahitests:
start:
ff:
runfftests:
[sahi]
[sahi] suiteName = C:\Sahi\userdata\scripts\demo\demo.suite
[sahi] base = http://tester/console
[sahi] sahiHost = tester
[sahi] port = 9999
[sahi] threads = 6
[sahi] browserType = firefox
[sahi] this.isSingleSession == false
[sahi] Added shutdown hook.
[sahi] http://tester:9999/_s_/dyn/Suite_start?suite=C:\Sahi\userdata\scripts\demo\demo.suite&base=http://tester/console&threads=6&sahisid=sahi_ad69703f0ba53042920ab6f089376ca9dbf0&browserType=firefox&
html=
[java] Sahi properties file = C:\Sahi\config\sahi.properties
[java] Sahi user properties file = C:\Sahi\userdata\config\userdata.properties
[java] Added shutdown hook.
[java] ---
[java] --- ERROR: Port 9999 is already being used ---
[java] ---
[parallel] STATUS:FAILURE

failsahi:
BUILD FAILED
c:\Sahi\demo.xml:32: The following error occurred while executing this line:
c:\Sahi\demo.xml:46: The following error occurred while executing this line:
c:\Sahi\demo.xml:66: The following error occurred while executing this line:
c:\Sahi\demo.xml:71: Sahi tests failed!

Total time: 17 seconds
Shutting down ...

C:\>ant -f c:\Sahi\demo.xml
Buildfile: c:\Sahi\demo.xml
sahitests:
start:
ff:
runfftests:
[sahi]
[sahi] suiteName = C:\Sahi\userdata\scripts\demo\demo.suite
[sahi] base = http://tester/console
[sahi] sahiHost = tester
[sahi] port = 9999
[sahi] threads = 6
[sahi] browserType = firefox
[sahi] this.isSingleSession == false
[sahi] Added shutdown hook.
[sahi] http://tester:9999/_s_/dyn/Suite_start?suite=C:\Sahi\userdata\scripts\demo\demo.suite&base=http://tester/console&threads=6&sahisid=sahi_8c0dada50e78f046580b93f011ae40becebd&browserType=firefox&
html=
[java] Sahi properties file = C:\Sahi\config\sahi.properties
[java] Sahi user properties file = C:\Sahi\userdata\config\userdata.properties
[java] Added shutdown hook.
[java] ---
[java] --- ERROR: Port 9999 is already being used ---
[java] ---
[parallel] STATUS:SUCCESS

failsahi:
stopsahi:
stopsahi:
BUILD SUCCESSFUL
Total time: 19 seconds
Shutting down ...
Connection refused: connect


Project:

http://www.filedropper.com/sahi

Answers

  • Hi NewYorker123,
    It seems that your port 9999 is already in use when trying to launch Sahi.
    Please try the following steps:

    1) Open command prompt window and run the command: netstat -a -n -o. This will display a list of processes.
    2) Look for the process running on port 9999 and take a note of its PID.
    3) Open Task manager and End the process with the noted PID. If you dont have PID as a column, right click on any of the existing columns and you'll get the option to include it.
    4) Restart Sahi.

    This should solve our problem. If it still persists, please let me know.
  • This morning I started fresh with a new machine with high hopes of finally able to run suites via ant but I am getting no where :(. I am not sure what else I need to do to get this thing to work. below are all my detail

    Sahi version: install_sahi_v43_20130206
    Firefox: 21.0
    =========================
    Check out sahi @ C:\Sahi

    1) Create User Variable:

    SAHI_HOME=C:\Sahi
    SAHI_USERDATA_DIR=C:\Sahi\userdata

    2) Modify sahi/htdocs/spr/concat.js as per link below:

    http://sahi.co.in/forums/discussion/4779/firefox-20-0-giving-issues-to-anyone/p1

    3) Configure Firefox Browser Proxy as per:

    http://sahi.co.in/w/configure-browser-proxy

    4) Modify: C:\Sahi\config\sahi.properties

    ff.profiles.max_number=10 To ff.profiles.max_number=1 (This way only 1 profile will be used)

    5) C:\Sahi\config\userdata_template\config\userdata.properties
    ext.http.proxy.port=808 to ext.http.proxy.port=9999
    Out put:

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Windows\system32>ant -f c:\Sahi\demo.xml
    Buildfile: c:\Sahi\demo.xml

    sahitests:

    startsahi:

    run-ff-tests:
    [sahi]
    [sahi] suiteName = C:\Sahi\userdata\script\demo\demo.suite
    [sahi] base = http://localhost/console
    [sahi] sahiHost = localhost
    [sahi] port = 9999
    [sahi] threads = 3
    [sahi] browser = C:\Program Files (x86)\Mozilla Firefox\firefox.exe
    [sahi] browserOption = -profile C:\Sahi\userdata\browser\ff\profiles\sahi$threadNo -no-remote
    [sahi] browserProcessName = firefox.exe
    [sahi] this.isSingleSession == false
    [sahi] Added shutdown hook.
    [sahi] http://localhost:9999/_s_/dyn/Suite_start?suite=C:\Sahi\userdata\script\demo\demo.suite&base=http://localhost/console&threads=3&sahisid=sahi_950c94ce0d063049ac0a0d301411943b15ca&browser=C:\
    Program+Files+%28x86%29%5CMozilla+Firefox%5Cfirefox.exe&browserProcessName=firefox.exe&browserOption=-profile+C%3A%5CSahi%5Cuserdata%5Cbrowser%5Cff%5Cprofiles%5Csahi%24threadNo+-no-remote&html=
    [java] Sahi properties file = C:\Sahi\config\sahi.properties
    [java] Sahi user properties file = C:\Sahi\userdata\config\userdata.properties
    [java] Added shutdown hook.
    [sahi] java.net.ConnectException: Connection refused: connect
    [sahi] at java.net.DualStackPlainSocketImpl.connect0(Native Method)
    [sahi] at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:69)
    [sahi] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    [sahi] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
    [sahi] at org.apache.tools.ant.taskdefs.Parallel$TaskRunnable.run(Parallel.java:435)
    [sahi] at java.lang.Thread.run(Thread.java:722)
    [sahi] STATUS:FAILURE

    stopsahi:
    [java] >>>> Sahi started. Listening on port: 9999
    [java] >>>> Configure your browser to use this server and port as its proxy
    [java] >>>> Browse any page and CTRL-ALT-DblClick on the page to bring up the Sahi Controller
    [java]
    [java] Reading browser types from: C:\Sahi\userdata\config\browser_types.xml
    [java]
    [java] Jun 04, 2013 5:43:22 PM net.sf.sahi.ssl.SSLHelper getKeyManagerFactoryForRemoteFetch
    [java] INFO: No SSL Client Cert specified
    [java] Java Result: 1

    BUILD SUCCESSFUL
    Total time: 4 seconds
    Shutting down ...
    Connection refused: connect

    C:\Windows\system32>


    Project: http://www.filedropper.com/sahi_1

    I would really appreciate if someone can have look at my full project & let me know what is going on.

    Thanks.
  • SuveerPSuveerP Members
    heyo -

    any luck on this? - let me know - i'll guide you where i can
Sign In or Register to comment.