Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

AEMaaCS Dedicated Egress IP

Avatar

Level 4

Hi all,

 

We have created a dedicated egress ip network infrastructure configuration for AEMaaCS program and trying to connect to SOLR server using AEM_PROXY_HOST and port orig.

Is there a way to find whether the request is going from the dedicated egress ip or not?

 

Thanks,

Pardeep

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

You don't need to read all these properties manually, the HttpClientBuilder can do that for you if you use the proper methods (as shown in the screenshot).

 

Also it seems that your solr URL looks like this: localhost:3128:URL/solr/...

Which seems really odd to me.

 

Please use the recommended way of 

HttpClients.createSystem() which reads all relevant information and sets them accordingly. And then you can connect to your Solr instance just by providing its URL; the proxy handling is completely transparent.

 

 

View solution in original post

8 Replies

Avatar

Community Advisor

@pardeepg4829047 i am assuming you are trying to push content from aem to solr so if the connection is not successful you could see ip address in solr logs, it should show IP within ingress range

Avatar

Community Advisor

Hi @pardeepg4829047,


You can refer to the below blog which mentions that by default not all HTTP clients use the dedicated egress IP. You might have to check whether your code is actually using the configured proxy.

@Jörg_Hoh's blog AEM CS & dedicated egress IP

 

Rohan_Garg_0-1716366870123.png

 

Hope this helps!
Rohan Garg

Avatar

Level 4

Hi Rohan,

 

We have used the proxy for the HttpClient and using HttpSolrClient.Builder(solrURL).withHttpClient(httpClient) to get the SOLR client.

Currently its not working and looking for help on what could be the issue.

 

Attaching below the code snippet used for creating the SOLRClient. Here core parameter refers to collection in SOLR server and urls array is the array of port origins like 30001, 30002.

 

pardeepg4829047_0-1716370559352.png

 

@Jörg_Hoh  - Can you please help if we are missing any thing here ?

 

Thanks,

Pardeep Gera 

Avatar

Correct answer by
Employee Advisor

You don't need to read all these properties manually, the HttpClientBuilder can do that for you if you use the proper methods (as shown in the screenshot).

 

Also it seems that your solr URL looks like this: localhost:3128:URL/solr/...

Which seems really odd to me.

 

Please use the recommended way of 

HttpClients.createSystem() which reads all relevant information and sets them accordingly. And then you can connect to your Solr instance just by providing its URL; the proxy handling is completely transparent.

 

 

Avatar

Level 4

Thanks @Jörg_Hoh for your inputs.

 

One query i have is - 

If my Solr server is running on http://10.20.30.40:8983/solr and my dedicated egress ip port forward mapping has the value like [10.20.30.40, dest:8983, origin: 30001]; In this case what Solr url should be used http://10.20.30.40:8983/solr or http://10.20.30.40:30001/solr ?

 

Below is the refactored code snippet i am using as per your previous suggestion. If i pass urls[0] as http://10.20.30.40:30001/solr , it does not work but if i pass urls[0] as  http://10.20.30.40:8983/solr, then only it is working. Shouldn't it work with portOrig instead of destination port ?

pardeepg4829047_0-1716514286110.png

 

 

Avatar

Level 4

Hi @Jörg_Hoh  - After creating HttpClient, while providing SOLR url for creating Solr connection - we should use port origin in SOLR url or the actual destination port ?

Avatar

Employee Advisor

the connection target for the HttpClient should be the hostname and port of your solr instance.