-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[Bug]: claim request failed with proxy #19096
Comments
Perhaps these environment variables are set only for Can you check ## Change PID to Netdata's PID
sudo cat /proc/PID/environ | tr '\0' '\n' |
Thank you for looking into this.
Interessting, looks like the netdata-agent (process) is also using the user root? |
Netdata runs as the |
Here I show you if I specify the proxy direct in the configuration claim also fails.
|
I was able to set the env variables also for the netdata user:
But claim still fails:
|
Hi @kn-ulf, This should not be happening. I am sorry for the frustration this may have cause. Let me review the code and I will write here my findings. First, let me assure you that we will make it work. Netdata uses There are a 4 different methods for claiming: 1. Via the UIIn this case the proxy configuration comes from the However, I see in the code this:
So, in this case, if you have set 2. Via
|
I merged a change to log the proxy Netdata uses and also change the default in all cases to |
Tested Netdata v2.0.0-126-nightly with Tinyproxy: claiming and connection successful. Setup:
For claiming I used $ cat -pp /opt/netdata/etc/netdata/claim.conf
[global]
# url = https://app.netdata.cloud
proxy = http://10.10.10.21:8888
token = TOKEN
rooms = ROOM_ID |
Hi, Let me try to sort the topics a little bit and please correct me if I got it wrong. 1. Manual configuration in config file(s)I understood that there is a way to set proxy manually in the configuration file(s).
and the second file, to make claim work, is /etc/netdata/claim.conf and the option is:
and only if I adjust both files with both options shown above claiming and netdata will work using the proxy. 2. Set proxy as environment variableI understood that I have to make sure the netdata user environment and only this environment needs to have the proxy variable set.
As far as I can say that's not documented anywhere at netdata because its not netdata specific how to set environment variables for users with without shell access (nologin). Again sorry if I mixed or misunderstood things here, and thank you for your help. |
@kn-ulf please don't use capital letters in On a vanilla netdata installation (so the default settings is Also settings In
In
If you set both of them, note that
You mean about setting the proxy for systemd services? Yes, it is not documented because this is supposed to be systemd (initrc, openrc, etc) documentation. Each system has its own unique ways.
I only set it to The key change I made for you, was to log the proxy used when
Should now have information about the proxy used ( |
Bug description
Hi,
I have to use a proxy to connect to internet resources, that's why there are always environment variables set for the proxy.
[root@localhost ~]# env | grep -i proxy
HTTP_PROXY=http://sanitized.proxy.url:80
FTP_PROXY=http://sanitized.proxy.url:80
https_proxy=http://sanitized.proxy.url:80
http_proxy=http://sanitized.proxy.url:80
no_proxy=127.0.0.1,localhost,.sanitzed.url,10.0.0.0/8
NO_PROXY=127.0.0.1,localhost,.sanitzed.url,10.0.0.0/8
HTTPS_PROXY=http://sanitized.proxy.url:80
ftp_proxy=http://sanitized.proxy.url:80
[root@localhost ~]#
after installation of the netdata agent (I tested with stable version 2.0.1, 2.0.2, and 2.0.3) the logging shows:
the netdata configuration shows:
I read out of this setting that if there is a proxy env variable set claim should use it?
I see also this line in the logs:
I wonder why the proxy is empty here?
If I try to reach with curl, I can reach it:
I have also tried to set the proxy in the configuration directly like (and restarted netdata after setting the proxy):
But claim fails with the same error message.
Expected behavior
I would expect that claim should be able to register the agent in the netdata cloud and reach netdata services using the proxy environment variables. Or at least when I configure the proxy in the netdata.conf file.
Steps to reproduce
Installation method
kickstart.sh
System info
Netdata build info
Additional info
No response
The text was updated successfully, but these errors were encountered: