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
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
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.
@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
Views
Replies
Total Likes
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
Hope this helps!
Rohan Garg
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.
@Jörg_Hoh - Can you please help if we are missing any thing here ?
Thanks,
Pardeep Gera
Views
Replies
Total Likes
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.
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 ?
Views
Replies
Total Likes
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 ?
Views
Replies
Total Likes
the connection target for the HttpClient should be the hostname and port of your solr instance.
Thanks @Jörg_Hoh for the clarification.
Views
Replies
Total Likes
Views
Likes
Replies