Dispatcher中的环境变量:404

时间:2015-01-30 06:38:43

标签: environment-variables cq5 aem

我正在尝试配置我的dispatcher.any文件,其中我将发布端口配置为通过env传递。变量如下:

/renders
      {
      /rend01
        {
        # Hostname or IP of the render
        /hostname "127.0.0.1"
        # Port of the render
        /port "${Publish_IP}"
        # Connect timeout in milliseconds, 0 to wait indefinitely
        # /timeout "0"
        }
      }

当我通过echo检查时,它显示在输出

下面
user@user-Aspire-5755:/etc$ echo ${Publish_IP}
 8589

这是我发布的端口。如果我把/ 8589端口放入调度员。它工作正常。但是如果我使用env给404。变量。无法理解为什么它没有拿起环境。变量。我的调度员版本是4.1

下面是错误日志,我做了一些更改,下面是最新版本。现在我将它用于localhost的主机名:

[Thu Feb 05 18:15:41 2015] [W] [16301(140595054811008)] /etc/apache2/conf/dispatcher.any:36: environment variable not defined: PUBLISH_IP
[Thu Feb 05 18:15:41 2015] [W] [16301(140595054811008)] Looking up host failed (): No address associated with hostname; entry ignored.
[Thu Feb 05 18:15:41 2015] [E] [16301(140595054811008)] No correct backend found in farm website

由于

1 个答案:

答案 0 :(得分:0)

嘿,以为我会做出回应以防其他人遇到这个问题。在Centos / RedHat中添加您的环境变量:

/etc/sysconfig/httpd

然后重启apache:

sudo service httpd restart

工作正常。