• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

New Setup - Log Filled with "CreatePlatformSocket() failed: Address family not supported by protocol (97)"

Scheduled Pinned Locked Moved Solved Troubleshooting
11 Posts 3 Posters 3.4k Views 3 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.
  • B Offline
    butchkemper
    last edited by Jun 6, 2023, 7:01 PM

    I have created a MagicMirror on a RPi 3B+ and it is running but with some issues.

    I am working to clean up the PM2 error log which is filled with this message: “[14606:0606/134932.852666:ERROR:socket_posix.cc(93)] CreatePlatformSocket() failed: Address family not supported by protocol (97”

    Where should I begin looking for the problem?

    Thanks.

    Butch

    Resistance is not Futile!
    It is voltage divided by current.

    S 1 Reply Last reply Jun 6, 2023, 7:11 PM Reply Quote 0
    • B Offline
      butchkemper
      last edited by Jun 13, 2023, 9:23 PM

      Sam,

      I built a new SDcard for Raspios and installed MM using your scripts. Started MM and the problem did not occur.

      Next, I rebuilt the SSD with Raspios and installed MM. Started MM and the problem did not occur at startup and I waited while tailing the logs but nothing happened.

      Next, I move my MM configuration changes, modules, and updates to the SSD. The problem did not occur at startup or after tailing the logs for a time.

      I am declaring a victory for me. But we all know, in the end, that the computer demons won.

      Butch

      Resistance is not Futile!
      It is voltage divided by current.

      S 1 Reply Last reply Jun 13, 2023, 9:24 PM Reply Quote 1
      • S Away
        sdetweil @butchkemper
        last edited by Jun 6, 2023, 7:11 PM

        @butchkemper can u tell me what OS instance you are running?

        output of
        lsb_release -a
        and
        uname -a

        and node -v, npm -v

        will help

        and how did you install MM? manual method or my automated scripts?

        also, can u tell me the address:
        value in ~/MagicMirror/config/config.js

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        B 1 Reply Last reply Jun 7, 2023, 5:53 PM Reply Quote 0
        • B Offline
          butchkemper
          last edited by Jun 7, 2023, 5:44 PM

          Thank you for your response. I am delayed in responding because La Jefecita had other priorities for me that did not include my computers. :)

          I have a typo in the original post as the computer is a Raspberry Pi Model 3 A+ Rev 1.0

          The Raspios was built with the image:
          2023-05-03-raspios-bullseye-armhf.img.xz

          The output from the commands are:

          uname -a
          pi@MagicMirror:~$ uname -a
          Linux MagicMirror 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux

          lsb_release -a
          No LSB modules are available.
          Distributor ID: Raspbian
          Description: Raspbian GNU/Linux 11 (bullseye)
          Release: 11
          Codename: bullseye

          node -v
          v16.20.0

          npm -v
          8.19.4

          I used the Manual Installation method as described in MagicMirror² Documentation Installation & Usage.

          Address value in ~/MagicMirror/config/config.js is localhost

          I have also included the config file below.

          Thank you for your assistance.

          Butch

          /* MagicMirror² Config Sample
           *
           * By Michael Teeuw https://michaelteeuw.nl
           * MIT Licensed.
           *
           * For more information on how you can configure this file
           * see https://docs.magicmirror.builders/configuration/introduction.html
           * and https://docs.magicmirror.builders/modules/configuration.html
           */
          let config = {
                  address: "localhost",   // Address to listen on, can be:
                                          // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
                                          // - another specific IPv4/6 to listen on a specific interface
                                          // - "0.0.0.0", "::" to listen on any interface
                                          // Default, when address config is left out or empty, is "localhost"
                  port: 8080,
                  basePath: "/",          // The URL path where MagicMirror² is hosted. If you are using a Reverse proxy
                                                  // you must set the sub path here. basePath must end with a /
                  ipWhitelist: ["127.0.0.1", "192.168.1.0/24"],   // Set [] to allow all IP addresses
                                                                          // or add a specific IPv4 of 192.168.1.5 :
                                                                          // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
                                                                          // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
                                                                          // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
          
                  useHttps: false,                // Support HTTPS or not, default "false" will use HTTP
                  httpsPrivateKey: "",    // HTTPS private key path, only require when useHttps is true
                  httpsCertificate: "",   // HTTPS Certificate path, only require when useHttps is true
          
                  language: "en",
                  locale: "en-US",
                  logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
                  timeFormat: 24,
                  units: "imperial",
          
                  // serverOnly:  true/false/"local" ,
                  // local for armv6l processors, default
                  //   starts serveronly and then starts chrome browser
                  // false, default for all NON-armv6l devices
                  // true, force serveronly mode, because you want to.. no UI on this device
          
                  modules: [
                          {
                                  module: "alert",
                          },
                          {
                                  module: "MMM-LogExt",
                                  config: {}
                          },
                          {
                                  module: "updatenotification",
                                  position: "top_bar"
                          },
                          {
                                  module: "clock",
                                  position: "top_left",
                                  config: {
                                          timeFormat: 24,
                                  },
                          },
                          {       module: "calendar",
                                 header: "Kemper Family Combined",
                                  position: "top_left",
                                  config: {
                                          coloredText: true,
                                          timeFormat: 24,
                                          fade: false,
                                          fadePoint: 1,
                                          maximumEntries: 20,
                                          maximumNumberOfDays: 21,
                                          fetchInterval: 300000,
                                          calendars: [
                                                  {       // Butch
                                                          url: 'http://localhost:8080/modules/calendars/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.ics',
                                                          name: "Butch",
                                                          symbol: "calendar",
                                                          color: '#FF0000'
                                                  },
                                                  {       // Jan
                                                          url: 'http://localhost:8080/modules/calendars/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.ics',
                                                          name: "Jan",
                                                          symbol: "calendar",
                                                          color: '#008000'
                                                  },
                                                  {       // Family 1
                                                          url: 'http://localhost:8080/modules/calendars/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.ics',
                                                          name: "Family 1",
                                                          symbol: "calendar",
                                                          color: '#FFFF00'
                                                  },
                                                  {       // Family 2
                                                          url: 'http://localhost:8080/modules/calendars/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.ics',
                                                          name: "Family 2",
                                                          symbol: "calendar",
                                                          color: '#00FF00'
                                                  },
                                                  {       // Kids
                                                          url: 'http://localhost:8080/modules/calendars/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.ics',
                                                          name: "Kids",
                                                          symbol: "calendar",
                                                          color: '#0000FF'
                                                  },
                                                  {       // City Council
                                                          url: 'http://localhost:8080/modules/calendars/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.ics',
                                                          name: "City Council",
                                                          symbol: "calendar",
                                                          color: '#FFA500'
                                                  }
                                          ]
                                  }
                          },
          
          //              {
          //                      module: "compliments",
          //                      position: "lower_third"
          //              },
                          {
                                  module: "weather",
                                  position: "top_right",
                                 header: "Current Weather",
                                  config: {
                                          weatherProvider: "openweathermap",
                                          type: "current",
                                          units: "imperial",
                                          tempUnits: "imperial",
                                          roundTemp: true,
                                          timeFormat: 24,
                                          appendLocationNameToHeader: true,
                                          onlyTemp: false,
                                          showSun: true,
                                          fade: false,
                                          fadePoint: 1,
                                          colored: true,
                                          updateInterval: 900000,
                                          maxEntries: 7,
                                          degreeLabel: true,
                                          lang: "en",
                                          location: "Sachse,Texas",
                                          locationID: "4724564",
                                          //ID from http://bulk.openweathermap.org/sample/city.list.json.gz;
                                          apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                                  }
                          },
                          {
                                  module: "weather",
                                  position: "top_right",
                                  header: "Weather Forecast at",
                                  config: {
                                          initialLoadDelay: 5000,
                                          weatherProvider: "openweathermap",
                                          type: "forecast",
                                          units: "imperial",
                                          tempUnits: "imperial",
                                          roundTemp: true,
                                          timeFormat: 24,
                                          appendLocationNameToHeader: true,
                                          fade: false,
                                          fadePoint: 1,
                                          colored: true,
                                          updateInterval: 900000,
                                          maxEntries: 10,
                                          maxNumberOfDays: 10,
                                          ignoreToday: false,
                                          degreeLabel: true,
                                          lang: "en",
                                          location: "Sachse,Texas",
                                          locationID: "4724564", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz;
                                          apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                                  }
                          },
                          {
                                  module: "MMM-Fuel",
                                  position: "top_right",
                                  config: {
                                          provider: "gasbuddy",
                                          zip: "75048",
                                          types: ["regular"],
                                          sortBy: "regular",
                                          max: 7,
                                          showDistance: false,
                                          fade: false,
                                          updateInterval: 30000,
                                          rotate: false,
                                          rotateInterval: 15000
                                          }
                          },
                          {
                                  module: "newsfeed",
                                  position: "bottom_bar",
                                  config: {
                                          feeds: [
                                                  {
                                                          title: "New York Times",
                                                          url: "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"
                                                  }
                                          ],
                                          showSourceTitle: true,
                                          showPublishDate: true,
                                          broadcastNewsFeeds: true,
                                          broadcastNewsUpdates: true
                                  }
                          },
                  ]
          };
          
          /*************** DO NOT EDIT THE LINE BELOW ***************/
          if (typeof module !== "undefined") {module.exports = config;}
          
          

          Resistance is not Futile!
          It is voltage divided by current.

          1 Reply Last reply Reply Quote 0
          • B Offline
            butchkemper @sdetweil
            last edited by Jun 7, 2023, 5:53 PM

            @sdetweil said in New Setup - Log Filled with "CreatePlatformSocket() failed: Address family not supported by protocol (97)":

            @butchkemper can u tell me what OS instance you are running?

            output of
            lsb_release -a
            and
            uname -a

            and node -v, npm -v

            will help

            and how did you install MM? manual method or my automated scripts?

            also, can u tell me the address:
            value in ~/MagicMirror/config/config.js

            The OS was built using this image: 2023-05-03-raspios-bullseye-armhf.img.xz.

            The Raspberry Pi is a Model 3 A+ not a 3B+.

            The output of the commands you requested is:

            lsb_release -a
            No LSB modules are available.
            Distributor ID: Raspbian
            Description: Raspbian GNU/Linux 11 (bullseye)
            Release: 11
            Codename: bullseye

            uname -a
            Linux MagicMirror 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux

            node -v
            v16.20.0

            npm -v
            8.19.4

            the address: value in ~/MagicMirror/config/config.js: localhost

            Installation was the Manual Method.

            Thank you for your help.

            Butch

            Resistance is not Futile!
            It is voltage divided by current.

            M S 3 Replies Last reply Jun 7, 2023, 8:26 PM Reply Quote 0
            • M Offline
              MMRIZE @butchkemper
              last edited by MMRIZE Jun 7, 2023, 8:27 PM Jun 7, 2023, 8:26 PM

              @butchkemper
              Usually that error message happens on socket stream fails but could not know where it depends with only that log.

              My suggestion;
              Run only default modules; happens again?

              • If not, add 3rd party modules one by one and test each time. You might find the suspicious module.
              • If so, reinstall fresh MM; then try above method.

              Still happens even with fresh MM, update your OS and dependencies. And test again.

              The last method would be to format your sd card then reinstall OS itself. If still error happens; I have no way…

              Wish you a luck.

              1 Reply Last reply Reply Quote 0
              • S Away
                sdetweil @butchkemper
                last edited by Jun 7, 2023, 8:56 PM

                @butchkemper I am testing the automated install on a new flashed sd card now , with the 5/23 32 bit image

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • S Away
                  sdetweil @butchkemper
                  last edited by Jun 7, 2023, 9:33 PM

                  @butchkemper I installed with my automated script and all is working as expected. I added my MMM-Config module which uses socketio to the backend form and it works without problem…

                  as a test

                  rename your MagicMirror folder to some other name
                  and then run the automated install script… see
                  https://github.com/sdetweil/MagicMirror_scripts

                  pi@raspberrypi:~/MagicMirror/config $ uname -a
                  Linux raspberrypi 6.1.21-v7+ #1642 SMP Mon Apr  3 17:20:52 BST 2023 armv7l GNU/Linux
                  pi@raspberrypi:~/MagicMirror/config $ lsb_release -a
                  No LSB modules are available.
                  Distributor ID:	Raspbian
                  Description:	Raspbian GNU/Linux 11 (bullseye)
                  Release:	11
                  Codename:	bullseye
                  pi@raspberrypi:~/MagicMirror/config $ node -v
                  v16.20.0
                  pi@raspberrypi:~/MagicMirror/config $ npm -v
                  8.19.4
                  pi@raspberrypi:~/MagicMirror/config $ 
                  

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    butchkemper
                    last edited by Jun 8, 2023, 8:57 PM

                    @sdetweil

                    Sam,

                    I did a complete new MM install using your automated scripts and found the error message is still issued.

                    I found the error messages correlate to modules making network requests for data updates.

                    My next step is to build a SDcard and see what happens.

                    Thank you for your assistance.

                    Butch

                    Resistance is not Futile!
                    It is voltage divided by current.

                    S 1 Reply Last reply Jun 9, 2023, 11:15 AM Reply Quote 0
                    • S Away
                      sdetweil @butchkemper
                      last edited by Jun 9, 2023, 11:15 AM

                      @butchkemper let us know how it goes…

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • B Offline
                        butchkemper
                        last edited by Jun 13, 2023, 9:23 PM

                        Sam,

                        I built a new SDcard for Raspios and installed MM using your scripts. Started MM and the problem did not occur.

                        Next, I rebuilt the SSD with Raspios and installed MM. Started MM and the problem did not occur at startup and I waited while tailing the logs but nothing happened.

                        Next, I move my MM configuration changes, modules, and updates to the SSD. The problem did not occur at startup or after tailing the logs for a time.

                        I am declaring a victory for me. But we all know, in the end, that the computer demons won.

                        Butch

                        Resistance is not Futile!
                        It is voltage divided by current.

                        S 1 Reply Last reply Jun 13, 2023, 9:24 PM Reply Quote 1
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy