-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker-compose : Goaccess cannot find log #1494
Comments
While I was posting this, I realized the |
Oooow... I've just read the Figures out the command of the Dockerfile is
From what I read in issues, @coldfix showed a This would explain why I get the man page displayed when I don't specify any command in my docker-compose file. Is there something I'm missing ? |
@rachid-debu thanks for reporting this. Let me forward this to @err931 as he wrote the Dockerfile. @err931 Do you know what might be the issue here? Thanks |
Thanks. I still didn't manage to make this work with docker |
Maybe @gam2046 may be able to chime in about this issue? |
@allinurl #1507 It has been merged, but the image of Docker Hub has not been rebuilt.
It seems that this problem is caused by wrong permissions or paths. Therefore, you can enter the container(
|
@gam2046 it's built now. Please check again. |
@rachid-debu did you get a chance to look at @gam2046 comments. Any updates? Thanks |
looks like an interesting fix thanks a lot. |
Not sure if this was fixed or not, but I no longer can docker compose GoAccess. It was working when binding /srv/{data,logs,report}. I noticed the dockerfile was changed (e.g. no more /srv/ volumes?). The previous file dockerfile worked without an issue with the following config: Docker for Windows (Linux Containers) `--- services: |
@Nykoshiro, @err931 just merged some changes upstream. Can you please try again and let me know how it goes. Thanks. |
@allinurl @err931 I can, give me a bit and I'll let you guys know as soon as I can. I may just not understand the new changes to the DockerFile but the documentation references /srv/{data,logs,report} volumes, the rewrite of the DockerFile on 5/12 removes those volumes and sets /var/www/goaccess. The latest change is still only referencing the /var/www/goaccess volume, so I'm assuming it still isn't fixed? I'm learning this stuff as I go so be patient if I don't understand what I'm talking about or the changes... I'll still give the container a shot as soon as I have a few minutes. |
I tried again with the latest image of goaccess. Regarding permissions I doubled checked but I might be wrong.
As you can see, the files and folder I am mapping are And the error that I get (indeed, it looks like file permissions or path, but I don't know.. everything looks fine) :
Thanks for the help |
I think you are right, this change 5a13cfa#diff-3254677a7917c6c01f55212f86c57fbfR60 seems to have broken paths. |
If the Docker Hub build isn't updated at the same time as GitHub then I suspect that the Docker Hub build Docker Hub Commit Source ddf17b0 from 22 days ago update is what finally sync'd the May 12th rewrite. I've been rebuilding containers while trying to learn compose / swarm / kube and that's around the same time when I noticed that my GoAccess container stopped creating the report.html. Edit: fixed URL for Docker Hub Builds |
Latest build ~3hr ago. Please give it a shot. |
For me, the fact that it does build was not the problem. It does build for me. Just it didn't find the files, I thought it was permissions. But looking at the change in volume paths, I just followed the new Edit: Here's my new docker-compose with proper paths, working.
I consider my issue solved, hopefully my solution will help others. Also maybe documentation could be updated accordingly (it mentions everywhere /srv/{data,report,log}). |
I was able to finally get GoAccess running referencing @rachid-debu compose config. Take away notes: a) the docker documentation now conflicts with current config of GoAccess (/GoAccess/) volumes; previously it created /srv/{data,logs,report} volumes. Can /GoAccess/{data,logs,report} be added? b) unless there is a way for Docker Compose to create directories (e.g. /GoAccess/{data,logs,report}) then there is a manual effort to create these paths but only after configuring GA to a temp path? or I'm forced to use a single volume (see new compose config below) and rework all my other containers to point to the new 'shared' GoAccess path version: "3.7"
#Docker for Windows (Linux Containers)
services:
#5
goaccess:
image: allinurl/goaccess
container_name: goaccess
networks:
- mybridge
environment:
#- PUID=1000
#- PGID=1000
- TZ=America/Los_Angeles
volumes:
#- /var/run/docker.sock:/var/run/docker.sock
# GoAccess Bind Mounts prior to 5/12
#- c:/docker/goaccess/data:/srv/data
#- c:/docker/webserver/sites/goaccess/:/srv/report
#- c:/docker/shared/variouslogs:/srv/logs
# GoAccess Bind Mount after 5/12
- c:/docker/shared/goaccess:/goaccess:rw
command:
#goaccess
goaccess --config-file=/goaccess/goaccess.conf --output=/goaccess/index.html --log-file=/goaccess/access.log --real-time-html
#ports:
# - 7890:7890
restart: always
networks:
mybridge:
driver: bridge |
@rachid-debu I thought you mentioned something about ws-url: if I recall correctly, the web socket configuration is used for something else, not self hosting the report (e.g. html) file; I believe you have to host this file with your own webserver. |
@Nykoshiro I thought I needed it in order to have live report. Goaccess is inside docker and i'm using Nginx inside docker which serves the goaccess and my websites. I wanted to have to access.log regularly refreshed and the report also. @allinurl isn't it the purpose of the ws-url ? |
By default, goaccess will attempt to connect to the generated report's hostname. If GoAccess is running on a remote server, the host of the remote server should be specified using @rachid-debu @Nykoshiro can I ask you to please submit a PR to update the README accordingly. I just want to make sure I don't miss anything. Thank you very much both of you! |
@allinurl I can try to do that, I just need to look up what submitting a PR entails... I was able to get the container to run using the config above (using new paths) but it seems that the log file is only parsed one time and that's it. I've tried my original conf file & also using various command lines but for whatever reason, ever since GA was updated I haven't been able to successfully get it going. |
@Nykoshiro yes it does work. At first it was not working because the websocket tunnel didn't work but It now works. Detail a bit your configuration, maybe I can help. Are you using a nginx server ? What's your conf ? |
I'm also experiencing problems with the new Dockerfile#5a13cfa. Website docs https://goaccess.io/download#docker and README instructions are not updated to use the new Dockerfile. docker run --restart=always -d -p 7890:7890 \
-v "/srv/goaccess/data:/srv/data" \
-v "/srv/goaccess/html:/srv/report" \
-v "/var/log/apache2:/srv/logs" \
--name=goaccess allinurl/goaccess This command used to work. Now it's not working and only outputs I managed to get it to work using the old file. I cloned the repo, pasted the old Dockerfile and built the image. @err931 can you please update README with how to use the current Dockerfile? |
@mskec indeed, path has changed and documentation has not been updated yet. I suggest you try this :
If your html file is named different that |
@rachid-debu thank you 🎉 that works with the latest Dockerfile |
The following configuration work: version: '3'
services:
goaccess:
image: allinurl/goaccess
ports:
- 7890:7890
volumes:
- ./goaccess/config:/srv/config
- ./goaccess/data:/srv/data
- ./goaccess/html:/srv/report
- /var/log/nginx:/srv/logs
command: ["--no-global-config", "--config-file=/srv/config/goaccess.conf", "--log-file=/srv/logs/access.log"] My configuration( At least need to be set in
|
README has been updated. Please confirm new instructions solve the issue. Thanks! |
Closing this. Feel free to reopen it if needed. |
Hi there,
Can't find why this is not working.
If i uncomment the
command
part for goaccess in my docker-compose file i get this error below :If I keep it commented (like I saw @coldfix was doing here #1042 (comment)), I get the
man goaccess
displayed ^^.Here's my docker-compose (simplified, removed completely unrelated stuff) :
I don't really know how to show you my folder structure, here's a screen eventhough we don't see everything. Let me know if need more infos (folder/files permissions for example).
![Capture d’écran 2019-07-04 à 14 58 10](https://user-images.githubusercontent.com/17178180/60668415-325b1f80-9e6c-11e9-98be-e535a81f3496.png)
Best regards
(and thanks for this awesome project)
The text was updated successfully, but these errors were encountered: