Ask a Question

Cannot start mock service over https

albusua
Not applicable

Cannot start mock service over https

Hi,

I use 4.5.1 version.
I tried to start a mock service over https.

I created certificates using commands:

keytool -genkey -alias server -dname "CN=localhost, OU=X, O=Y, L=Z, S=XY, C=YZ" -keyalg RSA -keypass changeit -storepass changeit -keystore server.jks -storetype jks
keytool -export -alias server -storepass changeit -file server.cer -keystore server.jks
keytool -genkey -alias client -dname "CN=localhost, OU=X, O=Y, L=Z, S=XY, C=YZ" -keyalg RSA -keypass changeit -storepass changeit -keystore client.jks -storetype jks
keytool -export -alias client -storepass changeit -file client.cer -keystore client.jks
keytool -import -v -file server.cer -keystore client.jks -keypass changeit -storepass changeit
keytool -import -v -file client.cer -keystore server.jks -keypass changeit -storepass changeit

I configured SSL settings like on attached screenshot.
I created project. You can find it in attachments.
Then I started mock service.

When I submit the request to https://localhost:8443/mockIAccountInfo endpoint I have an error and following log

Wed Sep 26 11:43:07 EEST 2012:ERROR:Exception in request: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
Wed Sep 26 11:43:07 EEST 2012:ERROR:An error occured [Unrecognized SSL message, plaintext connection?], see error log for details
Wed Sep 26 11:43:07 EEST 2012:INFO:Error getting response for [IAccountInfo.getAvailableDataSources:Request 1]; javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

When I submit the request to http://localhost:8443/mockIAccountInfo endpoint I get response and the log

Wed Sep 26 11:44:21 EEST 2012:INFO:Got response for [IAccountInfo.getAvailableDataSources:Request 1] in 21ms (95 bytes)

Does it mean that mock service uses http instead of https? How can I start it over https?

Thank you.
Oleg.
3 REPLIES 3
exception
Occasional Contributor

I have the same problem here. Can anyone help us? By the way, I'm using soapUI 4.5.2. Thank you in advance!
andsoulnd
New Contributor

Have similar problem in version 5.0.

I've configured Mock SSL to run on port 8443 in Preferences->SSL Settings. But I am not able to start mock service to run on this port.
Such error occurs: ERROR:java.net.BindException: Address already in use: bind

If I start my mock service on different port, it works only as HTTP, not HTTPS.
Restarts, other ports - not helping. Did anybody have similar issues?
amitnimbhorkar
New Contributor

Hi All,

 

I am facing the same problem and exactly the same as @andsoulnd. Deos anybody have solution to it? @andsoulnd?

 

Regards,

Amit

cancel
Showing results for 
Search instead for 
Did you mean: