No internet connection
  1. Home
  2. General

Service doesn't start after install

By Jeremy @fabltd
    2021-05-11 11:55:22.107Z


    I have used the quick install script. I see a 502 Bad Gateway error and the log shows the following:

    Connection refused) while connecting to upstream, client:, server: tinypilot, request: "GET / HTTP/1.1", upstream: "", host: ""

    My guess is the service is not running but you don't say how to check this or what to check for. Any help please?

    • 14 replies
    1. Can you try sharing your debug logs?

      sudo /opt/tinypilot-privileged/collect-debug-logs

      What OS are you installing this on?

      1. FJeremy @fabltd
          2021-05-11 12:12:52.749Z

          Hi Michael


          Raspberry PI OS.

          1. That's a strange error, as the server is failing to start because a piece of Flask is missing.

            Can you try re-running quick-install?

        • F
          In reply tofabltd:
          Jeremy @fabltd
            2021-05-11 15:59:20.531Z


            I assume its running in its own virtual env so other apps on the box shouldn't cause an issue?

            1. Correct, though it'll cause conflicts if they're using the same ports.

              1. FJeremy @fabltd
                  2021-05-11 16:02:30.522Z

                  What ports are used?

              2. F
                In reply tofabltd:
                Jeremy @fabltd
                  2021-05-11 16:02:01.988Z
                  1. It seems like something might be misconfigured on your system so that your global libraries are overriding TinyPilot's virtualenv in /opt/tinypilot.

                    This StackOverflow thread might be helpful:


                    1. FJeremy @fabltd
                        2021-05-11 16:56:18.642Z


                        How do I restart tinypilot to check?

                        1. FJeremy @fabltd
                            2021-05-11 17:03:34.557Z


                            Flask is not installed in my global libraries.

                            1. Flask is not installed in my global libraries.

                              That would be surprising. How are you verifying that?

                              Can you try on a clean install of Raspberry Pi OS?

                              1. FJeremy @fabltd
                                  2021-05-11 17:55:53.294Z


                                  I cannot clean install as this PI runs serveral other services but none using flask.

                                  pip3 list is what i used.

                                  1. If this happens on a clean install of Raspberry Pi OS, that's a TinyPilot bug. If this is happening because of some other app or change to the system configuration, it's hard for me to diagnose the problem.

                                    Another possible place to look is the system's PATH and PYTHONPATH environment variables.

                        2. Progress
                        3. F
                          Jeremy @fabltd
                            2021-05-11 15:13:10.655Z

                            Any update?