teslamate-org / teslamate

A self-hosted data logger for your Tesla 🚘
https://docs.teslamate.org
MIT License
5.57k stars 698 forks source link

Grafana kept refreshing by itself, with some error message appears and disappears quickly. #3983

Closed kas12323 closed 1 week ago

kas12323 commented 2 weeks ago

Is there an existing issue for this?

What happened?

For example, when I click 'Drives', it goes to grafana, but the page kept refresh by itself with some error message flashing, I captured some messages with my camera, says'Templating [car_id]. Error updating options: error when executing the sql query'. Sometimes after several refreshes, it will back to normal, and all the data are looks good, everything works fine. I upload a screen record, you may want to see it.

https://github.com/teslamate-org/teslamate/assets/90122331/cd557c0b-5bb0-45b2-8024-9a8857b80745

Expected Behavior

No response

Steps To Reproduce

No response

Relevant log output

logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:24.203209577Z level=warn msg=Unauthorized error="context canceled" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:24.203259577Z level=info msg="Request Completed" method=GET path=/api/search status=401 remote_addr=192.168.31.250 time_ms=99 duration=99.206074ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/search/ status_source=server
logger=authn.service t=2024-06-20T14:31:24.206744429Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:24.206796706Z level=warn msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:24.206837466Z level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr=192.168.31.250 time_ms=329 duration=329.923907ms size=40 referer= handler=/api/live/ws status_source=server
logger=authn.service t=2024-06-20T14:31:24.628522021Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:24.62858291Z level=warn msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:24.628668114Z level=info msg="Request Completed" method=GET path=/api/dashboards/home status=401 remote_addr=192.168.31.250 time_ms=85 duration=85.64663ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/dashboards/home status_source=server
logger=authn.service t=2024-06-20T14:31:24.630181965Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:24.630234243Z level=warn msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:24.630277188Z level=info msg="Request Completed" method=GET path=/api/dashboards/home status=401 remote_addr=192.168.31.250 time_ms=87 duration=87.224259ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/dashboards/home status_source=server
logger=context userId=1 orgId=1 uname=admin t=2024-06-20T14:31:24.697312169Z level=error msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=1 orgId=1 uname=admin t=2024-06-20T14:31:24.697376928Z level=info msg="Request Completed" method=POST path=/api/user/auth-tokens/rotate status=401 remote_addr=192.168.31.250 time_ms=132 duration=132.853834ms size=39 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/user/auth-tokens/rotate status_source=server
logger=context userId=1 orgId=1 uname=admin t=2024-06-20T14:31:24.714145021Z level=error msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=1 orgId=1 uname=admin t=2024-06-20T14:31:24.714195762Z level=info msg="Request Completed" method=POST path=/api/user/auth-tokens/rotate status=401 remote_addr=192.168.31.250 time_ms=80 duration=80.337814ms size=39 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/user/auth-tokens/rotate status_source=server
logger=authn.service t=2024-06-20T14:31:24.718666632Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:24.718860058Z level=warn msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:24.718924669Z level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr=192.168.31.250 time_ms=244 duration=244.179963ms size=40 referer= handler=/api/live/ws status_source=server

