VirtServer - Troubleshooting

Applies to ReadyAPI 3.7, last modified on April 19, 2021

This topic describes various VirtServer issues and how to avoid and fix them.

VirtServer does not send responses

If a virtual service doesn’t respond to incoming requests, then, most probably, it is not running, or it doesn’t receive these requests. So, –

  • First of all, make sure you configured VirtServer and installed a license.

    Also, verify if VirtServer is able to run. If you run VirtServer as a service, make sure it is running.

  • Then, make sure that you deployed your virtual service to VirtServer and that the virtual service is running.

  • Check that the requests you send to the virtual service use the endpoint that matches the service’s URL:

    Virtual Service URL

    Click the image to enlarge it.

If this does not solve the issue, see the VirtServer log to determine possible problems. You can find the log file in the <user folder>/.readyapi/logs/ folder.

Here are a few more possible reasons why a virtual service doesn’t send expected responses:

  • If your virtual service is behind a proxy or firewall, then it’s quite possible that requests don’t reach the service. Check the proxy (or firewall) settings to ensure the virtual service is “visible” to clients.

  • One more reason is that VirtServer cannot find one or more third-party libraries which your scripts use (virtual services use scripts for conditional routing, for choosing the dispatch strategy, and for other tasks). Make sure you put the library files to the <VirtServer folder>/bin/ext folder.

  • If you use routing, then it’s possible that VirtServer cannot get a response from the service to which you route requests. Verify that this service is available and there are no misprints in its URL.

Database file lock

Sometimes, the virt-server.h2.h2.db file stays locked after rebooting the computer, which does not allow launching VirtServer. This usually happens if VirtServer closed unexpectedly.

There are several ways to handle this situation:

  • The following method suggests creating a simple startup script before trying to connect to a database file:

    1. Create the unlock.sql file in the following directory:

      <user home directory>/.readyapi/virt-server

    2. Add the following line to the file:

    3. Open the virt-server.yml file located in <user home directory>/.readyapi/virt-server.

    4. In the url field, specify the following line:

      jdbc:h2:file:~/.readyapi/virt-server/virt-server;INIT=runscript from '~/.readyapi/virt-server/unlock.sql'
      The virt-server.yml file

      Click the image to enlarge it.

    5. Save all the files you have edited and try to launch VirtServer. It should work properly.

  • Delete the virt-server.h2.h2.db file. VirtServer will recreate the file on startup thus fixing the issue, but all the configuration settings and working history will be lost. Not recommended.

Non-private connection issue

VirtServer works through the HTTPS protocol. By default, VirtServer comes with a self-signed security certificate, which modern browsers do not consider secure enough. So, they report about an insecure connection when you open the VirtServer web interface in a browser. The message you see depends on the browser you use, for example:

  • “Your connection is not private” in Chrome.

  • “Your connection is not secure” in Firefox.

  • “Safari cannot verify the identity of the website...” in Safari.

  • “Server Authentication. The server failed the authenticity check” in Konqueror.

  • “There is a problem with this website's security certificate. The security certificate presented by this website was not issued by a trusted certificate authority.” in Internet Explorer.

You can ignore this warning and continue working with the VirtServer web interface.


You can install a security certificate for your VirtServer instance to avoid the warning. To do this, see Use Custom SSL Certificates for VirtServer.

See Also

Different Ways of Running VirtServer
Use virtual services with data sources
Use Custom SSL Certificates for VirtServer

Highlight search results