Expand my Community achievements bar.

Missing farm in multiple domain dispatcher

Avatar

Level 3
Hi everybody.

We are having some problems configuring our cloud environment with a multidomain dispatcher. The problem seems to be that the dispatcher is reading the publishfarm configuration instead of the domain it belongs to.

Here is the configuration

In browser I type "www.digital.net"

In dispatcher log I can see

Found farm publishfarm for www.digital.net
Thu Jan 18 07:38:51.715727 2024 [dispatcher:debug] checking [/content/digital/digital---global/es/home/jcr:content.getpublications.json]
Thu Jan 18 07:38:51.715784 2024 [dispatcher:debug] cachefile does not exist: /mnt/var/www/html/content/digital/digital---global/es/home/jcr:content.getpublications.json
Thu Jan 18 07:38:51.715791 2024 [dispatcher:debug] try to create new cachefile: /mnt/var/www/html/content/digital/digital---global/es/home/jcr:content.getpublications.json
Thu Jan 18 07:38:51.715797 2024 [dispatcher:debug] cache-action for [/content/digital/digital---global/es/home/jcr:content.getpublications.json]: CREATE
Thu Jan 18 07:38:51.715864 2024 [dispatcher:debug] Filter rule entry /0001 blocked 'GET /content/digital/digital---global/es/home/jcr:content.getpublications.json HTTP/1.1'

As you can see the request is reading publishfarm instead digitalfarm, so is blocking some petitions that are allowed in my customized filter file.

My configuration is as follow

Directory conf.dispatcher.d

* dispatcher.any
-------------------------------------------------------------------------------
#
# This is a file provided by the runtime environment and only included for
# illustration purposes.
#
# DO NOT EDIT this file, your changes will have no impact on your deployment.
#

/farms {
    # Include all *.farm files in enabled_farms
    $include "enabled_farms/*.farm"
}


* /virtualhost/001_digital_vhost.any
---------------------------------------------------------------------------------

* /enabled_farms/001_digital.farm
---------------------------------------------------------------------------------
/digitalfarm {
        ## client headers which should be passed through to the render instances
        ## (feature supported since dispatcher build 2.6.3.5222)
        /clientheaders {
                $include "../clientheaders/001_digital_clientheaders.any"
                $include "../clientheaders/default_clientheaders.any"
        }
        ## hostname globbing for farm selection (virtual domain addressing)
        /virtualhosts {
                $include "../virtualhosts/001_digital_vhosts.any"
        }
        ## the load will be balanced among these render instances
        /renders {
                $include "../renders/default_renders.any"
        }
        ## only handle the requests in the following acl. default is 'none'
        ## the glob pattern is matched against the first request line
        /filter {
                $include "../filters/001_digital_filters.any"
        }

Directory conf.d

* /enabled_vhosts/001_digital.vhost
-----------------------------------------------------------------------------------

## Collect any enviromental variables that are set in /etc/sysconfig/httpd
## Collect the dispatchers number
PassEnv DISP_ID

<VirtualHost *:80>
        ServerName      "publish_digital"
        ## Put names of which domains are used for your published site/content here,                
        ServerAlias "www.digital.net"

        .................

Can anybody tell me what am I missing?????

Thank you.
Topics

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

2 Replies

Avatar

Level 1

Hi Katmandu25,

As per the log you shared, it looks like you are trying to access the path with selectors and extensions. I got a similar issue with the servlet registered with the resource type. This might be due to dispatcher rules not being deployed even though execute the full stack pipeline. Add the below rule in the dispatcher farm file( "../filters/001_digital_filters.any") then run the dispatcher pipeline(web tier) and check.

/xxxx { /type "allow" /path "/content/*" /selectors "getpublications" /extension "json"}

We can add a method as well if needed.

 

Thanks,

SS

Avatar

Level 3

Hi Suresh.

 

Thank you for your response.

 

First of all I don´t think so the problem is in filters file, in fact we have the following rules on it

 

/0075 { /type "deny" /url "/content*" /suffix "*" }
/0076 { /type "deny" /url "/content*" /selectors "*" }
/0077 { /type "allow" /url "/content/digital/*" /selectors "*"}
/0078 { /type "allow" /url "/content/digital/*" /suffix "*"}
/0079 { /type "allow" /url "/content/dam/digital/*" /selectors "*"}
/0080 { /type "allow" /url "/content/dam/digital/*" /suffix "*"}

Even if a I "force" to use the right farm, the website works OK.

 

If you see the log I shared, I think publishfarm is the key:

 

Found farm publishfarm for www.digital.net
Thu Jan 18 07:38:51.715727 2024 [dispatcher:debug] checking [/content/digital/digital---global/es/home/jcr:content.getpublications.json]
Thu Jan 18 07:38:51.715784 2024 [dispatcher:debug] cachefile does not exist: /mnt/var/www/html/content/digital/digital---global/es/home/jcr:content.getpublications.json
Thu Jan 18 07:38:51.715791 2024 [dispatcher:debug] try to create new cachefile: /mnt/var/www/html/content/digital/digital---global/es/home/jcr:content.getpublications.json
Thu Jan 18 07:38:51.715797 2024 [dispatcher:debug] cache-action for [/content/digital/digital---global/es/home/jcr:content.getpublications.json]: CREATE
Thu Jan 18 07:38:51.715864 2024 [dispatcher:debug] Filter rule entry /0001 blocked 'GET /content/digital/digital---global/es/home/jcr:content.getpublications.json HTTP/1.1'

 

I have installed a local dispatcher in my laptop and when I ask for the website in my log I can see the following:

 

Found farm digitalfarm for digital.net, referer: http://digital.net/es/home
checking [/content/digital/digital---global/es/home/jcr:content.getmediumpublications.json], referer: http://digital.net/es/home
request URL not in cache rules: /content/digital/digital---global/es/home/jcr:content.getmediumpublications.json, referer: http://digital.net/es/home
cache-action for [/content/digital/digital---global/es/home/jcr:content.getmediumpublications.json]: NONE, referer: http://digital.net/es/home
Filter rule entry /0077 allowed 'GET /content/digital/digital---global/es/home/jcr:content.getmediumpublications.json HTTP/1.1', referer: http://digital.net/es/home
 
As you can see, when the right farm is used the 77 filter is applied and the resource is returned.
 
Can you think of anything else???
 
Thank you very much.