Expand my Community achievements bar.

SOLVED

Docker Image Error

Avatar

Community Advisor

Hi All,

 

I have set up a docker image pointing to my publish instance.

Previously the setup was running fine as when I hit localhost:8080 it rendered content from publish instance.

 

But lately I get 502 error though no changes have been made. Here are the logs - 

[05/Jul/2022:07:45:34 +0000] "GET /content/xyz/us/en/home-page.html HTTP/1.1" 502 none [publishfarm/-] 54054ms "localhost:8080"
[Tue Jul 05 07:47:00.946021 2022] [dispatcher:warn] [pid 65:tid 140116585622328] [client 172.17.0.1:51476] Unable to connect socket to host.docker.internal:4507: Operation timed out
[Tue Jul 05 07:47:00.946227 2022] [dispatcher:warn] [pid 65:tid 140116585622328] [client 172.17.0.1:51476] Unable to connect to any backend in farm publishfarm
[Tue Jul 05 07:47:11.957133 2022] [dispatcher:warn] [pid 65:tid 140116585622328] [client 172.17.0.1:51476] Unable to connect socket to host.docker.internal:4507: Operation timed out
[Tue Jul 05 07:47:11.957233 2022] [dispatcher:warn] [pid 65:tid 140116585622328] [client 172.17.0.1:51476] Unable to connect to any backend in farm publishfarm
[Tue Jul 05 07:47:22.968211 2022] [dispatcher:warn] [pid 65:tid 140116585622328] [client 172.17.0.1:51476] Unable to connect socket to host.docker.internal:4507: Operation timed out
[Tue Jul 05 07:47:22.968280 2022] [dispatcher:warn] [pid 65:tid 140116585622328] [client 172.17.0.1:51476] Unable to connect to any backend in farm publishfarm
[Tue Jul 05 07:47:33.979010 2022] [dispatcher:warn] [pid 65:tid 140116585622328] [client 172.17.0.1:51476] Unable to connect socket to host.docker.internal:4507: Operation timed out
[Tue Jul 05 07:47:33.979121 2022] [dispatcher:warn] [pid 65:tid 140116585622328] [client 172.17.0.1:51476] Unable to connect to any backend in farm publishfarm

 

rohangargTA_0-1657007487814.png

 

Please note the publish instance is rendering content correctly so its not an issue on the AEM end I think.

rohangargTA_0-1657007794058.png

 

Could you please help troubleshoot this issue ?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

 @Rohan_Garg 

It is clear from the error that you shared that docker is not getting the response from the 4507 port server and unable to server the content. Can you please below points 

  1. Validate your dispatcher configurations.
  2. Check if there is not shorten URL implementation done
  3. 3. I see that docker is up and running that means it is able to communicate to 4507 port but unable to server the content.
  4. 4. Login to the docker terminal and clear the cache and try once again 
  5. Try starting a new publisher with a new port and configure a sample artifact project (Step by step put the dispatcher code as well) run  it in the docker.
    1. If it works then issue is with your code
    2. If it doesn’t work then issue is with the docker.

I advise you to check on point 5. But ideally all the above points are like a steps to debug and validate the issue. Hope this works for you

 

View solution in original post

10 Replies

Avatar

Correct answer by
Community Advisor

 @Rohan_Garg 

It is clear from the error that you shared that docker is not getting the response from the 4507 port server and unable to server the content. Can you please below points 

  1. Validate your dispatcher configurations.
  2. Check if there is not shorten URL implementation done
  3. 3. I see that docker is up and running that means it is able to communicate to 4507 port but unable to server the content.
  4. 4. Login to the docker terminal and clear the cache and try once again 
  5. Try starting a new publisher with a new port and configure a sample artifact project (Step by step put the dispatcher code as well) run  it in the docker.
    1. If it works then issue is with your code
    2. If it doesn’t work then issue is with the docker.

I advise you to check on point 5. But ideally all the above points are like a steps to debug and validate the issue. Hope this works for you

 

Avatar

Community Advisor

Hi Jagdeep,

 

Thanks for the reply. Here are the results from your checkpoints

1. The dispatcher configuration is correct. I restarted the publish instance and had the socket timeout error correct automatically. The error comes up intermittently for some reason hence the dispatcher configurations should not be an issue here.

2. There is no URL shortening done yet.

3. Yes, the issue seems to be on docker end but the dispatcher configuration is validated and the watchers are also established every time.

4. I have I navigated to the cache path and ran a "rm -rf*" to remove all the cache. Still the error persisted when the socket was timed out.

5. With new publish instance the error is not coming up yet. But the intermittent error coming up is still unexplained. I think maybe the publish when remaining idle for sometime might be throwing up this error but for now its unexplained.

Avatar

Community Advisor

Hi @Rohan_Garg ,  as per your logs Docker might not be the issue, its the Dispatcher which is unable to reach publish instance even though it's in your local machine. So check your Dispatcher configurations for publish instance hostname & port. something looks like this.  

 

Read this page for more info on dispatcher 

 

~Aditya.Ch

 

 # The load will be balanced among these render instances
    /renders
      {
      /rend01
        {
        # Hostname or IP of the render
        /hostname "127.0.0.1"
        # Port of the render
        /port "4507"
        }
      }

 

Thanks,

Aditya Chabuku

Avatar

Community Advisor

Hi Aditya,

 

Thanks for your reply. I have put up the render URL of the localhost as suggested.

But the issue does not seem to be at that end.

 

Thanks,

Rohan Garg

Avatar

Level 3

Hey @Rohan_Garg  have you got the solution for it ? I too getting this issue for long time , plz let me know once you get the solution.
ANd why did they mark @Jagadeesh_Prakash  comments as answered ? even though it is not resolved .

Avatar

Community Advisor

Hi @ganeshbyalebrillio, Its been sometime since this issue got fixed. I recall setting up the instance again and then running through the docker setup again. I haven't encountered the issue since then! Hope this helps!

Avatar

Community Advisor

@Rohan_Garg can you give me the list of steps or reference URL which you are following to run the dispatcher. We might need more insight about the issue. 

 

It is a pretty stright farward setup that we do and i am able to run docker with the default package provided by SDK. Please refer to below URL

 

https://bimmisoi.blogspot.com/2021/05/local-dispatcher-setup-aem-as-cloud-on.html

 

https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/local-development-env...

https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/local-development-env...

If u are still facing this issue, try running the docker with default dispatcher config and put your project related configurations one after the other and see what is causing the issue. 

 

if still the issue exists DM me to my inbox

Avatar

Community Advisor

@Jagadeesh_Prakash - Thank you for your response and references!
The issue is no longer an issue. It's been sometime since this issue was last reported.
I recall resetting the instance which solved the problem!

Avatar

Community Advisor

I am also facing similar issue. As mentioned by @Rohan_Garg this seems to be an intermittent issue. No steps mentioned below help resolve it. I am also looking for a permanent solution. 

Avatar

Level 3

If you get any SSLHandshake error in error log of the publish instance then it is definetely proxy server issue, which is set up by your organisation.