# "No matching host could be found!" - All host are connect to one ssh server with different port

**URL:** <https://forum.ansible.com/t/no-matching-host-could-be-found-all-host-are-connect-to-one-ssh-server-with-different-port/30730>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [July 9, 2019, 7:16am UTC](https://forum.ansible.com/t/no-matching-host-could-be-found-all-host-are-connect-to-one-ssh-server-with-different-port/30730 "2019-07-09T07:16:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ondrej\_Fuchs](https://avatars.discourse-cdn.com/v4/letter/o/9e8a1a/32.png) [@Ondrej\_Fuchs](https://forum.ansible.com/u/Ondrej_Fuchs)\
**Post date:** [July 9, 2019, 7:16am UTC](https://forum.ansible.com/t/no-matching-host-could-be-found-all-host-are-connect-to-one-ssh-server-with-different-port/30730/1 "2019-07-09T07:16:11Z")

</div>

##### SUMMARY

If I ask to AWX server to PROVISIONING CALLBACK by host1 with curl (curl -vv --data “host\_config\_key=aec14601575ea619a149ec1d59b72686” http://IP\_address:80/api/v2/job\_templates/8/callback/), I get

- {“msg”:“No matching host could be found!”}

##### STEPS TO REPRODUCE

Our infrastructure:

host1 (with real IP 195.250.143.180) ; host2 ; host3 are connected to ssh server “[my.sshserver.com](http://my.sshserver.com)”(same but with different port). AWX run on different server.

Every host has setup:

- ansible\_port: 30001 (for host1)
- ansible\_host: [same.hostforevery.com](http://same.hostforevery.com)

If I ask to AWX server to PROVISIONING CALLBACK by host1 with curl (curl -vv --data “host\_config\_key=aec14601575ea619a149ec1d59b72686” http://IP\_ADDRESS:80/api/v2/job\_templates/8/callback/), I get

- {“msg”:“No matching host could be found!”}

In awx logs is task with IP address of host1 (for example 35.204.175.71, but I need [same.hostforevery.com:30001](http://same.hostforevery.com:30001))

If I run curl on ssh server ([same.hostforevery.com](http://same.hostforevery.com)), I get:

- {“msg”:“Multiple hosts matched the request!”}

I also tried:  
curl -v -H “REMOTE\_ADDR: [my.sshserver.com:10020](http://my.sshserver.com:10020)” -H “REMOTE\_HOST: host1” --data “host\_config\_key=aec14601575ea619a149ec1d59b72686” [http://admin:password@IP\_ADDRESS:80/api/v2/job\_templates/8/callback/](http://admin:password@ip_address/api/v2/job_templates/8/callback/)

But AWX still get request from real host IP 195.250.143.180, but to resolve it I should have [my.sshserver.com:30001](http://my.sshserver.com:30001)

##### EXPECTED RESULTS

I need somehow add in to curl or to different way to say awx server that host1 is on address [same.hostforevery.com:30001](http://same.hostforevery.com:30001). Playbook should by run on host1.

##### ACTUAL RESULTS

- {“msg”:“No matching host could be found!”}

---

<div class="post-metadata">

**Author:** ![sdmorel](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sdmorel](https://forum.ansible.com/u/sdmorel)\
**Post date:** [July 9, 2019, 9:40am UTC](https://forum.ansible.com/t/no-matching-host-could-be-found-all-host-are-connect-to-one-ssh-server-with-different-port/30730/2 "2019-07-09T09:40:59Z")

</div>

Hi,

Can you check if your playbook has **hosts: all** or it’s pointing to a specific host or group?

Regards,  
Sergio

---

<div class="post-metadata">

**Author:** ![Ondrej\_Fuchs](https://avatars.discourse-cdn.com/v4/letter/o/9e8a1a/32.png) [@Ondrej\_Fuchs](https://forum.ansible.com/u/Ondrej_Fuchs)\
**Post date:** [July 9, 2019, 1:13pm UTC](https://forum.ansible.com/t/no-matching-host-could-be-found-all-host-are-connect-to-one-ssh-server-with-different-port/30730/3 "2019-07-09T13:13:43Z")

</div>

In my playbook I have only one host like:

- hosts: host1
