goaccess-for-nginxproxymanager icon indicating copy to clipboard operation
goaccess-for-nginxproxymanager copied to clipboard

No archived logs found at /opt/log

Open leon1995 opened this issue 3 years ago • 10 comments

Hi,

I get the error No archived logs found at /opt/log. I do noticed, that the logs are not contained in the container, because $ docker-compose exec goaccess ls /opt/log do not show me any log file. I have mapped the volume in my docker-compose.yml like this

 volumes:
        - ./data/logs:/opt/log

On my host, there are plenty of files in data/logs

leon1995 avatar Oct 09 '22 08:10 leon1995

@leon1995 are there any other errors shown? Can you send me a screenshot of the output when running the container?

Thanks.

xavier-hernandez avatar Oct 09 '22 17:10 xavier-hernandez

no, there arent any errors. here is the output with debug True:

goaccess     | 
goaccess     | GOAN v1.1.8
goaccess     | 
goaccess     | 
goaccess     | NGINX SETUP...
goaccess     | 
goaccess     | NGINX BASIC AUTH
goaccess     | -------------------------------
goaccess     | None
goaccess     | 
goaccess     | 
goaccess     | NPM INSTANCE SETTING UP...
goaccess     | 
goaccess     | LOADING NPM PROXY LOGS
goaccess     | -------------------------------
goaccess     | 
goaccess     |  Adding proxy logs...
goaccess     |  Found (0) proxy logs...
goaccess     | 
goaccess     |  SKIP ARCHIVED LOGS
goaccess     |  -------------------------------
goaccess     |  FALSE
goaccess     |  No archived logs found at /opt/log...
goaccess     | 
goaccess     | EXCLUDE IPS
goaccess     | -------------------------------
goaccess     | 127.0.0.1
goaccess     | 
goaccess     | Setting GeoIP Database
goaccess     | -------------------------------
goaccess     | DEFAULT
goaccess     | 
goaccess     | DEBUG
goaccess     | -------------------------------
goaccess     | OFF
goaccess     | 
goaccess     | RUN NPM GOACCESS
goaccess     | 
WebSocket server ready to accept new client connections

and I can understand, there he cannot find any logs, because it seems that they arent copied to the docker container. But I dont know why, because I set up the directory mapping...

leon1995 avatar Oct 09 '22 17:10 leon1995

@leon1995 you are correct the logs are not copied into the container. Can you try referencing the entire directory rather than just ./data/logs ?

xavier-hernandez avatar Oct 09 '22 17:10 xavier-hernandez

What do you mean exactly?

leon1995 avatar Oct 09 '22 17:10 leon1995

/root/something/npm/data/logs

xavier-hernandez avatar Oct 09 '22 17:10 xavier-hernandez

not working. I know that ./data/... should work, because I use it also on other services

leon1995 avatar Oct 09 '22 18:10 leon1995

also it says that

goaccess     | DEBUG
goaccess     | -------------------------------
goaccess     | OFF

but I have DEBUG=True set

leon1995 avatar Oct 09 '22 18:10 leon1995

can you provide your docker compose file so I can look that over?

xavier-hernandez avatar Oct 09 '22 19:10 xavier-hernandez

version: '3'
services:
  app:
    image: 'baudneo/nginx-proxy-manager:latest'
    container_name: app
    healthcheck:
      test: ["CMD", "/bin/check-health"]
      interval: 10s
      timeout: 3s
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    environment:
      # crowdsec censored stuff
      DB_MYSQL_ censored
    volumes:
      - ./conf.d/:/etc/nginx/conf.d/
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
      - ./logs:/var/log/letsencrypt/
    restart: always

  db:
    image: 'jc21/mariadb-aria:latest'
    container_name: db
    environment:
      MYSQL_ censored
    volumes:
      - ./data/mysql:/var/lib/mysql
    restart: always

# crowdsec stuff

  goaccess:
    image: xavierh/goaccess-for-nginxproxymanager:latest
    container_name: goaccess
    restart: always
    environment:
        - TZ=Europe/Berlin
        - SKIP_ARCHIVED_LOGS=False #optional
        - DEBUG=True #optional
        - EXCLUDE_IPS=127.0.0.1 #optional - comma delimited list    
        - LOG_TYPE=NPM #optional - more information below            
    ports:
        - '7880:7880'
    volumes:
        - ./data/logs:/opt/log/

leon1995 avatar Oct 09 '22 19:10 leon1995

Looks right. So if you go to ./data/logs you see log files?

Maybe try adding this to goaccess but that shouldn't matter if the files are already there.

depends_on: - app

xavier-hernandez avatar Oct 09 '22 19:10 xavier-hernandez

Yes there are 301 files in ./data/logs...

I added the depends_on but it didnt work

leon1995 avatar Oct 12 '22 08:10 leon1995

Having a similar issue. If I jump into the containers console I can tail output the log files bind mounted into /opt/logs. Haven't figured out anything else yet.

Sperryfreak01 avatar Dec 30 '22 22:12 Sperryfreak01

@leon1995 or @Sperryfreak01 any luck with this?

xavier-hernandez avatar Feb 15 '23 03:02 xavier-hernandez

I'll be honest I forgot what this was and what I was trying to do.

On Tue, Feb 14, 2023, 7:56 PM Xavier @.***> wrote:

@leon1995 https://github.com/leon1995 or @Sperryfreak01 https://github.com/Sperryfreak01 any luck with this?

— Reply to this email directly, view it on GitHub https://github.com/xavier-hernandez/goaccess-for-nginxproxymanager/issues/106#issuecomment-1430717761, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJDFI6ZJSSZN64JEM3CTGTWXRHYNANCNFSM6AAAAAARATAQXE . You are receiving this because you were mentioned.Message ID: <xavier-hernandez/goaccess-for-nginxproxymanager/issues/106/1430717761@ github.com>

Sperryfreak01 avatar Feb 15 '23 06:02 Sperryfreak01

No... but it would be nice if there was a solution...

leon1995 avatar Feb 15 '23 12:02 leon1995

@leon1995 what I've somewhat learned is that sometimes GoAccess silently discards logs starting with errors. Can you send me a sample of the logs? Post them on PasteBin or something similar.

xavier-hernandez avatar Feb 16 '23 05:02 xavier-hernandez

I habe updated the docker container and now the log files are found and everything looks fine!

leon1995 avatar Feb 16 '23 07:02 leon1995