Expand my Community achievements bar.

SOLVED

Error while changing in service-users.yaml file

Avatar

Level 4

I have created one service users in service-users.yaml file and pushed the changes to the test environment.

But after deploying that into test environment got the below error. Can anyone help here as i am very new to this service user creation.

*ERROR* [OsgiInstallerImpl] biz.netcentric.cq.tools.actool.installhook.AcToolInstallHook Exception during execution of install hook: java.lang.IllegalArgumentException: Invalid yaml source file /jcr_root/apps/infra-core/acl-config/retail/config.ret/service-users.yaml: while parsing a block mapping\n in 'string', line 20, column 7:\n        - articles-service-user:\n        

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

After copying the yaml file in https://codebeautify.org/yaml-validator found 2 issues at line no 11(add space) and 32 (remove space) after correcting that the yaml file is validated properly. 

 

Screen Shot 2022-07-19 at 11.08.02 PM.png

 

 

View solution in original post

5 Replies

Avatar

Community Advisor

Hi,

See if there is any syntax errors in the file. yaml file will throw error if there are extra spaces or tabs space instead of normal space. 

 

If you can share full file then it will be easy to find the error which is throwing the above exception.

Avatar

Level 4
# Service users for Retail

- user_config:

    - articles-service-user:

        - name: Service User, Articles
          path: /content/dam
          isSystemUser: true
          
   - retailpublic-service-user:
   
        - name: Service User, Retail-Public
          path: /content/dam
          isSystemUser: true   
          
     


- ace_config:

    - articles-service-user:

        - path: /content
          permission: allow
          privileges: jcr:read
        
        - path: /var/retail
          permission: allow
          privileges: jcr:read,rep:write,jcr:versionManagement,jcr:lockManagement
          
     - retail-public-service-user:
      
        - path: /var/retail
          permission: allow
          privileges: jcr:read,jcr:write,crx:replicate  

Avatar

Correct answer by
Community Advisor

After copying the yaml file in https://codebeautify.org/yaml-validator found 2 issues at line no 11(add space) and 32 (remove space) after correcting that the yaml file is validated properly. 

 

Screen Shot 2022-07-19 at 11.08.02 PM.png

 

 

Avatar

Community Advisor

was it good on your local?

as @Ravi_Pampana asked, please attach your yaml to find any errors.

Also, please make sure you specify your ACl as a list.