Skip to content
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

Token '...' doesn't match specifier '%h' - log without IP v4/6 #1644

Open
mipon opened this issue Jan 1, 2020 · 4 comments
Open

Token '...' doesn't match specifier '%h' - log without IP v4/6 #1644

mipon opened this issue Jan 1, 2020 · 4 comments

Comments

@mipon
Copy link

@mipon mipon commented Jan 1, 2020

Hi,

Spent several hours trying to figure this out. I get an error.

Could you help? Thank you.

access_log

mydomain.net dynamic-ip-adsl.something.com - - [30/Dec/2019:00:00:11 +0900] "GET /some/direcotry/page HTTP/1.1" 404 47098 "-" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; Zune 4.7)"

Command

bash-4.4$ goaccess "access_log" --log-format=COMBINED
Parsed 1 linesproducing the following errors:

Token 'mydomain.net' doesn't match specifier '%h'

I tried.

$ goaccess "access_log" --log-format='%h %^[%d:%t %^] "%r" %s %b "%R" "%u"' --date-fo
rmat=%d/%b/%Y --time-format=%T

Token 'mydomain.net' doesn't match specifier '%h'

Also tried many other variations but they don't work.

Version

$ goaccess -V
GoAccess - 1.3.
For more details visit: http://goaccess.io
Copyright (C) 2009-2016 by Gerardo Orellana

Build configure arguments:
  --enable-utf8
  --enable-geoip=legacy
@vitaocode

This comment has been minimized.

Copy link

@vitaocode vitaocode commented Jan 2, 2020

not sure but try:
goaccess "access_log" --log-format=VCOMBINED

@allinurl

This comment has been minimized.

Copy link
Owner

@allinurl allinurl commented Jan 2, 2020

GoAccess requires the following fields:

a valid IPv4/6 %h
a valid date %d
the request %r

@allinurl allinurl changed the title Token '...' doesn't match specifier '%h' Token '...' doesn't match specifier '%h' - log without IP v4/6 Jan 2, 2020
@mipon

This comment has been minimized.

Copy link
Author

@mipon mipon commented Jan 3, 2020

I see.

It seems the second field is mixed with a client host name and an IP address. Some items have a normal IP address. It is Apache2 log that the shared host gives and they prohibit the users from accessing http.conf. So I have no ways to change the format.

Seems like there is no workarounds at the moment.

What about implementing an ability to auto-detect of mixed usage of IP addresses and host names in a future release?

Thank you for your consideration.

@allinurl

This comment has been minimized.

Copy link
Owner

@allinurl allinurl commented Jan 3, 2020

@mipon If you build from development, please try using --no-ip-validation as noted here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.