1

I'm new to wiremock, and I'm trying to use it to record the requests & responses of a java application. I am using standalone wiremock jar for this. Below is the command I am using

java -jar /jenkins/tools/wiremock-jre8-standalone-2.26.3.jar --proxy-all=http://server1:33898 --root-dir=src/main/resources/testRecordings/$tagName/recordings/${scenarioName} --port 9523 -verbose

Now http://server1:33898 is successful and page opens successfully, but for some reason http://server1:9523 does not load the page. I guess it means the wiremock server is not being created.

I did netstat -tuplen to check if the port is in listening status on server1. And I noticed that it was listening.

tcp6       0      0 :::9523                 :::*                    LISTEN      1000       418954126  39650/java 

Why is the wiremock server not getting created on port 9523 and http://server1:9523 not work despite giving --port option in java -jar code snippet above?

1 Answer 1

0

Are you able to load http://server1:9523/__admin ? Also, since you have --verbose, what port do you see once the Wiremock has started? Once it starts, it displays port number like below

enter image description here

2
  • server1:9523/__admin also does not load page. I am executing this wiremock jar from pipeline job of jenkins(server1 which is a jenkins agent). Thus, despite having --verbose, it does not display above shown verbose on jenkins. However, to troubleshoot further, I tried executing the same wiremock jar directly on server1 , and it did verbose out and it was displaying the right port 9523, but still page would not load and open.
    – usha duddu
    Commented Jul 27, 2020 at 2:50
  • It was a firewall issue, finally was able to reach the port 9523 on allowing it from firewall on server 1
    – usha duddu
    Commented Jul 27, 2020 at 22:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.