.net core agent problem on debian kestrel nginx

Hello

We have a web application in .net core 2.0, published on Debian 9, Kestrel with Nginx reverse proxy web server. (no web.config, no app.config, no Docker)
We installed the .NET Core 2.0 agent (vs 8.3.360.0) on the server , we did all troubleshooting steps, but it doesn’t seems to send any data to the UI. We doesn’t have any log.

Does anyone has any idea on this case?

How are you starting your Kestrel app? The dotnet process needs to pick up the environment variables and if you have set them on your bash profile they may not be picked up by services started by things like systemd or supervisord. For these, you’ll need to add the environment variables to your unit file so that they are applied to the process when it starts up.

I’d also take a look at this troubleshooting guide here:

1 Like

Thanks for your help!

Unfortunately the log files didn’t appear. Our process is seeing the environment variables, according to the command that you supported. Also we gave the full rights on the entire agent directory for everyone.
We tried to run our application with the supported run.sh from the agent directory. Also we tried to run our service via systemctl. On both cases the environment variables were set correctly.

Hi @pemeric,

Can you verify the version of .NET Core you have installed? The agent does not support .NET Core 2.1 yet, and if you have that version of Core, it could explain the issue. If that’s not it, can you please provide a copy of the exact environment variables you are setting? Be sure to mask the license key, but leave everything else exactly the same. We may be missing something in the translation, so it would be good to verify everything is set correctly.

If I interpret correctly, we have the version .net core 2.0, according to https://www.microsoft.com/net/download/dotnet-core/2.0
and we have a print screen attached

Also here are the environment variables:

We set the NEW_RELIC_LICENSE_KEY and NEW_RELIC_APP_NAME too on the same location, but we can’t see them among the others.

due to these commands run “dotnet --version” and “dotnet --info”, 2 log files appeared:

NewRelic.Profiler.27096.log and NewRelic.Profiler.27160.log

1 Like

We had a symlink set: /usr/bin/dotnet -> …/share/dotnet/dotnet through which we started our application.
We changed this path to use the physical one and it worked. We have now log files and we see the metrics in the UI too.
Thank you for your help!

2 Likes

@pemeric Sweet! Thanks for following up here with the info on how you got this figured out!