Skip to content

openresty/nginx does not recognize zmq directives #20

Open
@steebchen

Description

@steebchen

I want to build this module with openresty.

My commands look exactly like the instructions:

./configure --add-module=../nginx-log-zmq-master
make
make install

However, when running nginx with any zmq directive like log_zmq_server, nginx aborts on start:

$ /usr/local/openresty/bin/openresty
> 2018/11/03 21:06:06 [emerg] 1#0: unknown directive "log_zmq_server" in /usr/local/openresty/nginx/conf/nginx.conf:13

I am sure that the compiling itself works, because the logs show that it was compiled correctly, and it reported an error before because of missing dependencies (libzmq3-dev):

adding module in /openresty-1.13.6.1/../nginx-log-zmq-master
checking for ZeroMQ library ... found
 + ngx_http_log_zmq_module was configured
[...]

The full log output is available at https://paste.ee/p/BCdf6.

My dockerfile:

FROM ubuntu:xenial

RUN apt-get -y update \
  && apt-get -y upgrade \
  && apt-get install -y \
  libpcre3 \
  libpcre3-dev \
  libssl-dev \
  libperl4-corelibs-perl \
  libzmq3-dev \
  g++ \
  cmake \
  unzip \
  wget \
  && apt-get clean \
  && rm -rf /var/lib/apt/lists/*

RUN wget https://github.com/openresty/openresty/releases/download/v1.13.6.1/openresty-1.13.6.1.tar.gz \
  && wget https://github.com/alticelabs/nginx-log-zmq/archive/master.zip \
  && unzip master.zip \
  && rm master.zip \
  && tar -xvf openresty-1.13.6.1.tar.gz \
  && rm openresty-1.13.6.1.tar.gz \
  && cd openresty-1.13.6.1/ \
  && ./configure --add-module=../nginx-log-zmq-master -j2 \
  && make -j2 \
  && make install \
  && cd .. \
  && rm -r openresty-1.13.6.1 \
  && rm -r nginx-log-zmq-master

# connect stdout & stderr
RUN ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \
  && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log

COPY cmd.sh /usr/bin/cmd.sh
RUN chmod +x /usr/bin/cmd.sh

# copy configs
COPY *.conf /usr/local/openresty/nginx/conf/
COPY *.lua /usr/local/openresty/nginx/lua/

CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"]

Any suggestion is appreciated. I also tried with an older version which is officially supported, namely v1.5.12.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions