Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Dispatcher SymLinks Configurations

Avatar

Level 7

Hi AEM Community,

 

The issue with symlinks has been frequently raised and discussed.

Blog Reference - https://medium.com/tech-learnings/aem-dispatcher-configurations-symlinks-8f52f554ffa5

 

I would like to discuss my use case as well - 

 

1. I created symlinks on my windows machine using "mklink src target" utility.

However, I got the below error - 

 

2022/07/29 18:16:54 Dispatcher configuration validation failed:
/tmp/dispatcher/unzippedConfiguration/conf.dispatcher.d/enabled_farms/abc.farm: appears to be a windows (pseudo) symlink but this OS does not support these. Please commit a correct symlink: ../available_farms/abc.farm
The command '/bin/sh -c AZCOPY="/usr/bin/azcopy" VALIDATOR_BINARY="/usr/bin/dispatcher-configuration-validator" HTTPD_BINARY="/usr/sbin/httpd" DISPATCHER_CONFIGURATION_LOCATION=$dispatcherConfigurationLocation DISPATCHER_CONFIGURATION_DESTINATION=$dispatcherConfigurationDestination DISPATCHER_IMAGE=$dispatcherImage RUN_MODE=$runmode ./validateDispatcherConfiguration.sh' returned a non-zero code: 2
2022/07/29 18:16:54 Container failed during run: validate-dispatcher. No retries remaining.
failed to run step ID: validate-dispatcher: exit status 2

 

How can we create symlinks for Cloud/linux based OS on windows machine ?

 

2. Used Debian WSL-2 compatibility layer

I was able to create the symlinks using Debian however I had the issue of authentication in pushing the changes to remote.

My credentials were not authorized (Read somewhere that for two factor authentication it doesn't work)

So I committed the changes using Debian interface and pushed it using windows shell.

Still I got the same error.

 

Can you please help on how to proceed as I seem to be unable to create symLinks that would work on cloud ?

 

Thanks,

Rohan Garg

1 Accepted Solution

Avatar

Correct answer by
Level 7

Hi All,

 

I was able to resolve the issue by pushing symlinks created on Ubuntu WSL to my remote repo.

To summarize - 

In AEM RELEASE:

2022.6.7904.20220629T070041Z
 
The symlinks created on windows machine and pushed to cloud give the below error - 
/tmp/dispatcher/unzippedConfiguration/conf.dispatcher.d/enabled_farms/default.farm: appears to be a windows (pseudo) symlink but this OS does not support these. Please commit a correct symlink: ../available_farms/default.farm
 
The fix was to generate symlink on WSL application (Debian, Ubuntu both work).
Pushing the commit to azure https remote repo won't work using your normal login credentials.
You will have to generate git credentials (auto generated tokens) to push the changes.
Hope this helps!
 

View solution in original post

3 Replies

Avatar

Level 7

Hi Santosh,

 

Thanks for the reply. Yes, I have already visited this link.

The solution there by @Sean-McK suggested the below - 

So I got on Ubuntu WSL and did a symlink and commited it and it worked.

 

I am able to create symlinks via WSL such as Debian or Ubuntu but am not able to commit it to repo.

My usual authorization fails. This might be due to enabled 2 factor authentication.

 

If I try to create the symlinks via WSL and commit, then push from windows interface I still get the same error as the one in question.

 

Thanks for your time and consideration.

 

Best Regards,

Rohan Garg

Avatar

Correct answer by
Level 7

Hi All,

 

I was able to resolve the issue by pushing symlinks created on Ubuntu WSL to my remote repo.

To summarize - 

In AEM RELEASE:

2022.6.7904.20220629T070041Z
 
The symlinks created on windows machine and pushed to cloud give the below error - 
/tmp/dispatcher/unzippedConfiguration/conf.dispatcher.d/enabled_farms/default.farm: appears to be a windows (pseudo) symlink but this OS does not support these. Please commit a correct symlink: ../available_farms/default.farm
 
The fix was to generate symlink on WSL application (Debian, Ubuntu both work).
Pushing the commit to azure https remote repo won't work using your normal login credentials.
You will have to generate git credentials (auto generated tokens) to push the changes.
Hope this helps!