• Categories
    • Recent
    • Tags
    • Popular
    • Register
    • Login

    Armbian - MyC V2 - install

    Scheduled Pinned Locked Moved General Discussion
    40 Posts 3 Posters 3.5k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      JeeLet
      last edited by JeeLet

      to avoid further errors.
      which directory / command for the installation ?
      yes this sentence translated in french is wrong " Pas dans mycontroller/executable"
      thanks

      create a directories to keep MyController server data and executable - arm64
      - sudo mkdir -p /opt/apps/mycontroller/mc_home
      - sudo mkdir -p /opt/apps/mycontroller/executable

      create directories to keep image files to show it MyController dashboard
      - sudo mkdir -p /opt/apps/mycontroller/mc_home/secure_share
      - sudo mkdir -p /opt/apps/mycontroller/mc_home/insecure_share

      download the bundle and extract on executable directory
      - cd /opt/apps/mycontroller

      what is the error ???

      jkandasaJ 1 Reply Last reply Reply Quote 0
      • jkandasaJ Offline
        jkandasa @JeeLet
        last edited by

        @JeeLet said in Armbian - MyC V2 - install:

        what is the error ???

        I would say to keep the things simple, use as follows,

        # create a directories to keep MyController server data and executable
        sudo mkdir -p /opt/apps/mycontroller/mc_home
        
        # download the bundle and extract on mycontroller directory
        sudo wget https://github.com/mycontroller-org/server/releases/download/master/mycontroller-server-master-linux-arm.tar.gz
        
        sudo tar xzf mycontroller-server-master-linux-arm.tar.gz  --strip-components=1 --directory /opt/apps/mycontroller
        
        # create directories to keep image files to show it MyController dashboard
        sudo mkdir -p /opt/apps/mycontroller/mc_home/secure_share
        sudo mkdir -p /opt/apps/mycontroller/mc_home/insecure_share
        
        1 Reply Last reply Reply Quote 0
        • J Offline
          JeeLet
          last edited by

          thank you jkandasa

          the installation procedure is updated 😉

          jkandasaJ 1 Reply Last reply Reply Quote 0
          • jkandasaJ Offline
            jkandasa @JeeLet
            last edited by

            Thanks @JeeLet !

            1 Reply Last reply Reply Quote 0
            • J Offline
              JeeLet
              last edited by JeeLet

              I redo a clean installation.
              by following the modification of the tuto .

              there is an error message for the installation of influxdb

               wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -
              Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
              E: This command can only be used by root.
              
              

              Fix “Waning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead”

              "Even if this is a warning message, you can continue to use apt-key, but it will be removed in the next releases. So it will be a good idea to start using the new way."

              "Solution:
              ..... new way of adding GPG keys to the system and avoiding the above warning.
              The following command will download a remote GPG key, encrypt it and save it..... "

              see how we can solve the problem.

              and maybe upgrade to version 2 of influxdata?

              J 1 Reply Last reply Reply Quote 0
              • J Offline
                JeeLet @JeeLet
                last edited by JeeLet

                influxdb2
                install with the new version of MyController
                (this is a lot, influxdb2 and MyC v2.00
                development/mycontroller-server-2.0.0-devel-linux-arm64.tar.gz)

                install :https://portal.influxdata.com/downloads/

                $ wget -q https://repos.influxdata.com/influxdata-archive_compat.key
                
                echo '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c && cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
                
                ----influxdata-archive_compat.key: OK---
                
                $ echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list
                
                $ sudo apt update
                
                ----Atteint :1 http://ports.ubuntu.com focal InRelease----
                ----Réception de :7 https://repos.influxdata.com/debian stable/main----
                
                $ sudo apt install influxdb2 
                
                $ systemctl start influxdb.service
                
                $ sudo systemctl enable influxdb.service
                
                $ sudo /opt/apps/mycontroller/mcctl.sh start
                
                ------ start command issued to the MyController server -----
                

                but a mistake, Log MyController

                hostId:}", "loggerConfig": {"Mode":"record_all","Encoding":"console","Level":{"Core":"info","WebHandler":"info","Storage":"info","Metric":"warn"},"EnableStacktrace":false}}
                2023-03-25T18:43:25.873+0100	error	metric_influxdb	extra_v1/admin.go:42	error on calling api	{"error": "failed with status code. [status: 401 Unauthorized, statusCode: 401, body: {\"code\":\"unauthorized\",\"message\":\"unauthorized access\"}]"}
                2023-03-25T18:43:25.873+0100	error	helper/server.go:112	error on getting metric database	{"error": "failed with status code. [status: 401 Unauthorized, statusCode: 401, body: {\"code\":\"unauthorized\",\"message\":\"unauthorized access\"}]"}
                2023-03-25T18:43:25.873+0100	fatal	cmd/root.go:38	error on starting server	{"error": "failed with status code. [status: 401 Unauthorized, statusCode: 401, body: {\"code\":\"unauthorized\",\"message\":\"unauthorized access\"}]"}
                2023-03-25T18:45:33.062+0100	info	helper/helper.go:29	welcome to MyController server :)
                2023-03-25T18:45:33.065+0100	info	helper/helper.go:33	version information	{"versionInfo": "{version:2.0.0-devel, buildDate:2023-03-24T15:27:53+00:00, gitCommit:7e4cd9f569fbf1b0894465bcdc023fe98704aad6, goVersion:go1.20.2, compiler:gc, platform:linux, arch:arm64, 
                

                no connection to the web page 🙂
                xxx.x.x.x refused to connect. 😞

                text alternatif
                influxDB is functional

                1 Reply Last reply Reply Quote 0
                • J Offline
                  JeeLet
                  last edited by JeeLet

                  I found the problem

                  in the config file: mycontroller.yaml

                  database: > metric: > disabled: true

                  it must be "true".
                  and it's ok, the MyC page is displayed

                  but I find myself with the error

                  "WARNING: Metrics database disabled"

                  a future with influxdb2 ....
                  Yes, I will have to open a new thread on the marriage between MyC and influxDB 🙂

                  text alternatif

                  jkandasaJ 1 Reply Last reply Reply Quote 0
                  • jkandasaJ Offline
                    jkandasa @JeeLet
                    last edited by

                    @JeeLet can you show your metric configuration? hide credentials
                    sample configuration: https://v2.mycontroller.org/docs/installation/advanced-installation/backend-configuration/#sample-of-cloud-influxdb-configuration

                    1 Reply Last reply Reply Quote 0
                    • J Offline
                      JeeLet
                      last edited by JeeLet

                      excuse me @jkandasa I gave up, a moment of tiredness.

                      I started all over again.
                      I started again with influxdb 1.xx .
                      For influxdb2.xx I start again in the week with another OdroidC2 .

                      it's not very good to want to test new versions at the same time, MyC2++ and influxDB2

                      but now I can install influxDB2 without any problem 🙂

                      jkandasaJ 1 Reply Last reply Reply Quote 1
                      • jkandasaJ Offline
                        jkandasa @JeeLet
                        last edited by

                        @JeeLet I tried influxdb2 locally and work ok.

                        once you setup influxdb2 in your host, setup a API TOKEN for mycontroller.
                        Details are in https://docs.influxdata.com/influxdb/cloud/security/tokens/create-token/#manage-tokens-in-the-influxdb-ui

                        metric database configuration will be looking like this,

                        metric:
                          disabled: false
                          type: influxdb
                          uri: http://192.168.122.1:8086
                          token: uBykOQ_17_m-KMdBkWa_UiTNpBViQH***akY_Rec_49kV0gLg_zZZw==
                          username:
                          password:
                          organization_name: myc_org
                          bucket_name: myc
                          batch_size:
                          flush_interval: 5s
                        
                        1 Reply Last reply Reply Quote 0
                        • J Offline
                          JeeLet
                          last edited by JeeLet

                          Thank you for the additional information.

                          yes, influxDB2 is working well with MyC 🙂

                          but I have to put the parameter to true

                          database: > metric: > disabled: true
                          

                          so that the web page opens, otherwise it's a black screen.

                          with as result the message :
                          "WARNING: Metrics database disabled

                          weird

                          it doesn't matter.
                          now I look at influxdb2 how to use it with myC

                          jkandasaJ 1 Reply Last reply Reply Quote 0
                          • jkandasaJ Offline
                            jkandasa @JeeLet
                            last edited by

                            @JeeLet can you share your database configuration?

                            J 1 Reply Last reply Reply Quote 0
                            • J Offline
                              JeeLet @jkandasa
                              last edited by

                              @jkandasa I found it

                              when MyC has not yet created data, a blank system (no connection and activation of the gateway)

                              the connection for the web page is not possible if
                              "metric: disabled : true"

                              MyController does not like to be alone 🙂

                              J 1 Reply Last reply Reply Quote 0
                              • J Offline
                                JeeLet @JeeLet
                                last edited by JeeLet

                                Error ... a new problem.

                                Request failed with status code 500
                                URL: /api/metric
                                Message: "invalid: failed to decode request body: organization name "myc_org" not found"

                                secret:  *********  #  THIS SECRET !!!
                                
                                # disable telemetry service, if you do not wish to share non-PII data
                                # non-PII - non Personally Identifiable Information
                                telemetry:
                                  enabled: true
                                
                                web:
                                  web_directory: web_console
                                  enable_profiling: false
                                  read_timeout: 60s
                                  http:
                                    enabled: true
                                    bind_address: "0.0.0.0"
                                    port: 8080
                                  https_ssl:
                                    enabled: true
                                    bind_address: "0.0.0.0"
                                    port: 8443
                                    cert_dir: mc_home/certs/https_ssl
                                  https_acme:
                                    enabled: false
                                    bind_address: "0.0.0.0"
                                    port: 9443
                                    cache_dir: mc_home/certs/https_acme
                                    acme_directory:
                                    email: hello@example.com
                                    domains: ["mycontroller.example.com"]
                                
                                logger:
                                  mode: record_all
                                  encoding: console
                                  enable_stacktrace: false
                                  level:
                                    core: info
                                    web_handler: info
                                    storage: info
                                    metric: warn
                                
                                directories:
                                  data: mc_home/data
                                  logs: mc_home/logs
                                  tmp: mc_home/tmp
                                  secure_share: mc_home/secure_share
                                  insecure_share: mc_home/insecure_share
                                
                                bus:
                                  type: embedded
                                  topic_prefix: mc_server
                                  server_url: nats://127.0.0.1:4222
                                  insecure: false
                                  connection_timeout: 10s
                                
                                gateway:
                                  disabled: false
                                  types: []
                                  ids: []
                                  labels:
                                    location: server
                                
                                handler:
                                  disabled: false
                                  types: []
                                  ids: []
                                  labels:
                                    location: server
                                
                                database:
                                  storage:
                                    type: memory
                                    dump_enabled: true
                                    dump_interval: 10m
                                    dump_dir: "memory_db"
                                    dump_format: ["yaml","json"]
                                    load_format: "yaml"
                                
                                  metric:
                                    disabled: true
                                    type: influxdb
                                    uri: http://127.0.0.1:8086
                                    token: IZw********RN****Lw==
                                    username:
                                    password:
                                    organization_name: myc_org
                                    bucket_name: myc
                                    batch_size:
                                    flush_interval: 5s
                                

                                Yes also the deletion of fields/nodes/gateway are not possible with the interface, it remains in memory, I am obliged to go in the yaml file and delete them 🙂

                                I'm going to take a little vacation.
                                I'm starting to lose track of why and how

                                jkandasaJ 1 Reply Last reply Reply Quote 0
                                • jkandasaJ Offline
                                  jkandasa @JeeLet
                                  last edited by

                                  @JeeLet

                                  I gave this as sample: organization_name: myc_org
                                  update to your organization, when you setup indluxdb 2

                                  Yes also the deletion of fields/nodes/gateway are not possible with the interface, it remains in memory, I am obliged to go in the yaml file and delete them

                                  I will check this

                                  I'm going to take a little vacation.

                                  Enjoy your vacation 🙂

                                  1 Reply Last reply Reply Quote 0
                                  • J Offline
                                    JeeLet
                                    last edited by

                                    update your organization, when you configure indluxdb 2 ... yes it is well understood, that's what I did .

                                    I just redid a new install, armbian/MyC/InfluxDB2 with the right configuration, and still the same "metric" problem

                                    I even tested on the Gateway sketch with the line
                                    "metric = getControllerConfig().isMetric;" ..... it's a firework of errors 🙂

                                    yes from the vacations
                                    and I forget about influxDB2 ( for the moment)

                                    1 Reply Last reply Reply Quote 0
                                    • J Offline
                                      JeeLet
                                      last edited by

                                      myC_2.x and influxDB1.8
                                      OdroidC2 and Armbian 23.02.2 Focal with Linux 6.1.11-meson64

                                      info    helper/helper.go:29     welcome to MyController server :)
                                      info    helper/helper.go:33     version information     {"versionInfo": "{version:2.0.0-devel, buildDate:2023-03-24T15:27:53+00:00, gitCommit:7e4cd9f569fbf1b0894465bcdc023fe98704aad6, goVersion:go1.20.2, compiler:gc, platform:linux, arch:arm64, h>
                                      info    backup/restore.go:170   executing import job    {"sourceDir": "mc_home/data/storage/memory_db/yaml", "fileType": "yaml"}
                                      info    helper/server_defaults.go:30    error on fetching system settings, assuming it is fresh install and populating default details. if not, report this issue       {"error": "no documents in result"}
                                      
                                      error   api.settings_api        settings/update_geo_location.go:69      error on getting geo location, updating location details with default values and disabling auto update  {"error": "Get \"https://ipinfo.io/json\": dial tcp: lookup ipinfo.io >
                                      
                                      info    api.settings_api        settings/update_geo_location.go:85      location data to be updated     {"location": {"autoUpdate":false,"locationName":"Namakkal","latitude":11.2222469,"longitude":78.1650174}}
                                      info    helper/server_defaults.go:104   there is no user available in the storage database. creating default user 'admin'
                                      info    helper/server.go:401    checking for upgrade    {"lastUpgradePatch": "2.0.0-1"}
                                      info    route_handler   http_router/handler.go:111      secure share directory included {"directory": "mc_home/secure_share", "handlerPath": "/secure_share"}
                                      info    route_handler   http_router/handler.go:116      insecure share directory included       {"directory": "mc_home/insecure_share", "handlerPath": "/insecure_share"}
                                      info    gateway_service gateway/listener.go:22  gateway service filter config   {"filter": {"Disabled":false,"MatchAll":false,"Types":[],"IDs":[],"Labels":{"location":"server"}}}
                                      info    handler_service handler/service_listener.go:86  handler service filter config   {"filter": {"Disabled":false,"MatchAll":false,"Types":[],"IDs":[],"Labels":{"location":"server"}}}
                                      info    system_jobs_service     system_jobs/job_telemetry.go:41 telemetry data reporter job scheduled   {"cron": "0 48 3 * * *"}
                                      info    system_jobs_service     system_jobs/job_telemetry.go:45
                                      

                                      bybye

                                      1 Reply Last reply Reply Quote 1
                                      • W Offline
                                        wint0178
                                        last edited by

                                        I have been following the install instructions as laid out by JeeLet on 13 March 2022, but the URL for the v2 download on GitHub is not working. What URL should I direct my Pi terminal to for the server install? I am trying to get the server installed on my Pi running the newest RPi OS, but have stalled out. I ran the

                                        @JeeLet said in Armbian - MyC V2 - install:

                                        ls /opt/apps/mycontroller/

                                        command and only got "mc_home mycontroller.yaml" as the response. I assume this means I do not actually have the MC server package downloaded and placed correctly on my Pi.

                                        I have installed influxdb and appear to get the correct responses in the terminal, but can't get it to start the MC Server and believe it is likley not installed correctly or at all.

                                        1 Reply Last reply Reply Quote 0
                                        • J Offline
                                          JeeLet
                                          last edited by JeeLet

                                          the doc is updated: "20 juin 2023 "

                                          look at the example in Docker : https://mycontroller.org/docs/installation/quick-installation/docker-container/

                                          or without dockers https://github.com/mycontroller-org/server/releases/tag/development

                                          yes, jkandasa has overhauled the code structure, maybe that's the reason for the problems?

                                          jkandasaJ 1 Reply Last reply Reply Quote 0
                                          • jkandasaJ Offline
                                            jkandasa @JeeLet
                                            last edited by

                                            @JeeLet @wint0178 recently I released the version 2.0.0, the location changes. also I changed some of the paths. I will go through the installation steps soon as possible and update the required corrections

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            0

                                            Online

                                            587

                                            Users

                                            529

                                            Topics

                                            3.4k

                                            Posts
                                            Copyright © 2015-2025 MyController.org | Contributors | Localization