ontext userId=1 orgId=1 uname=admin t=2024-06-20T14:31:24.820624817Z level=info msg="Request Completed" method=GET path=/api/live/ws status=-1 remote_addr=192.168.31.250 time_ms=1 duration=1.832018ms size=0 referer= handler=/api/live/ws status_source=server
logger=authn.service t=2024-06-20T14:31:25.069597243Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.069756891Z level=warn msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.06985315Z level=info msg="Request Completed" method=GET path=/api/dashboards/home status=401 remote_addr=192.168.31.250 time_ms=92 duration=92.437926ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/dashboards/home status_source=server
logger=authn.service t=2024-06-20T14:31:25.085052428Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.119486558Z level=error msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.119551095Z level=info msg="Request Completed" method=POST path=/api/user/auth-tokens/rotate status=401 remote_addr=192.168.31.250 time_ms=209 duration=209.22637ms size=39 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/user/auth-tokens/rotate status_source=server
logger=authn.service t=2024-06-20T14:31:25.132559613Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.132621743Z level=warn msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.132670447Z level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr=192.168.31.250 time_ms=220 duration=220.510981ms size=40 referer= handler=/api/live/ws status_source=server
logger=authn.service t=2024-06-20T14:31:25.217086132Z level=warn msg="Failed to authenticate request" client=auth.client.session error="context canceled"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.217163761Z level=warn msg=Unauthorized error="context canceled" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.21721928Z level=info msg="Request Completed" method=GET path=/api/search status=401 remote_addr=192.168.31.250 time_ms=54 duration=54.899167ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/search/ status_source=server
logger=authn.service t=2024-06-20T14:31:25.262861113Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.262942206Z level=info msg="Request Completed" method=GET path=/ status=302 remote_addr=192.168.31.250 time_ms=50 duration=50.692055ms size=29 referer="http://192.168.31.13:3000/?orgId=1" handler=/ status_source=server
logger=authn.service t=2024-06-20T14:31:25.263644873Z level=warn msg="Failed to authenticate request" client=auth.client.session error="context canceled"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.263688558Z level=warn msg=Unauthorized error="context canceled" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.263730428Z level=info msg="Request Completed" method=GET path=/api/user/orgs status=401 remote_addr=192.168.31.250 time_ms=105 duration=105.005203ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/user/orgs status_source=server
logger=context userId=1 orgId=1 uname=admin t=2024-06-20T14:31:25.286960113Z level=info msg="Request Completed" method=GET path=/login status=302 remote_addr=192.168.31.250 time_ms=17 duration=17.674889ms size=32 referer="http://192.168.31.13:3000/?orgId=1" handler=/login status_source=server
logger=authn.service t=2024-06-20T14:31:25.354371132Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.354434113Z level=warn msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.35447728Z level=info msg="Request Completed" method=GET path=/api/dashboards/home status=401 remote_addr=192.168.31.250 time_ms=475 duration=475.529704ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/dashboards/home status_source=server
logger=authn.service t=2024-06-20T14:31:25.44873315Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.448792428Z level=warn msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.448848706Z level=info msg="Request Completed" method=GET path=/api/dashboards/home status=401 remote_addr=192.168.31.250 time_ms=570 duration=570.779259ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/dashboards/home status_source=server
logger=authn.service t=2024-06-20T14:31:25.473307946Z level=warn msg="Failed to authenticate request" client=auth.client.session error="context canceled"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.473368224Z level=warn msg=Unauthorized error="context canceled" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.473419743Z level=info msg="Request Completed" method=GET path=/api/search status=401 remote_addr=192.168.31.250 time_ms=271 duration=271.943426ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/search/ status_source=server
logger=authn.service t=2024-06-20T14:31:25.473995317Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.474075039Z level=info msg="Request Completed" method=GET path=/ status=302 remote_addr=192.168.31.250 time_ms=179 duration=179.819148ms size=29 referer="http://192.168.31.13:3000/?orgId=1" handler=/ status_source=server
logger=context userId=1 orgId=1 uname=admin t=2024-06-20T14:31:25.500308576Z level=info msg="Request Completed" method=GET path=/login status=302 remote_addr=192.168.31.250 time_ms=15 duration=15.288741ms size=32 referer="http://192.168.31.13:3000/?orgId=1" handler=/login status_source=server
logger=authn.service t=2024-06-20T14:31:25.903952057Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.904205594Z level=warn msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.904259002Z level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr=192.168.31.250 time_ms=229 duration=229.521556ms size=40 referer= handler=/api/live/ws status_source=server
logger=authn.service t=2024-06-20T14:31:25.952626668Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.952689983Z level=warn msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:25.952751705Z level=info msg="Request Completed" method=GET path=/api/dashboards/home status=401 remote_addr=192.168.31.250 time_ms=209 duration=209.752555ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/dashboards/home status_source=server
logger=authn.service t=2024-06-20T14:31:26.072518761Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:26.073188761Z level=error msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:26.073236428Z level=info msg="Request Completed" method=POST path=/api/user/auth-tokens/rotate status=401 remote_addr=192.168.31.250 time_ms=396 duration=396.140148ms size=39 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/user/auth-tokens/rotate status_source=server
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:26.171193372Z level=info msg="Request Completed" method=GET path=/ status=302 remote_addr=192.168.31.250 time_ms=88 duration=88.2875ms size=47 referer="http://192.168.31.13:3000/?orgId=1" handler=/ status_source=server
logger=context userId=1 orgId=1 uname=admin t=2024-06-20T14:31:26.233945335Z level=info msg="Request Completed" method=GET path=/user/auth-tokens/rotate status=302 remote_addr=192.168.31.250 time_ms=55 duration=55.399537ms size=32 referer="http://192.168.31.13:3000/?orgId=1" handler=/user/auth-tokens/rotate status_source=server

ontext userId=1 orgId=1 uname=admin t=2024-06-20T14:31:26.500772316Z level=info msg="Request Completed" method=GET path=/api/live/ws status=-1 remote_addr=192.168.31.250 time_ms=41 duration=41.1205ms size=0 referer= handler=/api/live/ws status_source=server
logger=authn.service t=2024-06-20T14:31:26.657496761Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=authn.service t=2024-06-20T14:31:26.657904853Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:26.657949742Z level=warn msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:26.65804152Z level=info msg="Request Completed" method=GET path=/api/search status=401 remote_addr=192.168.31.250 time_ms=75 duration=75.165056ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/search/ status_source=server
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:26.658158501Z level=error msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:26.658198038Z level=info msg="Request Completed" method=POST path=/api/user/auth-tokens/rotate status=401 remote_addr=192.168.31.250 time_ms=196 duration=196.250537ms size=39 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/user/auth-tokens/rotate status_source=server
logger=authn.service t=2024-06-20T14:31:26.664064927Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:26.664137946Z level=warn msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:26.664194631Z level=info msg="Request Completed" method=GET path=/api/dashboards/home status=401 remote_addr=192.168.31.250 time_ms=124 duration=124.921592ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/dashboards/home status_source=server
logger=context userId=1 orgId=1 uname=admin t=2024-06-20T14:31:26.665736983Z level=error msg="Search failed" error="context canceled" remote_addr=192.168.31.250 traceID=
logger=context userId=1 orgId=1 uname=admin t=2024-06-20T14:31:26.665795983Z level=error msg="Request Completed" method=GET path=/api/search status=500 remote_addr=192.168.31.250 time_ms=3 duration=3.167851ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/search/ status_source=server
logger=context userId=1 orgId=1 uname=admin t=2024-06-20T14:31:26.666630687Z level=error msg="Search failed" error="context canceled" remote_addr=192.168.31.250 traceID=
logger=context userId=1 orgId=1 uname=admin t=2024-06-20T14:31:26.666679779Z level=error msg="Request Completed" method=GET path=/api/search status=500 remote_addr=192.168.31.250 time_ms=58 duration=58.901518ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/search/ status_source=server
logger=context userId=1 orgId=1 uname=admin t=2024-06-20T14:31:26.678678724Z level=error msg="Search failed" error="context canceled" remote_addr=192.168.31.250 traceID=
logger=context userId=1 orgId=1 uname=admin t=2024-06-20T14:31:26.678822872Z level=error msg="Request Completed" method=GET path=/api/search status=500 remote_addr=192.168.31.250 time_ms=16 duration=16.89563ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/search/ status_source=server
logger=authn.service t=2024-06-20T14:31:26.697655149Z level=warn msg="Failed to authenticate request" client=auth.client.session error="context canceled"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:26.697723724Z level=warn msg=Unauthorized error="context canceled" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:26.69778789Z level=info msg="Request Completed" method=GET path=/api/plugins status=401 remote_addr=192.168.31.250 time_ms=89 duration=89.387185ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/plugins status_source=server
logger=authn.service t=2024-06-20T14:31:26.936381038Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:26.937072668Z level=error msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:26.937120075Z level=info msg="Request Completed" method=POST path=/api/user/auth-tokens/rotate status=401 remote_addr=192.168.31.250 time_ms=130 duration=130.431241ms size=39 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/user/auth-tokens/rotate status_source=server
logger=authn.service t=2024-06-20T14:31:27.055377853Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:27.055448316Z level=warn msg=Unauthorized error="user token not found" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:27.055490927Z level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr=192.168.31.250 time_ms=246 duration=246.707092ms size=40 referer= handler=/api/live/ws status_source=server
logger=authn.service t=2024-06-20T14:31:27.170213038Z level=warn msg="Failed to authenticate request" client=auth.client.session error="context canceled"
logger=authn.service t=2024-06-20T14:31:27.170356557Z level=warn msg="Failed to authenticate request" client=auth.client.session error="context canceled"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:27.170384816Z level=warn msg=Unauthorized error="context canceled" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:27.170395223Z level=warn msg=Unauthorized error="context canceled" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:27.170440279Z level=info msg="Request Completed" method=GET path=/api/dashboards/home status=401 remote_addr=192.168.31.250 time_ms=296 duration=296.431555ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/dashboards/home status_source=server
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:27.170440094Z level=info msg="Request Completed" method=GET path=/api/dashboards/home status=401 remote_addr=192.168.31.250 time_ms=296 duration=296.105981ms size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/dashboards/home status_source=server
logger=authn.service t=2024-06-20T14:31:27.171411557Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:27.171531112Z level=info msg="Request Completed" method=GET path=/ status=302 remote_addr=192.168.31.250 time_ms=229 duration=229.221833ms size=29 referer="http://192.168.31.13:3000/?orgId=1" handler=/ status_source=server
logger=context userId=1 orgId=1 uname=admin t=2024-06-20T14:31:27.258974482Z level=info msg="Request Completed" method=GET path=/login status=302 remote_addr=192.168.31.250 time_ms=79 duration=79.019352ms size=32 referer="http://192.168.31.13:3000/?orgId=1" handler=/login status_source=server
logger=authn.service t=2024-06-20T14:31:27.312521908Z level=warn msg="Failed to authenticate request" client=auth.client.session error="context canceled"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:27.312597945Z level=warn msg=Unauthorized error="context canceled" remote_addr=192.168.31.250 traceID=
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:27.31266239Z level=info msg="Request Completed" method=GET path=/api/dashboards/home status=401 remote_addr=192.168.31.250 time_ms=1570 duration=1.570791017s size=40 referer="http://192.168.31.13:3000/?orgId=1" handler=/api/dashboards/home status_source=server
logger=authn.service t=2024-06-20T14:31:27.347425519Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
logger=context userId=0 orgId=0 uname= t=2024-06-20T14:31:27.347511019Z level=info msg="Request Completed" method=GET path=/ status=302 remote_addr=192.168.31.250 time_ms=79 duration=79.558926ms size=29 referer="http://192.168.31.13:3000/?orgId=1" handler=/ status_source=server
logger=authn.service t=2024-06-20T14:31:27.438696871Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"

Screenshots

No response

Additional data

No response

Type of installation

Docker

Version

v1.29.2

cwanja commented 2 weeks ago

Looks like there is authentication errors in the logs. Have you changed anything in your Docker Compose?

Were you using default values? Are there extra spaces by chance?

kas12323 commented 2 weeks ago

Looks like there is authentication errors in the logs. Have you changed anything in your Docker Compose?

Were you using default values? Are there extra spaces by chance?

I removed a proxy setting on docker compose, nothing else except that. I’m using default values except password. There are no extra spaces in docker compose files. I’m sure all my settings are correct because I’ve running Teslamate for a year and it works fine until recently. By the way, I think this issue comes after a power loss on my raspberry pi, are these things related?

kas12323 commented 2 weeks ago

Looks like there is authentication errors in the logs. Have you changed anything in your Docker Compose?

Were you using default values? Are there extra spaces by chance?

I also reinstalled the teslamate, include manually remove all related containers, volumes, images. After loading my backup files, this issue happens again.

gisxlab commented 2 weeks ago

I had the same problem. My cloud server did not have a power outage. It started after Tesla updated its API a while ago and has been there ever since. I tried to deploy it on an external server, and the problem reappeared after I opened the grafana panel, regardless of whether I restored the data or not, and even used new Tesla API tokens. By the way, for ease of management, I used "Advanced installation with Traefik, Let's Encrypt & HTTP Basic Auth" for deployment.

我出现了同样的问题,我的云服务器并没有出现断电的情况,而是在前段时间Tesla更新了API之后就出现且一直存在的。 我尝试在外网服务器部署,不论恢复数据与否,甚至使用了全新Tesla API tokens,的该问题在打开grafana面板之后再次出现。 对了,我为了方便管理,使用的是“Advanced installation with Traefik, Let's Encrypt & HTTP Basic Auth”部署。

cwanja commented 2 weeks ago

I removed a proxy setting on docker compose, nothing else except that.

What did that proxy server do? If you put it back, do your errors go away?

By the way, I think this issue comes after a power loss on my raspberry pi, are these things related?

Only thing I could think of from that would be a corrupted SD card.

JakobLichterfeld commented 2 weeks ago

I ajsusme a adblocker issue

kas12323 commented 2 weeks ago

I ajsusme a adblocker issue

No, I didn’t install anything about adblocker on my teslamate server and my phone. I use different phones and browsers to access grafana but it ends up same.

kas12323 commented 2 weeks ago

I removed a proxy setting on docker compose, nothing else except that.

What did that proxy server do? If you put it back, do your errors go away?

By the way, I think this issue comes after a power loss on my raspberry pi, are these things related?

Only thing I could think of from that would be a corrupted SD card.

I used to running Clash on my raspberry pi. That proxy is about Clash. I put it back but this issue still exists.

JakobLichterfeld commented 2 weeks ago

So it's not an ad blocker but a proxy issue.

kas12323 commented 2 weeks ago

I’ve reinstalled the whole system, and there is no proxy now, but it still exists.发自我的 iPhone在 2024年6月23日,13:09,JakobLichterfeld @.***> 写道: So it's not an ad blocker but a proxy issue.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

JakobLichterfeld commented 2 weeks ago

Which browser are you using?

kas12323 commented 2 weeks ago

I use safari and google chrome.发自我的 iPhone在 2024年6月24日,20:48,JakobLichterfeld @.***> 写道: Which browser are you using?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

JakobLichterfeld commented 2 weeks ago

OK.

Obviously, it is an authentication issue. Please double-check your docker-compose.yml and compare it to https://docs.teslamate.org/docs/installation/docker/. Please check if you use correct user and password combinations.

kas12323 commented 2 weeks ago

It’s not only an authentication issue, the logs are much more and I only get some of it. On the browser, it first shows sql error, then after many refreshes, the authentication error appears.发自我的 iPhone在 2024年6月24日,22:17,JakobLichterfeld @.***> 写道: OK. Obviously, it is an authentication issue. Please double-check your docker-compose.yml and compare it to https://docs.teslamate.org/docs/installation/docker/. Please check if you use correct user and password combinations.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

xFichtl1 commented 1 week ago

Want to say, that I have the same problem. I just installed TeslaMate in a LXC Container setup with the following script: https://tteck.github.io/Proxmox/#docker-lxc. Created a docker-compose script file with the content from the installation site. Logged into TeslaMate with the API Token and Refresh Token. Then logged into Grafana and changed the default PW. After logging in to Grafana, I get the following error in Firefox: image

My network tab gets spammed with these rotate network calls (if I have the network tools open for more than 30 seconds, Firefox freezes to death), that have an empty JSON as a result: image

And got message like this one in my logs:

grafana-1    | logger=context userId=0 orgId=0 uname= t=2024-06-26T19:40:49.486018485Z level=error msg=Unauthorized error="user token not found" remote_addr=10.3.105.106 traceID= 

If you need additional info, I am ready to help.

Edit: Forgot to include the script link

JakobLichterfeld commented 1 week ago

Then logged into Grafana and changed the default PW

Only change password in docker-compose.yml

xFichtl1 commented 1 week ago

Ok, I reset Grafana with bringing down the service docker compose rm -sv grafana. Then deleted the volume: docker volume rm root_teslamate-grafana-data and brought the service up docker compose up -d grafana. Now Grafana wants me to change the PW again, but this time I skipped it. Now I am still having the same problems, meaning changing the password was not the problem.

I forgot to include that the above line in the log is followed with another one:

grafana-1    | logger=authn.service t=2024-06-27T10:43:52.136529678Z level=warn msg="Failed to authenticate request" client=auth.client.session error="user token not found"
grafana-1    | logger=context userId=0 orgId=0 uname= t=2024-06-27T10:43:52.136544668Z level=warn msg=Unauthorized error="user token not found" remote_addr=10.3.105.106 traceID=
JakobLichterfeld commented 1 week ago

Now Grafana wants me to change the PW again

