Also, when running wiremock:latest, I see version ...
# help
d
Also, when running wiremock:latest, I see version 3.10.0, which seems older than 3.12.0
t
Thanks for reporting. Sounds like there’s an issue with the release script…
l
I just ran a local docker setup using
wiremock/wiremock:latest
and it ran with WireMock version
3.9.2
. I assume this is because the last time I ran with this image that version was the latest. If I delete that image locally and run again, it recognises there isn't an image and pulls down WireMock version
3.12.0
which is the latest version
d
NP. And as for my question?
@Tom earlier suggested there was a
\
missing, but I've added that now and it didn't solve the problem.
t
This works fine for me. Sometimes there can be a problem with more than one network adapter on your system binding to the same port number. Would be worth checking there isn’t something else also binding to 8080 and/or changing the port number you expose on your laptop.
d
Good idea. I'll try.
I changed it to
-p 8091:8080
en
sudo netstat -tulpen
doesn't show anything else on that port, but to the same result. Is there some way I can turn on extra logging to see what's going on?
l
I have a repo that I use when playing around with WireMock and docker - https://github.com/leeturner/wiremock-standalone-docker-example How does your setup compare to that ? Can you pull down the repo and give it a try to see if that works for you?
d
Thanks! I'll give it a try.
Well, the good thing is that your container gives me somewhat more information than the one I used earlier. So when I do the request:
Copy code
curl <http://localhost:8080/faker>
from one of your http files, I can see this in the container's console:
Copy code
Host: [localhost:8080]
User-Agent: [curl/8.5.0]
Accept: [*/*]
However, after a few seconds, I get the same time-out as earlier:
Copy code
curl: (7) Failed to connect to localhost port 8080 after 2 ms: Connection refused
l
I think the message in the containers console will be from the internal health check rather than your request. This is very strange and the problem appears local to your machine as that same request works for me. I am not sure what we can do to diagnose the issue. I think I would be tempted to remove docker from the equation for the time being and try running WireMock standalone via the jar file to see if you are able to get that to work. As a simple test, you can download the standalone jar from this page and run it using the following command:
Copy code
java -jar wiremock-standalone-3.12.0.jar
You can then try and hit the server -
curl <http://localhost:8080>
Given we haven't configured any stubs, there should be a message in the console where you are running WireMock that says:
Copy code
No response could be served as there are no stub mappings in this WireMock instance.
Also, can you add a
-v
to your curl command to get more output and add the output for the request that is refused here in this thread
d
Yes, you're right. I got some help from my team, and it is now solved.
l
Just out of interest, what was the issue?
d
Hard to say. They pointed me to some readme which basically did what I already did, and just out of hopelessness I followed the steps. I must just have missed something last time.
l
OK, glad it is sorted either way
👍 1