Goaccess: Trouble with port 7890

Created on 27 Apr 2018  路  7Comments  路  Source: allinurl/goaccess

I'm using the following command to run goaccess:
sudo zcat /var/log/apache2/access.log.*.gz | goaccess -f /var/log/apache2/access.log /var/log/apache2/access.log.1 - -o /var/www/html/monitoring/index.html --real-time-html --ws-url=wss://data.nrri.umn.edu:7890 --daemonize

What I'm hoping this does is extract the older compressed logfiles, pipe that to goaccess as well as using the uncompressed logs. It should generate a continuously updated HTML report. And I want it to run in the background as well so I don't have to leave a terminal session open.

This does indeed produce an HTML report, but it does not get updated. It is the same statistics and date as when I first ran the command yesterday.

I'm also having trouble confirming that port 7890 is open after I run the command.
sudo netstat -tulpn | grep 7890 returns nothing.
In Chrome I see:

WebSocket connection to 'wss://data.nrri.umn.edu:7890/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

In Firefox:

Firefox can鈥檛 establish a connection to the server at wss://data.nrri.umn.edu:7890/.

Please advise.

question websocket-server

All 7 comments

I tried another approach based on this issue: #856

So I installed goaccess using the instructions here: https://goaccess.io/download#build
I configured it using ./configure --enable-geoip --with-openssl

And my new command is:
sudo zcat /var/log/apache2/access.log.*.gz | goaccess -f /var/log/apache2/access.log /var/log/apache2/access.log.1 - -o /var/www/html/monitoring/index.html --real-time-html --ws-url=wss://data.nrri.umn.edu:7890 --daemonize --ssl-cert=/path/to/cert.cer --ssl-key=/path/to/key.key

However, Firefox and Chrome have the same message as above.

Is there something I have to do with my firewall (ie. ufw) for port 7890? I wouldn't imagine this is the case since the HTML report is getting served (like the rest of my web sites) over port 80.

You will need to open the port 7890. e.g.,

iptables -A INPUT -i eth0 -p tcp --destination-port 7890 -j ACCEPT

Thank you that helped.
I was also having a permissions issue that I couldn't detect due to the --daemonize. It turns out I needed another another sudo after the pipe.

Here's my final command in case it helps someone else out:
sudo zcat /var/log/apache2/access.log.*.gz | sudo goaccess -f /var/log/apache2/access.log /var/log/apache2/access.log.1 - -o /var/www/html/monitoring/index.html --real-time-html --ws-url=wss://data.nrri.umn.edu:7890 --daemonize --ssl-cert=/path/to/cert.cer --ssl-key=/path/to/key.key

Glad to hear you were able to solve the issue :)

how many ports is avaliable

in go access WebSocket

@narayan1599 please open an issue with your question instead of posting on closed issues.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tassleh0ff picture Tassleh0ff  路  4Comments

SerenaAi picture SerenaAi  路  3Comments

g33kphr33k picture g33kphr33k  路  3Comments

vivekkrish picture vivekkrish  路  3Comments

canepa picture canepa  路  3Comments