{eval=Array;=+count(Array);}
2022-09-15 16:01:52 [AsyncTask] Task Started: [usdp03]初始化 Grafana 配置相关内容
TaskInfo:
[
hostname: usdp03,
ipv4: 172.22.2.7,
ipv6: null,
name: InitGrafanaSettingsTask,
desc: [usdp03]初始化 Grafana 配置相关内容,
exec: empty,
timeout: null,
args: [],
interactArgs: null,
state: RUNNING,
skippable: false
]
2022-09-15 16:01:56 [AsyncTask] Task Failed: [usdp03]初始化 Grafana 配置相关内容
TaskInfo:
[
hostname: usdp03,
ipv4: 172.22.2.7,
ipv6: null,
name: InitGrafanaSettingsTask,
desc: [usdp03]初始化 Grafana 配置相关内容,
exec: empty,
timeout: null,
args: [],
interactArgs: null,
state: FAILED,
skippable: false
]
null
2022-09-15 16:01:56 [AsyncTask] org.springframework.web.client.HttpClientErrorException$Unauthorized:
401 Unauthorized: [{"message":"Invalid username or password"}] at org.springframework.web.client.HttpClientErrorException.create(HttpClientErrorException.java:105)
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:170)
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:112)
at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63)
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:785)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:743)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:677)
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:586)
at cn.ucloud.udp.utils.GrafanaHandler.put(GrafanaHandler.java:422)
at cn.ucloud.udp.utils.GrafanaHandler.changePassword(GrafanaHandler.java:317)
at cn.ucloud.udp.async.task.impl.service.grafana.InitGrafanaSettingsTask.execute(InitGrafanaSettingsTask.java:55)
at cn.ucloud.udp.async.task.AbstractTask.run(AbstractTask.java:206)
at cn.ucloud.udp.async.task.AbstractTask.call(AbstractTask.java:192)
at cn.ucloud.udp.async.task.AbstractTask.call(AbstractTask.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
看报错是 grafana 用户名或密码错误
2022-09-15 16:01:56 [AsyncTask] org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 Unauthorized: [{"message":"Invalid username or password"}] ... at cn.ucloud.udp.utils.GrafanaHandler.changePassword(GrafanaHandler.java:317) ...
该操作是修改密码前的 grafana 无效密码报错。
解决方案:
重置 grafana admin 用户的密码为 admin
1. 登录 grafana 所在主机,访问 grafana 数据库
sqlite3 /data/udp/2.0.0.0/grafana/grafana.db
2. 修改 admin 密码
update user set password = '20bf1ecbb352eadd1c35bdb4a7fa099806f1c2291cb7e821b9fa4a2df02f2f214e5fd142186306f548be77451c0493acc69f', salt = 'uODV6hj5Ke', rands = 'L67uHxlegy' where login = 'admin'; .exit
3. 重试部署任务