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

Flush logs button in settings page has no effect #1823

Closed
sparklyballs opened this Issue Dec 9, 2017 · 22 comments

Comments

Projects
None yet
9 participants
@sparklyballs
Copy link

sparklyballs commented Dec 9, 2017

In raising this issue, I confirm the following: {please fill the checkboxes, e.g: [X]}

How familiar are you with the the source code relevant to this issue?:

1


Expected behaviour:

Clicking the flush logs button
screen shot 2017-12-09 at 10 53 50
and clicking yes to the warning does not clear the logs/stats etc on the admin page

Actual behaviour:

The logs and stats on the admin page are not cleared using opera or safari and clearing caches forcing reloads etc

Steps to reproduce:

click the flush logs button and accept the warning by pressing yes

Debug token provided by uploading pihole -d log:

n81y7unxne

Troubleshooting undertaken, and/or other relevant information:

{Steps of what you have done to fix this}

  • {Please delete this quoted section when opening your issue}
  • You must follow the template instructions. Failure to do so will result in your issue being closed.
  • Please submit any feature requests here, so it is votable and trackable by the community.
  • Please respect that Pi-hole is developed by volunteers, who can only reply in their spare time.
  • Detail helps us understand and resolve an issue quicker, but please ensure it's relevant.
  • This template was created based on the work of udemy-dl.

@pi-hole pi-hole deleted a comment from sparklyballs Dec 9, 2017

@DL6ER

This comment has been minimized.

Copy link
Member

DL6ER commented Dec 9, 2017

Please run

killall -s SIGHUP pihole-FTL

and see if that clears the statistics on the web.

@sparklyballs

This comment has been minimized.

Copy link

sparklyballs commented Dec 9, 2017

i ran

sudo killall -s SIGHUP pihole-FTL

and refreshed the web page and the stats still aren't cleared

@DL6ER

This comment has been minimized.

Copy link
Member

DL6ER commented Dec 9, 2017

Okay, I'm still trying to figure out what is causing the issue you are seeing. After you clicked on Flush logs, how does /var/log/pihole.log look like? Has it been emptied?

@sparklyballs

This comment has been minimized.

Copy link

sparklyballs commented Dec 9, 2017

no there are many lines in that file

is it safe (ie no identifiers to me etc) to post it here as an attachment ?

@sparklyballs

This comment has been minimized.

Copy link

sparklyballs commented Dec 9, 2017

if it helps

pi@pihole:~ $ stat /var/log/pihole.log
  File: /var/log/pihole.log
  Size: 5837903   	Blocks: 11416      IO Block: 4096   regular file
Device: b302h/45826d	Inode: 20740       Links: 1
Access: (0644/-rw-r--r--)  Uid: (  109/ dnsmasq)   Gid: (    0/    root)
Access: 2017-09-21 02:59:45.524138509 +0100
Modify: 2017-12-09 12:23:02.030734339 +0000
Change: 2017-12-09 12:23:02.030734339 +0000
 Birth: -
@DL6ER

This comment has been minimized.

Copy link
Member

DL6ER commented Dec 9, 2017

Size: 5837903

sounds like 5 MB, okay, so flushing doesn't seem to work at all for you...

Does it work if you run

pihole flush

manually?

@sparklyballs

This comment has been minimized.

Copy link

sparklyballs commented Dec 9, 2017

that does work

pi@pihole:~ $ pihole -f [✓] Flushed /var/log/pihole.log pi@pihole:~ $ stat /var/log/pihole.log File: /var/log/pihole.log Size: 186 Blocks: 8 IO Block: 4096 regular file Device: b302h/45826d Inode: 20740 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 109/ dnsmasq) Gid: ( 0/ root) Access: 2017-09-21 02:59:45.524138509 +0100 Modify: 2017-12-09 14:24:06.385248671 +0000 Change: 2017-12-09 14:24:06.385248671 +0000 Birth: -

and the stats in the webui are reset

@DL6ER

This comment has been minimized.

Copy link
Member

DL6ER commented Dec 9, 2017

Hmm, can you perform any other change from the Settings page?

@sparklyballs

This comment has been minimized.

Copy link

sparklyballs commented Dec 9, 2017

i can update the lists via the webui

screen shot 2017-12-09 at 14 27 30

