[Apiman-user] How to change base url of the gateway endpoint

Olivier ROZIER orozier at ac-dijon.fr
Tue Sep 5 10:28:06 EDT 2017


Hi Marc,

I think I did something wrong and I don't configure the right file 
"conf-es.json" because nothing happened.

When I install APIMAN, I followed these instructions : 
http://www.apiman.io/latest/download.html

Then, I created the API Implementation and I choose the Vert.x gateway 
in the list (there is also the default gateway which also exists)  as 
you can see below :


1) I have tried to change *hostname* and *publicEndpoint* in the file 
"apiman-1.3.1.Final/apiman-distro-verts-1.3.1.Final/configs/conf-es.json".

2) Then I restart APIMAN from the directory 
"apiman-1.3.1.Final/wildfly-10.1.0.Final" with the command : 
/./bin/standalone.sh -c standalone-apiman.xml/

3) Then I restart the gateway from the directory 
"apiman-distro-vertx-1.3.1.Final" with the command /./apiman-gateway.sh 
--conf=configs/conf-es.json /but the result is the same in the REST 
client. When I write this URL :

I have this result :

but when I try with the URL 
http://169.254.107.101:8080/apiman-gateway/Organisationfournisseurdese...... 
I have this result :

And in the response headers, there is nothing at all.

Nevertheless, I'm on the host where APIMAN is installed.

When I try a telnet with the IP address on the port 8080, it doesn't 
work but when I try with "localhost", it connects. However, it the same 
host.

I think something is wrong on my host because even if I don't start the 
Vert.x gateway with the command "/./apiman-gateway.sh 
--conf=configs/conf-es.json/" and I only start APIMAN, I get the good 
response in the REST client with "localhost" in the URL. Is it normal 
that there is no need to start the Vert.x gateway to the REST client 
return the good response?

Thank you for your help.

Olivier



