0

I am in the process of creating an Azure Function Apps project. I get the following error when running the server.

Hosting environment: Production
Content root path:
/Users/dentonsavage/Projects/AzureFunctionTest/AzureFunctionTest/bin/Debug/netstandard2.0

Now listening on: http://localhost:7071 Application started. Press Ctrl+C to shut down. 
[7/9/18 9:48:39 PM] Reading host configuration file '/Users/dentonsavage/Projects/AzureFunctionTest/AzureFunctionTest/bin/Debug/netstandard2.0/host.json'
[7/9/18 9:48:39 PM] Host configuration file read:{} 
[7/9/18 9:48:39 PM] Starting Host (HostId=shoufu-1532713004, InstanceId=9869d715-4618-48f0-b0d1-16c4fea66dba, Version=2.0.11651.0, ProcessId=43170, AppDomainId=1, Debug=False, ConsecutiveErrors=0, StartupCount=1, FunctionsExtensionVersion=) 
[7/9/18 9:48:40 PM] Unable to configure java worker. Could not find JAVA_HOME app setting.
[7/9/18 9:48:40 PM] Could not configure language worker Java. 
[7/9/18 9:48:41 PM] Generating 1 job function(s) 
[7/9/18 9:48:41 PM] Found the following functions: 
[7/9/18 9:48:41 PM] AzureFunctionTest.HttpTrigger.Run
[7/9/18 9:48:41 PM] Host initialized (2120ms) Listening on
http://localhost:7071/ Hit CTRL-C to exit...

Http Functions:

HttpTrigger: http://localhost:7071/api/HttpTrigger

[7/9/18 9:48:43 PM] Host started (3920ms) 
[7/9/18 9:48:43 PM] Job host started 
[7/9/18 9:48:44 PM] Host lock lease acquired by instance ID '000000000000000000000000C475F100'.

Does anyone know how I can solve this issue? Thank you.

Jerry Liu
  • 17,282
  • 4
  • 40
  • 61

1 Answers1

1

Actually it's not an error. It's just a tip reminding us there's no JAVA_HOME configuration in your system environment variables.

It was used for java development before but has been proved unnecessary and removed in new version Azure Function core tools. See this issue.

So you can just ignore this harmless tip or install latest version function core tools to get rid of it.

Installation Steps:

  • Install .NET Core for macOS.
  • Install Homebrew, if it's not already installed.
  • Install the Core Tools package using bash:

    brew tap azure/functions
    brew install azure-functions-core-tools
    

After that navigate to Content root path:

/Users/dentonsavage/Projects/AzureFunctionTest/AzureFunctionTest/bin/Debug/netstandard2.0

Then input func start in bash to debug your project.

Jerry Liu
  • 17,282
  • 4
  • 40
  • 61
  • @DentonSavage Just check my old answers at the start of new year, Could you accept the answer if it does help? – Jerry Liu Jan 24 '19 at 02:51