@sparklyballs

This comment has been minimized.

Copy link

sparklyballs commented Dec 9, 2017

and rebooting the system from the webui works too

@norrkin

This comment has been minimized.

Copy link

norrkin commented Dec 9, 2017

Can confirm that flush button via the GUI doesn't.

@ajp2k13

This comment has been minimized.

Copy link

ajp2k13 commented Dec 9, 2017

Same problem here on my Pi. If I disable query logging first then flush, it works...

@DL6ER DL6ER added the Bug: Confirmed label Dec 9, 2017

@DL6ER

This comment has been minimized.

Copy link
Member

DL6ER commented Dec 9, 2017

I've been able to confirm this. Bugfix incoming...

@DL6ER DL6ER referenced this issue Dec 9, 2017

Merged

Re-add missing background form. Fixes #1823 #631

8 of 8 tasks complete

@dschaper dschaper added this to the v3.2.1 milestone Dec 12, 2017

@dschaper

This comment has been minimized.

Copy link
Member

dschaper commented Dec 22, 2017

Closed via #1856

@dschaper dschaper closed this Dec 22, 2017

@trhsrw

This comment has been minimized.

Copy link

trhsrw commented Feb 25, 2018

I have exactly the same issue in v 3.3 with exactly the same observations sparkyballs reported. I don't know how to reopen a ticket. So if this is not being modified within a week or so I will open a new ticket. I am using a raspi 2 B with the latest and up-to-date Raspbian.

@PromoFaux

This comment has been minimized.

Copy link
Member

PromoFaux commented Feb 25, 2018

Slightly different with 3.3, but that is fixed in the development branch, and will go into the next release. No need to open a new ticket

@trhsrw

This comment has been minimized.

Copy link

trhsrw commented Feb 25, 2018

ok, thanks for the quick answer and fix. BTW: I didn't want to be mean. I meant "if the ticket is not being modified..." since I don't know, if github still sends notifications to ticket owners if a ticket has been closed.

@RIKWEBB

This comment has been minimized.

Copy link

RIKWEBB commented Mar 6, 2018

try this :)
cd /etc/pihole
sudo service pihole-FTL stop
sudo rm pihole-FTL.db
sudo service pihole-FTL start

Be aware, you will lose all logs

@dmblack

This comment has been minimized.

Copy link

dmblack commented Apr 8, 2018

EDIT:
Confirmed RESOLVED in version #v3.3.1

I successfully cleared the logs with the 'flush logs' button from the admin UI within 3.3.1.

Sorry for notifications team!

@DL6ER

This comment has been minimized.

Copy link
Member

DL6ER commented Apr 8, 2018

@dmblack You just happened to post to the wrong issue report as this time there was none on GitHub, only on Discourse. The issue reported in here was indeed resolved with v3.2.1 but was entirely different from the issue resolved in v3.3.1 which was mentioned in #1929

@dmblack

This comment has been minimized.

Copy link

dmblack commented Apr 8, 2018

(Edited for clarity, and error)

@DL6ER

Not sure I understand what you are saying? #1929 does not clearly indicate the UI is impacted, though perhaps the UI is only calling this function you reference anyway.

I do see that there's a tag for milestone 3.2.1, but believe it's wise to be clear on a regression of a UI error.

Additionally; users searching for this, as I did, now see the last comment indicates resolution within 3.3.1. Developers were also tagged for visibility.


As noted above; this issue has been fixed (again?) in 3.3.1. Any users attempting to perform this function, and failing (without error); should consider updating to 3.3.1 - or using alternative methods mentioned earlier in this report.

@DL6ER

This comment has been minimized.

Copy link
Member

DL6ER commented Apr 18, 2018

#1929 does not clearly indicate the UI is impacted, though perhaps the UI is only calling this function you reference anyway.

Yes

this issue has been fixed (again?) in 3.3.1

No, they have been two entirely separate issues, which is what I tried to bring across earlier. The first issue (some time ago, this issue report) was about a defect on the web UI, not being able to perform the action in the backend. The pihole -f command, however, was not affected then. The second issue (that has been fixed in the referenced PR #1929 ) was an altogether new issue in a different part of the code and this time affected both the CLI and the web UI.

I hope things are more clear now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment