Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

Fix razor-server service on EL7 #313

Merged
merged 1 commit into from Jul 10, 2015

Conversation

smcclellan
Copy link
Contributor

Systemd's .service file was referencing the absent HTTP_PORT variable. This
resulted in an empty string being passed to the service for its http.port
argument. Since an empty string can't be translated to an integer, this error
resulted:

JBAS014688: Wrong type for port. Expected [EXPRESSION, INT] but was STRING

The fix is simply supplying this environment variable, which works here in
the .env file.

Fixes https://tickets.puppetlabs.com/browse/RAZOR-629

@samwoods1
Copy link
Contributor

Any reason we might want to check to see if HTTP_PORT is already set before arbitrarily setting it to 8080? I can't think why it would be anything other than that, but who knows.

@smcclellan
Copy link
Contributor Author

We may potentially want to use a more descriptive name for the variable, like $RAZOR_HTTP_PORT or something. For now, this matches the behavior on the PE side, so I will ticket this to fix in both places for a future PR.

Update: Tracked by this PR.

JAVA_OPTS="-Xms128m -Xmx1024m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true"
HTTP_PORT=8080

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a small cost to add a newline add the end of files and it's generally recommended to avoid weird issues with some tools.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's an intellij setting to always do this

JAVA_OPTS="-Xms128m -Xmx1024m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "preferIPv4Stack" option sounds like it'll still let you use IPv6, but in fact it disables IPv6 entirely. Is this what you want? Will folks never want to use razor on IPv6-only hosts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably worth keeping in mind. I haven't heard any users bringing up any issues with this (it's been that way since the start). If this comes up as an issue, we can create a ticket and do testing without this argument.

Systemd's .service file was referencing the absent HTTP_PORT variable. This
resulted in an empty string being passed to the service for its http.port
argument. Since an empty string can't be translated to an integer, this error
resulted:

JBAS014688: Wrong type for port. Expected [EXPRESSION, INT] but was STRING

The fix is simply supplying this environment variable, which works here in
the .env file.

Fixes https://tickets.puppetlabs.com/browse/RAZOR-629
@smcclellan smcclellan merged commit 435e228 into puppetlabs-toy-chest:master Jul 10, 2015
@smcclellan
Copy link
Contributor Author

Added NEWS.md entry, rebased, and merged.

@smcclellan smcclellan deleted the fix-el7 branch July 10, 2015 22:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants