Bug 1189133 - YaST2 HTTP server configuration cannot display the log
YaST2 HTTP server configuration cannot display the log
Status: CONFIRMED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2
Current
x86-64 openSUSE Tumbleweed
: P5 - None : Normal (vote)
: ---
Assigned To: YaST Team
Jiri Srain
file:///var/log/apache2/access_log
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-08-05 10:48 UTC by Christopher Yeleighton
Modified: 2021-08-05 13:59 UTC (History)
2 users (show)

See Also:
Found By: Community User
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Yeleighton 2021-08-05 10:48:06 UTC
When I tell Listening ports configuration panel to open the access log, I get a generic error message.
Workaround: tell the Log viewer to display the access log.
Comment 1 Knut Alejandro Anderssen González 2021-08-05 11:53:26 UTC
(In reply to Christopher Yeleighton from comment #0)
> When I tell Listening ports configuration panel to open the access log, I
> get a generic error message.
> Workaround: tell the Log viewer to display the access log.

I think that I can reproduce myself, but when reporting a YaST bug is nice to provide logs as documented here:

https://en.opensuse.org/openSUSE:Report_a_YaST_bug
Comment 2 Christopher Yeleighton 2021-08-05 12:56:15 UTC
(In reply to Knut Alejandro Anderssen González from comment #1)
> (In reply to Christopher Yeleighton from comment #0)
> > When I tell Listening ports configuration panel to open the access log, I
> > get a generic error message.
> > Workaround: tell the Log viewer to display the access log.
> 
> I think that I can reproduce myself, but when reporting a YaST bug is nice
> to provide logs as documented here:
> 
> https://en.opensuse.org/openSUSE:Report_a_YaST_bug

2021-08-05 12:41:13 <1> localhost.localdomain(785) [Ruby] cwm/service_widget.rb(handle):42 handling event {"EventSerialNo"=>2, "EventType"=>"MenuEvent", "ID"=>:show_access_log}
2021-08-05 12:41:13 <1> localhost.localdomain(785) [Ruby] yast2/service_widget.rb(handle_input):135 handle event show_access_log
2021-08-05 12:41:13 <1> localhost.localdomain(785) [Ruby] modules/HttpServerWidgets.rb(initListenSettings):3223 Listen: [$["ADDRESS":"", "PORT":"80"]]
2021-08-05 12:41:13 <1> localhost.localdomain(785) [Ruby] modules/HttpServerWidgets.rb(showAccessLogPopup):1022 Index 0 is out of array size
2021-08-05 12:41:13 <1> localhost.localdomain(785) [ui] YPushButton.cc(setFunctionKey):202 Guessing button role YOKButton for YPushButton "Zamknij" at 0x7fd3bc5a7700 from function key F10
2021-08-05 12:41:13 <1> localhost.localdomain(785) [Ruby] modules/LogViewCore.rb(Start):161 Calling process agent with command tail -f /var/log/apache2/access_log -n 100 | /usr/sbin/logresolve2
2021-08-05 12:41:13 <1> localhost.localdomain(785) [liby2util++] ExternalProgram.cc(start_program):202 Executing '/bin/sh' '-c' 'tail -f /var/log/apache2/access_log -n 100 | /usr/sbin/logresolve2'
2021-08-05 12:41:14 <1> localhost.localdomain(785) [liby2util++] ExternalProgram.cc(checkStatus):361 pid 893 exited with status 127
2021-08-05 12:41:14 <3> localhost.localdomain(785) [Ruby] modules/LogViewCore.rb(GetNewLines):66 Błąd podczas odczytywania plików dziennika.
2
Comment 3 Knut Alejandro Anderssen González 2021-08-05 13:00:56 UTC
(In reply to Christopher Yeleighton from comment #2)
> (In reply to Knut Alejandro Anderssen González from comment #1)
> > (In reply to Christopher Yeleighton from comment #0)
> > > When I tell Listening ports configuration panel to open the access log, I
> > > get a generic error message.
> > > Workaround: tell the Log viewer to display the access log.
> > 
> > I think that I can reproduce myself, but when reporting a YaST bug is nice
> > to provide logs as documented here:
> > 
> > https://en.opensuse.org/openSUSE:Report_a_YaST_bug
> 
> 2021-08-05 12:41:13 <1> localhost.localdomain(785) [Ruby]
> cwm/service_widget.rb(handle):42 handling event {"EventSerialNo"=>2,
> "EventType"=>"MenuEvent", "ID"=>:show_access_log}
> 2021-08-05 12:41:13 <1> localhost.localdomain(785) [Ruby]
> yast2/service_widget.rb(handle_input):135 handle event show_access_log
> 2021-08-05 12:41:13 <1> localhost.localdomain(785) [Ruby]
> modules/HttpServerWidgets.rb(initListenSettings):3223 Listen:
> [$["ADDRESS":"", "PORT":"80"]]
> 2021-08-05 12:41:13 <1> localhost.localdomain(785) [Ruby]
> modules/HttpServerWidgets.rb(showAccessLogPopup):1022 Index 0 is out of
> array size
> 2021-08-05 12:41:13 <1> localhost.localdomain(785) [ui]
> YPushButton.cc(setFunctionKey):202 Guessing button role YOKButton for
> YPushButton "Zamknij" at 0x7fd3bc5a7700 from function key F10
> 2021-08-05 12:41:13 <1> localhost.localdomain(785) [Ruby]
> modules/LogViewCore.rb(Start):161 Calling process agent with command tail -f
> /var/log/apache2/access_log -n 100 | /usr/sbin/logresolve2
> 2021-08-05 12:41:13 <1> localhost.localdomain(785) [liby2util++]
> ExternalProgram.cc(start_program):202 Executing '/bin/sh' '-c' 'tail -f
> /var/log/apache2/access_log -n 100 | /usr/sbin/logresolve2'
> 2021-08-05 12:41:14 <1> localhost.localdomain(785) [liby2util++]
> ExternalProgram.cc(checkStatus):361 pid 893 exited with status 127
> 2021-08-05 12:41:14 <3> localhost.localdomain(785) [Ruby]
> modules/LogViewCore.rb(GetNewLines):66 Błąd podczas odczytywania plików
> dziennika.
> 2

If I'm not wrong there is no /usr/sbin/logresolve2, isn't it?
Comment 4 Christopher Yeleighton 2021-08-05 13:25:17 UTC
> /usr/sbin/logresolve2: No such file or directory

This message goes to /dev/null apparently, instead of being passed on to the operator.

I tried { ln -T /usr/bin/logresolve /usr/sbin/logresolve2; }; the error went away but the result is empty because logresolve is incompatible with tail -f---apparently, it waits for the input to end before printing anything.
Comment 5 Knut Alejandro Anderssen González 2021-08-05 13:53:07 UTC
(In reply to Christopher Yeleighton from comment #4)
> > /usr/sbin/logresolve2: No such file or directory
> 
> This message goes to /dev/null apparently, instead of being passed on to the
> operator.
> 
> I tried { ln -T /usr/bin/logresolve /usr/sbin/logresolve2; }; the error went
> away but the result is empty because logresolve is incompatible with tail
> -f---apparently, it waits for the input to end before printing anything.

Yep, that is what I have already reproduced too.

So, will add it to the backlog in order to be fixed.

Thnx for the bug report!
Comment 7 Christopher Yeleighton 2021-08-05 13:59:23 UTC
# This is why tail -f will not work
let i=010000 &&
while let i--
do printf 'localhost %d \n' "$i" && printf>&2 '%d ' "$i"
done  | logresolve