Skip to content

fix: JAVA_OPTS doens't work #405

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

Closed
wants to merge 2 commits into from
Closed

fix: JAVA_OPTS doens't work #405

wants to merge 2 commits into from

Conversation

TsuyoshiUshio
Copy link
Contributor

@TsuyoshiUshio TsuyoshiUshio commented Oct 23, 2020

Current worker config's JAVA_OPTS doesn't work. The reason is, the first arguments finish with -jar that assumes, after this argument, jar file name should come. That means, if we specify an option with JAVA_OPTS it break the configuration. The solution is swap the arguments order. I tested with mesh docker image with/without the option.

This work is related Distributed Tracing for Consumption Linux that requires new arguments for the java agent.

Until the release happens, I keep azure-functions-docker-private will copy this worker.config.json once this is released, I'll change it to use this commit.

{
    "description": {
        "language": "java",
        "extensions": [".jar"],
        "defaultExecutablePath": "%JAVA_HOME%/bin/java",
        "defaultWorkerPath": "azure-functions-java-worker.jar",
        "arguments": ["-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -noverify -Djava.net.preferIPv4Stack=true -jar ", "%JAVA_OPTS%",]
    }
}

@amamounelsayed
Copy link
Collaborator

Thank you so much @TsuyoshiUshio , as we talked offline we will add more information as it is working fine in windows with this current order.

@TsuyoshiUshio
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

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

Successfully merging this pull request may close these issues.

2 participants