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

passenger-status --show=xml does not display correctly #2248

Closed
KwanK1 opened this issue Jan 27, 2020 · 1 comment
Closed

passenger-status --show=xml does not display correctly #2248

KwanK1 opened this issue Jan 27, 2020 · 1 comment

Comments

@KwanK1
Copy link

KwanK1 commented Jan 27, 2020

Issue report

Question 1: What is the problem?
When running the command passenger-status --show=xml, we are unable to get the formatted XML and occasionally even the following error:

/usr/sbin/passenger-status:220:in `write': Broken pipe (Errno::EPIPE)
from /usr/sbin/passenger-status:220:in `block (2 levels) in format_with_xmllint' 

We do have xmllint installed. When running xmllint --version, we get back xmllint: using libxml version 20901

  • What is the expected behavior?
    • The expected behaviour would be to get back a formatted XML
  • What is the actual behavior?
    • Sometimes, we get back the error message above regarding "Broken pipe". This is more prevalent when we have a lot of different Passenger processes running at the same time.
    • Sometimes we get back the unformatted XML with a warning message *** Tip: if you install the 'xmllint' command then the XML output will be indented.. In this scenario, we also get back the following error along with this
 -:1: parser error : Unsupported encoding iso8859-1
<?xml version="1.0" encoding="iso8859-1" ?>
  • How can we reproduce it? Please try to provide a sample application (or Virtual Machine) demonstrating the issue. Otherwise, if we can't reproduce it, we might have to ask you a number of followup questions or run certain commands to try and figure out the problem.

To reproduce it, run passenger-status --show=xml

Question 2: Passenger version and integration mode:
Passenger Enterprise 6.0.1/nginx

Question 3: OS or Linux distro, platform (including version):
CentOS 7

Question 4: Passenger installation method:
Phusion YUM repo

Question 5: Your app's programming language (including any version managers) and framework (including versions):
Ruby 2.5.6

Question 6: Are you using a PaaS and/or containerization? If so which one?
Amazon ECS

Question 7: Anything else about your setup that we should know?
One thing that we have tried based on the above error message just to test is to change the encoding from iso8859-1 to iso-8859-1 manually by injecting the following line in the passenger-status file in the format_with_xmllint function (https://github.com/phusion/passenger/blob/stable-6.0/bin/passenger-status#L240)

xml = xml.gsub("iso8859-1", "iso-8859-1")

By doing so, we are able to properly retrieve the formatted XML consistently without issues.

Would it be possible to modify the encoding upstream when the XML is retrieved in passenger-status from iso8859-1 to iso-8859-1?

@CamJN
Copy link
Member

CamJN commented Feb 4, 2020

Fixed in next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants