Bug 1588190 - character conversion error when calling '/logs' on foreman-proxy
Summary: character conversion error when calling '/logs' on foreman-proxy
Keywords:
Status: CLOSED DUPLICATE of bug 1615439
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Proxy
Version: 6.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-06 21:40 UTC by Chris Duryee
Modified: 2021-12-10 16:19 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-14 12:20:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 24028 0 None None None 2018-06-21 13:20:47 UTC

Description Chris Duryee 2018-06-06 21:40:17 UTC
Description of problem:

We recently set up a Satellite 6.3.1 with one capsule. When we go to the capsule status page in the Satellite, the status page shows ERF50-5345, and it looks like the capsule is returning a 400. The proxy.log shows the following:

E, [2018-06-06T16:22:17.884203 ] ERROR -- : "\xFC" from ASCII-8BIT to UTF-8
I, [2018-06-06T16:22:17.884587 ] INFO -- : 172.19.129.210 - - [06/Jun/2018:16:22:17 -0500] "GET /logs/?from_timestamp=0 HTTP/1.1" 400 31 0.0341

Version-Release number of selected component (if applicable): 6.3.1

I am not sure how to reproduce this, we set up a satellite with one capsule and then synced repos into it. The \xFC might be a ü, its possible something pushed that character into the log buffer.

The Satellite and capsule both had UTF8 as their locale fwiw, checked via localectl.

Comment 5 Ivan Necas 2018-06-14 07:10:28 UTC
It should match the `/var/log/foreman-proxy/proxy.log`. I tried to simulate adding 'ü' to the buffer, but the server was handling this properly. I guess there was some binary data logged into the log, that caused the trouble: the log file should help us identify what the data were and act accordingly.

Comment 8 Jan Hutař 2018-06-19 14:07:27 UTC
How do you get that issue (given I have that to-be-uploaded broken "/var/log/foreman-proxy/proxy.log")? I have tried to access:

   https://sat640snap7.example.com/logs

but it says "The page you were looking for doesn't exist.", adding port ":8008" gives me "Secure Connection Failed".

Comment 9 Ivan Necas 2018-06-21 13:03:49 UTC
Using the details of the proxy.log I was able to reproduce the issue:

1. enable http port on proxy (gets enabled when using the templates plugin) - in /etc/foreman-proxy/settings.yml uncomment `:http_port: 8000` and restart foreman-proxy

2. curl -k --cert /etc/foreman-proxy/foreman_ssl_cert.pem --key /etc/foreman-proxy/foreman_ssl_key.pem https://localhost:8000 - note using https with http port

3. go to the capsule details in UI and in the logs tab

This produces ASCII-8BIT to UTF-8 errors in /var/log/foreman-proxy/proxy.log.

Comment 11 Satellite Program 2018-06-21 14:30:51 UTC
Upstream bug assigned to inecas

Comment 12 Satellite Program 2018-06-21 14:30:53 UTC
Upstream bug assigned to inecas

Comment 13 Ivan Necas 2018-09-14 12:20:14 UTC

*** This bug has been marked as a duplicate of bug 1615439 ***


Note You need to log in before you can comment on or make changes to this bug.