Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

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

    Solved Can't logout from Surfer

    Surfer
    2
    9
    285
    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.
    • A
      abargel last edited by

      I'm using the surfer CLI to connect, put and delete files, all works well except when I try to logout, I get this error:

      connect ECONNREFUSED 127.0.0.1:80
      

      So I remain logged in... and don't know what to do!

      1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff last edited by

        How does your setup look like? It seems strange that the cli tool tries to connect to 127.0.0.1 From where are you running this?

        A 1 Reply Last reply Reply Quote 0
        • Topic has been marked as a question  nebulon nebulon 
        • A
          abargel @nebulon last edited by abargel

          @nebulon It did seem strange to me too... I'm connecting from my home computer where I installed cloudron-surfer CLI, onto my VPS where my main Cloudron is installed, with Surfer.

          I just thought of the fact that I'm using OpenVPN on my home wifi, and the server for that is on the same Cloudron and IP address as Surfer. Could that be causing a problem?

          Had no trouble connecting, though, by entering the url.

          [EDIT: same behavior without the VPN]

          nebulon 1 Reply Last reply Reply Quote 0
          • nebulon
            nebulon Staff @abargel last edited by

            @abargel there is really nothing different from the logout logic to any other requests to the server. They use the same domain/URL in the code. Can you run this maybe with DEBUG=* and see if something unexpected comes up?

            A 1 Reply Last reply Reply Quote 0
            • A
              abargel @nebulon last edited by abargel

              @nebulon

               $ DEBUG=* surfer logout
                superagent POST /api/logout?access_token=login-ef8c6c81aa72058b11c72dd84d1368ab +0ms
              connect ECONNREFUSED 127.0.0.1:80
              
              

              I have not set up an access token on surfer/_admin. Should I have?

              nebulon 1 Reply Last reply Reply Quote 0
              • nebulon
                nebulon Staff @abargel last edited by

                @abargel so looks like the origin is simply missing in the local surfer config. That file is in ~/.surfer.json and to logout you can also just delete the file for a start. In your case I guess the server property got emptied for some reason.

                A 1 Reply Last reply Reply Quote 0
                • A
                  abargel @nebulon last edited by

                  @nebulon Deleting ~.surfer.json did log me out. Here are its contents before deletion:

                  {
                      "server": "https://surfer.openbargel.com",
                      "accessToken": "login-ef8c6c81aa72058b11c72dd84d1368ab"
                  }
                  

                  I logged in again, ran a couple of commands, tried logging out: same problem. Current content of ~.surfer.json is same with just a different accessToken. Output from DEBUG=* is same with just a different accessToken.

                  nebulon 1 Reply Last reply Reply Quote 0
                  • nebulon
                    nebulon Staff @abargel last edited by

                    @abargel I think I found the bug, I have released a new version of the app and the cli tool, which should fix it. Thanks for reporting!

                    A 1 Reply Last reply Reply Quote 1
                    • A
                      abargel @nebulon last edited by

                      @nebulon Works fine after updating. Thank you!

                      1 Reply Last reply Reply Quote 0
                      • Topic has been marked as solved  nebulon nebulon 
                      • First post
                        Last post
                      Powered by NodeBB