As teslamate-grafana does not have this behavior, we are not able to support on this. Only https://docs.teslamate.org/docs/installation/docker/ is supported. (you use an ip without any port for grafana for example)

As a hint: you need to delete your cookies when messing with your grafana, but this is not a teslamate issue

xFichtl1 commented 1 week ago

Ok, I just throw the LXC Container away and made a fresh start. The only thing this time, I changed, is that I went into the TeslaMate settings and inserted the Grafana Dashboard URL. Then I navigated through the Teslamate link to Grafana, and now I see at least a dashboard. But everywhere is standing "No Data" and it still is spamming rotate network calls. The thing with "No data" is probably because I reset everything, and it needs to collect data, but I still sometimes get a "NetworkError couldn't fetch resources" error

Edit:

Now Grafana wants me to change the PW again

Should have been the right behavior if I deleted the volume of Grafana, or not?. Or does it store the password in Postgres? Also I forgot to say, that I followed this before deleting the container, so that could also be the reason. Sorry for forgetting it.

xFichtl1 commented 1 week ago

Ok, I fixed now the issue. uBlock Origin was the culprit. I disabled it last time, but I created the docker container this time on another IP and forgot to disable uBlock Origin on that IP.

gisxlab commented 1 week ago

I found the reason, it's a proxy problem. The correct way is: first deploy using ports 80 and 443, and after obtaining the complete certificate, change to other ports again, such as 8080/8443 ports and redeploy once. However, the problem with this is: when the SSL certificate expires, you need to manually modify the certificate content, and you may also need to redeploy. Also, when using the reverse proxy to port 8443, the previous situation will still occur.

我找到原因了,这是一个代理问题。正确的做法是:首先使用80和443端口部署,获取到完整的证书后,再次更换为其他端口,譬如8080/8443端口重新部署一次即可用。但是这样做存在的问题是:当SSL证书过期后需要手动去修改证书内容,也有可能需要重新部署。 还有,当使用反向代理到8443端口后,还是会出现之前的情况。

JakobLichterfeld commented 1 week ago

Glad both of you solved your issues. As assumed initially, proxy issue and ad blocker issue.

kas12323 commented 1 week ago

Glad both of you solved your issues. As assumed initially, proxy issue and ad blocker issue.

Hey, that’s not me. I didn’t use proxy and adblocker, please fix my issue.

JakobLichterfeld commented 1 week ago

Glad both of you solved your issues. As assumed initially, proxy issue and ad blocker issue.

Hey, that’s not me. I didn’t use proxy and adblocker, please fix my issue.

Sorry, two others hijacked your issue

JakobLichterfeld commented 1 week ago

please fix my issue.

That's up to you. We can only support on this.

Please share your docker-compose.yml without secrets. Also your system spec, proxy servers, ad blockers etc.

kas12323 commented 1 week ago

please fix my issue.

That's up to you. We can only support on this.

Please share your docker-compose.yml without secrets. Also your system spec, proxy servers, ad blockers etc.

Good news, my grafana backs to normal, no error messages. The bad news is that I don’t know how it recovers. I didn’t do anything, it recovered by itself. I will continue using it for a while to see if that error messages appear again. Thanks!

kas12323 commented 1 week ago

please fix my issue.

That's up to you. We can only support on this.

Please share your docker-compose.yml without secrets. Also your system spec, proxy servers, ad blockers etc.

This is my docker-compose.yml file:

services: teslamate: image: teslamate/teslamate:latest restart: always environment:

kas12323 commented 1 week ago

please fix my issue.

That's up to you. We can only support on this. Please share your docker-compose.yml without secrets. Also your system spec, proxy servers, ad blockers etc.

Good news, my grafana backs to normal, no error messages. The bad news is that I don’t know how it recovers. I didn’t do anything, it recovered by itself. I will continue using it for a while to see if that error messages appear again. Thanks!

please fix my issue.

That's up to you. We can only support on this.

Please share your docker-compose.yml without secrets. Also your system spec, proxy servers, ad blockers etc.

I’m using docker running on a raspberry pi5 to run teslamate. I have no proxy servers and no adblockers. The browsers I use are safari and Chrome on iPhone and Mac, the two browsers have no extra plugins and all using default settings.