abhisheksurve45 opened a new issue #8193:
URL: https://github.com/apache/trafficserver/issues/8193


   ## Issue Report
   
   #### Describe the issue
   
   Hi team, 
   
   We have installed Traffic Server from the source code and have been trying 
to resolve the regex operation failure issue that we are facing
   
   
   ```
   [ET_NET 2] WARNING: failed operation: READ (opcode=1), span: 
/var/cache/trafficserver/cache.db (fd=20)
   [ET_NET 2] WARNING: Error accessing Disk /var/cache/trafficserver/cache.db 
[4/5]
   [ET_AIO 7:20] WARNING: cache disk operation failed READ -1 22
   ```
   
   After 5 successive failures, it marks the disk inaccessible and disables the 
caching. This happens only for regex operations, however the single lookup, 
delete and invalidate works fine.
   
   
   #### Steps taken
   
   1. Installing from source code via docker : 
   
   
   Dockerfile :
   
   ```
   FROM ubuntu:20.04
   
   ARG LUA_VERSION=2.0.5
   
   RUN DEBIAN_FRONTEND=noninteractive apt-get update \
       && DEBIAN_FRONTEND=noninteractive apt-get install -y ca-certificates 
pkg-config build-essential bzip2 libssl-dev libxml2-dev libc6-dev libpcre3-dev 
libncurses5-dev tcl-dev libboost-dev libcap-dev hwloc libtool lua5.2 autoconf 
automake wget libncurses5-dev libncursesw5-dev dumb-init net-tools vim git 
--no-install-recommends \
       && wget --no-verbose 
https://luajit.org/download/LuaJIT-${LUA_VERSION}.tar.gz && tar xvzf 
LuaJIT-${LUA_VERSION}.tar.gz && cd LuaJIT-${LUA_VERSION}/ && make && make 
install \
       && cd /tmp \
       && git config --global http.sslverify false && git clone 
https://git-wip-us.apache.org/repos/asf/trafficserver.git \
       && cd trafficserver \
       && autoreconf -if && ./configure --prefix=/opt/ts 
--with-luajit=/usr/local && make && make install \
       && rm -rf /tmp/trafficserver \
       && rm -rf /var/lib/apt/lists/* \
       && apt-get clean
   
   RUN mkdir -p /var/cache/trafficserver
   RUN chmod -R 777 /var/cache/trafficserver
   RUN mkdir -p /var/log/trafficserver
   RUN chmod -R 777 /var/log/trafficserver
   
   EXPOSE 6081
   
   # https://github.com/Yelp/dumb-init#usage
   ENTRYPOINT ["/usr/bin/dumb-init", "--"]
   
   CMD ["/opt/ts/bin/traffic_server"]
   ```
   
   Docker compose :
   
   
   ```
   ---
   version: "3.2"
   services:
     ats:
       network_mode: host
       build:
         context: ..
         dockerfile: docker/Dockerfile
       image: ats:10.0.0
       volumes:
         - type: bind
           source : ../trafficserver
           target : /opt/ts/etc/trafficserver
         - type: bind
           source : /opt/ats-data/cache
           target : /var/cache/trafficserver
   ```
   
   2. ATS Configs
   
   
   storage.config : 
   
   ```
   /var/cache/trafficserver 100G
   ```
   
   records.config : 
   
   ```
   CONFIG proxy.config.http.cache.http INT 1
   CONFIG proxy.config.cache.ram_cache.size INT 2G
   CONFIG proxy.config.log.logfile_dir STRING /var/log/trafficserver
   CONFIG proxy.config.http_ui_enabled INT 1
   ```
   
   remap.config
   
   ```
   regex_map http://(.*):6081/ui/  http://{cache} @action=allow
   ```
   
   
   #### Version Info :
   
   - Traffic server : 10.0.0 (replicated on 9.0.2) 
   - Unix name : 5.4.0  x86_64 x86_64 x86_64 GNU/Linux
   - Docker : 20.10.7, build f0df350
   - Docker compose : 1.29.2, build 5becea4c
   
   #### Additional context
   
   1. Checked the permissions available for cache.db. Since we are running ATS 
with default `nobody` as the user, it already has required permissions.
   
   2. 
   
   ```
   ==============
   File open
   ==============
   2309.095 ( 0.019 ms): traffic_server/385628 openat(dfd: CWD, filename: 
0x80dd3100, flags: RDWR|CREAT|DIRECT|DSYNC, mode: IRUGO|IWUSR) = 20
   
   
   ==============
   pread
   ==============
   4314.438 ( 0.016 ms): [ET_AIO 6:20]/354163 pread64(fd: 
20</var/cache/trafficserver/cache.db>, buf: 0x7f7eae8cc000, count: 8388608, 
pos: 803446272) = -1 EINVAL (Invalid argument)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to