Le 05/09/2017 à 14:26, Marc Savy a écrit :
> Hi Olivier,
>
> Does *hostname* not work for you:
>
> https://github.com/apiman/apiman/blob/master/distro/vertx/src/main/resources/overlay/configs/conf-es.json#L219
>
> You can also alter the reported endpoint with *publicEndpoint*:
>
> https://github.com/apiman/apiman/blob/master/distro/vertx/src/main/resources/overlay/configs/conf-es.json#L223
>
> It seems to work (on 1.3.1.Final, at least), but please verify and let 
> us know.
>
> Regards,
> Marc
>
> On 5 September 2017 at 07:32, Olivier ROZIER <orozier at ac-dijon.fr 
> <mailto:orozier at ac-dijon.fr>> wrote:
>
>     Hello Mark,
>
>     I forgot to say you that I use APIMAN 1.3.1.Final overlayfor
>     Wildfly 10 and APIMAN 1.3.1.Final Vert.x Gateway.
>
>     Thank you for your help.
>
>     Olivier
>
>
>     Le 04/09/2017 à 11:46, Marc Savy a écrit :
>>     Thanks for the clarification, that's helpful. I'll look into it
>>     and get back to you shortly.
>>
>>     Regards,
>>     Marc
>>
>>     On 4 September 2017 at 09:47, Olivier ROZIER <orozier at ac-dijon.fr
>>     <mailto:orozier at ac-dijon.fr>> wrote:
>>
>>         Hello Eric,
>>
>>         Thank you for your answer.
>>
>>         In fact, when I say "it doesn't work", I would say that there
>>         is no result in the client REST but also, there is no error
>>         message. I haven't got response in fact...
>>
>>         When I execute the command /netstat -ltanu/, I have this result :
>>
>>         As you can see, I have got the line 127.0.0.1:8080
>>         <http://127.0.0.1:8080> but I haven't got the line
>>         169.254.107.101:8080 <http://169.254.107.101:8080>
>>
>>         I think the problem comes from here but I don't know in which
>>         file I must specify the IP Address and the port
>>         (169.254.107.101:8080 <http://169.254.107.101:8080>).
>>
>>         Moreover, I haven't got firewall.
>>
>>         Do you understand better?
>>
>>         Thank you in advance for your help.
>>
>>         Olivier
>>
>>
>>
>>         Le 01/09/2017 à 17:56, Eric Wittmann a écrit :
>>>         When you say it "doesn't work" can you be more specific?  Is
>>>         the host unreachable or do you receive an error from the
>>>         Apiman server?
>>>
>>>         I'll assume that the host is simply unreachable and answer
>>>         that. :)
>>>
>>>         Marc will need to confirm, but I believe the vert.x server
>>>         automatically binds to 0.0.0.0 when it starts up, so I don't
>>>         think you should need to configure anything to bind to a
>>>         specific network host.
>>>
>>>         The only other thing I can think of is that your Ubuntu
>>>         system has a firewall enabled and that you need to open port
>>>         8080 on that firewall so that external TCP requests can be made.
>>>
>>>         https://help.ubuntu.com/stable/ubuntu-help/net-firewall-on-off.html
>>>         <https://help.ubuntu.com/stable/ubuntu-help/net-firewall-on-off.html>
>>>
>>>         -Eric
>>>
>>>         On Fri, Sep 1, 2017 at 10:39 AM, Olivier ROZIER
>>>         <orozier at ac-dijon.fr <mailto:orozier at ac-dijon.fr>> wrote:
>>>
>>>             Hello,
>>>
>>>             I would like to know how to change the first part of the
>>>             gateway endpoint.
>>>
>>>             In fact, the endpoint takes this form :
>>>
>>>             http://gatewayhostname:port/apiman-gateway/{organizationId}/{API ID}/{API version}/
>>>
>>>             When I try to access to this endpoint from a REST client on local host with this URL :
>>>             http://localhost:8080/apiman-gateway/
>>>             <http://localhost:8080/apiman-gateway/>{organizationId}/{API ID}/{API version}/
>>>
>>>             it works fine.
>>>
>>>             But when I try to access to this endpoint from a remote host with the IP address of the host where APIMAN and the gateway are installed like this :
>>>             http://172.56.56.123:8080/apiman-gateway/
>>>             <http://172.56.56.123:8080/apiman-gateway/>{organizationId}/{API ID}/{API version}/
>>>
>>>             it doesn't work.
>>>
>>>             APIMAN and the gateway (vert.x) are installed on the same ubuntu (ssh is activated).
>>>
>>>             Please, could you say me what file I can configure.
>>>
>>>             Thank you in advance.
>>>
>>>             Best regards.
>>>
>>>             -- 
>>>             		
>>>             Olivier ROZIER
>>>             Équipe nationale de développement et intégration
>>>             d'applications
>>>             Direction des Systèmes d'Information
>>>             DSI
>>>
>>>             Rectorat de Dijon
>>>             2G rue du Général Delaborde - 21000 Dijon
>>>
>>>             LD : 03 80 44 88 78 - Fax : 03 80 44 88 10
>>>             www.ac-dijon.fr <http://www.ac-dijon.fr>
>>>
>>>
>>>             Pensez à l'environnement avant d'imprimer ce message
>>>
>>>
>>>
>>>
>>>             _______________________________________________
>>>             Apiman-user mailing list
>>>             Apiman-user at lists.jboss.org
>>>             <mailto:Apiman-user at lists.jboss.org>
>>>             https://lists.jboss.org/mailman/listinfo/apiman-user
>>>             <https://lists.jboss.org/mailman/listinfo/apiman-user>
>>>
>>>
>>
>>         -- 
>>         		
>>         Olivier ROZIER
>>         Équipe nationale de développement et intégration d'applications
>>         Direction des Systèmes d'Information
>>         DSI
>>
>>         Rectorat de Dijon
>>         2G rue du Général Delaborde - 21000 Dijon
>>
>>         LD : 03 80 44 88 78 - Fax : 03 80 44 88 10
>>         www.ac-dijon.fr <http://www.ac-dijon.fr>
>>
>>
>>         Pensez à l'environnement avant d'imprimer ce message
>>
>>
>>
>>
>>         _______________________________________________
>>         Apiman-user mailing list
>>         Apiman-user at lists.jboss.org <mailto:Apiman-user at lists.jboss.org>
>>         https://lists.jboss.org/mailman/listinfo/apiman-user
>>         <https://lists.jboss.org/mailman/listinfo/apiman-user>
>>
>>
>
>     -- 
>     		
>     Olivier ROZIER
>     Équipe nationale de développement et intégration d'applications
>     Direction des Systèmes d'Information
>     DSI
>
>     Rectorat de Dijon
>     2G rue du Général Delaborde - 21000 Dijon
>
>     LD : 03 80 44 88 78 - Fax : 03 80 44 88 10
>     www.ac-dijon.fr <http://www.ac-dijon.fr>
>
>
>     Pensez à l'environnement avant d'imprimer ce message
>
>
>
>

-- 
		
Olivier ROZIER
Équipe nationale de développement et intégration d'applications
Direction des Systèmes d'Information
DSI

Rectorat de Dijon
2G rue du Général Delaborde - 21000 Dijon

LD : 03 80 44 88 78 - Fax : 03 80 44 88 10
www.ac-dijon.fr


Pensez à l'environnement avant d'imprimer ce message



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20170905/71f84567/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ljnkcnllcmnebalk.png
Type: image/png
Size: 10841 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/apiman-user/attachments/20170905/71f84567/attachment-0009.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bbgnkdbolnhbflai.png
Type: image/png
Size: 29662 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/apiman-user/attachments/20170905/71f84567/attachment-0010.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kpohooffghdadohh.png
Type: image/png
Size: 12767 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/apiman-user/attachments/20170905/71f84567/attachment-0011.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nngllbpincjclfok.png
Type: image/png
Size: 45549 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/apiman-user/attachments/20170905/71f84567/attachment-0012.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: afefophgmgmalphk.png
Type: image/png
Size: 36953 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/apiman-user/attachments/20170905/71f84567/attachment-0013.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bhklcpmmhlheaefm.png
Type: image/png
Size: 130924 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/apiman-user/attachments/20170905/71f84567/attachment-0014.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pfbjfbihimcikhcb.png
Type: image/png
Size: 207884 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/apiman-user/attachments/20170905/71f84567/attachment-0015.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 7667 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/apiman-user/attachments/20170905/71f84567/attachment-0016.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 248 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/apiman-user/attachments/20170905/71f84567/attachment-0017.png 


More information about the Apiman-user mailing list