18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
https website not coming up on browser with sahi proxy
Hi
I'm attempting to record and create tests for a https website.
However, when tried to launch the website with Sahi proxy running, the browser throws up the following:
Browser: Firefox 3.5.9
Secure Connection Failed
An error occurred during a connection to <website>.
Cannot communicate securely with peer: no common encryption algorithm(s).
(Error code: ssl_error_no_cypher_overlap)
On Sahi proxy console, I see the following exception as soon as I access the website url.
>>>> Sahi started. Listening on port: 9999
>>>> Configure your browser to use this server and port as its proxy
>>>> Browse any page and CTRL-ALT-DblClick on the page to bring up the Sahi Controller
Sahi OS properties file = C:\sahi\config\os.properties
java.io.EOFException
at java.io.DataInputStream.readInt(Unknown Source)
at sun.security.provider.JavaKeyStore.engineLoad(Unknown Source)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(Unknown Source)
at java.security.KeyStore.load(Unknown Source)
at net.sf.sahi.ssl.SSLHelper.getKeyManagerFactory(SSLHelper.java:104)
at net.sf.sahi.ssl.SSLHelper.createSocketFactory(SSLHelper.java:69)
at net.sf.sahi.ssl.SSLHelper.getSSLClientSocketFactory(SSLHelper.java:58)
at net.sf.sahi.ssl.SSLHelper.convertToSecureSocket(SSLHelper.java:189)
at net.sf.sahi.ssl.SSLHelper.convertToSecureServerSocket(SSLHelper.java:198)
at net.sf.sahi.ProxyProcessor.processConnect(ProxyProcessor.java:146)
at net.sf.sahi.ProxyProcessor.processAsProxy(ProxyProcessor.java:113)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:78)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Can you please help.
PS: I have created a file for the website under userdata/certs directory as described.
Thanks
Rajeev
I'm attempting to record and create tests for a https website.
However, when tried to launch the website with Sahi proxy running, the browser throws up the following:
Browser: Firefox 3.5.9
Secure Connection Failed
An error occurred during a connection to <website>.
Cannot communicate securely with peer: no common encryption algorithm(s).
(Error code: ssl_error_no_cypher_overlap)
On Sahi proxy console, I see the following exception as soon as I access the website url.
>>>> Sahi started. Listening on port: 9999
>>>> Configure your browser to use this server and port as its proxy
>>>> Browse any page and CTRL-ALT-DblClick on the page to bring up the Sahi Controller
Sahi OS properties file = C:\sahi\config\os.properties
java.io.EOFException
at java.io.DataInputStream.readInt(Unknown Source)
at sun.security.provider.JavaKeyStore.engineLoad(Unknown Source)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(Unknown Source)
at java.security.KeyStore.load(Unknown Source)
at net.sf.sahi.ssl.SSLHelper.getKeyManagerFactory(SSLHelper.java:104)
at net.sf.sahi.ssl.SSLHelper.createSocketFactory(SSLHelper.java:69)
at net.sf.sahi.ssl.SSLHelper.getSSLClientSocketFactory(SSLHelper.java:58)
at net.sf.sahi.ssl.SSLHelper.convertToSecureSocket(SSLHelper.java:189)
at net.sf.sahi.ssl.SSLHelper.convertToSecureServerSocket(SSLHelper.java:198)
at net.sf.sahi.ProxyProcessor.processConnect(ProxyProcessor.java:146)
at net.sf.sahi.ProxyProcessor.processAsProxy(ProxyProcessor.java:113)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:78)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Can you please help.
PS: I have created a file for the website under userdata/certs directory as described.
Thanks
Rajeev
Comments
Error code: ssl_error_no_cypher_overlap occurs when the certs file is not readable.
Could you delete and let Sahi recreate the file?
Regards,
Narayan
I tried that. It now says:
Sahi properties file = C:\sahi\config\sahi.properties
Sahi user properties file = C:\sahi\userdata\config\userdata.properties
>>>> Sahi started. Listening on port: 9999
>>>> Configure your browser to use this server and port as its proxy
>>>> Browse any page and CTRL-ALT-DblClick on the page to bring up the Sahi Controller
Sahi OS properties file = C:\sahi\config\os.properties
java.io.FileNotFoundException: ..\certs\sahi_example_com (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at net.sf.sahi.ssl.SSLHelper.getKeyManagerFactory(SSLHelper.java:98)
at net.sf.sahi.ssl.SSLHelper.createSocketFactory(SSLHelper.java:69)
at net.sf.sahi.ssl.SSLHelper.getSSLClientSocketFactory(SSLHelper.java:58)
at net.sf.sahi.ssl.SSLHelper.convertToSecureSocket(SSLHelper.java:189)
at net.sf.sahi.ssl.SSLHelper.convertToSecureServerSocket(SSLHelper.java:198)
at net.sf.sahi.ProxyProcessor.processConnect(ProxyProcessor.java:146)
at net.sf.sahi.ProxyProcessor.processAsProxy(ProxyProcessor.java:113)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:78)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
----
Client certificate not found: ../certs/sahi_example_com
----
It doesn't seem to create the certificate for the website being used.
Open sahi/userdata/bin/start_sahi.bat in some editor, and add this line at the start
PATH=C:\Path\To\Java\bin;%PATH%
so that it looks like
PATH=C:\Path\To\Java\bin;%PATH%
@ECHO OFF
SET SAHI_HOME=..\..
SET SAHI_USERDATA_DIR=..
SET SAHI_EXT_CLASS_PATH=
CALL %SAHI_HOME%\bin\sahi.bat
Restart using start_sahi.bat and the certificates should get generated correctly.
Make sure you change C:\Path\To\Java\bin to use the correct java/bin
Regards,
Narayan
I tried this too. But it complains with the same -
Client certificate not found: ../certs/sahi_example_com
I'm also pasting the automatic SSL keystore setting from the sahi.properties if that helps:
# For automatic SSL keystore creation.
ssl.auto_create_keystore=true
# Set the algorithm. Example: For Sun's JDK use SunX509, for IBM use IbmX509
#ssl.algorithm=SunX509
#ssl.password=sahipassword
# Full file path to keytool utility if not in the system path
# This is generally in the <java_home>/bin directory
#keytool.path=keytool
keytool.path="C:/Program Files/Java/jre6/bin/keytool.exe"
And I've also set the Java path earlier in sahi.bat under sahi/bin.
FYI.
Thanks
Rajeev
I would like to know how sahi supports Https sites. Please provide me the referrence if any. I had
gone through some of the forum posts but unable to get the complete picture.
Thanks in advance.
Best Regards,
Poola.
If you have added java/bin to the PATH, revert the keytool.path setting to
keytool.path=keytool
Let me know if that fixes your issue.
An explanation on the correct path:
On windows machines, you may need to use backslashes for the path (Windows 7 allows forward slashes).
C:\Program Files\Java\jre6\bin\keytool.exe
In a property file, the \ needs to be replaced with \\
C:\\Program Files\\Java\\jre6\\bin\\keytool.exe
Because of a bug in Sahi you needed to escape the backslashes again. (Fixed in the coming build)
C:\\\\Program Files\\\\Java\\\\jre6\\\\bin\\\\keytool.exe
Sahi automatically adds quotes around the path so don't add quotes.
So if you want to specify the path explicitly, change it to:
keytool.path=C:\\\\Dev\\\\Java\\\\jdk1.6.0_19\\\\bin\\\\keytool.exe
In the coming build, you should be able to specify with
keytool.path=C:\\Program Files\\Java\\jre6\\bin\\keytool.exe
Regards,
narayan
The website is now accessible via https and the controller too came up. Haven't started recording though. Thought I'll quickly update the issue.
Here are the few things that got me running:
sahi.properties:
ssl.password=sahipassword (uncomment if commented)
keytool.path=C:\\\\Program Files\\\\Java\\\\jre6\\\\bin\\\\keytool.exe
ssl.client.cert.path = ../userdata/certs/sahi_example_com (use your own domain here and the keytool will create the certificate)
start_sahi.bat in userdata/bin:
set PATH="C:\Program Files\Java\jre6\bin";%PATH%
And then ran SAHI from under userdata/bin - start_sahi.bat
ssl.client.cert.path = ../userdata/certs/sahi_example_com
is used to specify a client certificate while connecting to your web server. It does not affect creation of certificates.
If you are adding jre6\bin to the PATH, you need not specify it in keytool.path. You can leave it as
keytool.path=keytool
Regards,
Narayan