Skip to content

heartbeat forward and import from wakatime doesn't work on raspberry pi 4b #36

@Scallions

Description

@Scallions

Thank you for your excellent work. It works well on my x86 server but get some wrong on my arm device.
It can receive heartbeat from my pc but can't forward to other server.

This is my config

version: "3"
services:
  server:
    container_name: hakatime
    image: mujx/hakatime:v1.4.0-arm
    environment:
      # DB settings.
      HAKA_DB_HOST: haka_db
      HAKA_DB_PORT: 5432
      HAKA_DB_NAME: test
      HAKA_DB_PASS: test
      HAKA_DB_USER: test
      # Server settings.
      # Fill out this field if the api is behind another path (e.g behind a reverse proxy).
      # This will adjust the Set-Cookie path for all the /auth related API calls.
      HAKA_API_PREFIX: ""
      # Update this with the external endpoint that you use to access hakatime.
      HAKA_BADGE_URL: "http://192.168.20.141:9099"
      HAKA_PORT: 9090
      HAKA_SHIELDS_IO_URL: "https://img.shields.io"
      HAKA_ENABLE_REGISTRATION: "true" # Toggle after you've created your account.
      # Number of hours after which inactive browser sessions will expire (login required).
      HAKA_SESSION_EXPIRY: "24"
      HAKA_LOG_LEVEL: "info" # Control the verbosity of the logger.
      HAKA_ENV: "dev" # Use a json logger for production, otherwise key=value pairs.
      HAKA_HTTP_LOG: "true" # If you want to log http requests.
      GITHUB_TOKEN: "*******" # If you want to retrieve time spent per commit. No extra scope is required.
      # Add the following variables if you want to forward any received heartbeats to another
      # Wakatime compatible server.
      HAKA_REMOTE_WRITE_URL: "http://lede.scallions.cn:32772/api/v1/users/current/heartbeats.bulk"
      HAKA_REMOTE_WRITE_TOKEN: "*******"
    ports:
      - "0.0.0.0:9090:9090"
  haka_db:
    container_name: haka_db
    image: postgres:12-alpine
    environment:
      POSTGRES_DB: test
      POSTGRES_PASSWORD: test
      POSTGRES_USER: test
    volumes:
      - deploy_db_data:/var/lib/postgresql/data

volumes:
  deploy_db_data: {}

and the error logs

  • import log:
ts=2021-06-10T15:23:35.447388384Z level=Error host=ab6ff96575c8 msg=failed to execute import request 
ts=2021-06-10T15:23:35.447388384Z level=Error host=ab6ff96575c8 msg=http call to api.wakatime.com failed: InternalException (HandshakeFailed (Error_Protocol ("certificate has unknown CA",True,UnknownCa))) 
  • heartbeat forward log
ts=2021-06-10T15:02:09.242499084Z level=Info host=ab6ff96575c8 msg=received 1 heartbeats 
ts=2021-06-10T15:02:09.242499084Z level=Error host=ab6ff96575c8 msg=Malformed remote write URL was given 
202.114.122.241 - - [10/Jun/2021:15:02:09 +0000] "POST /api/v1/users/current/heartbeats.bulk HTTP/1.1" 200 - "" "wakatime/13.0.7 (macOS-10.16-x86_64-i386-64bit) Python3.8.1.final.0 vscode/1.56.2 vscode-wakatime/12.0.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions