6 votes

Contributing to Tildes - Accessing on localhost

Tags: dev, firefox, ssl

Hi, I've started developing syntax highlighting, but I'm unable to connect to Tildes on localhost. It's running, I can connect to Prometheus, but not to Tildes. I use Ubuntu.

I know there are few people here who already contributed to Tildes, how do you connect to Tildes?

  • Firefox shows Secure Connection Failed, even after adding exception in about:config for domains localhost, *, 127.0.0.1, both with and without port, I even tried adding https:// before them.
  • Qutebrowser displays nothing
  • Chromium displays ERR_CONNECTION_RESET (not something like insecure connection)
  • Chrome displays ERR_CONNECTION_RESET (not something like insecure connection)
  • Curl displays OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:4443
  • wget displays Unable to establish SSL connection.
  • lynx displays Unable to connect to remote host.

Could someone tell me how to config Firefox / install certificate for Tildes on localhost / move Tildes to http?

Thank you

Edit: I tried setting firefox security exception in a different way and this happened.

13 comments

  1. [3]
    Deimos
    (edited )
    Link
    You shouldn't need to do anything in about:config, so I'm not sure if something may be in a weird state now, but other browsers should still work. Some things to try: Make sure that you're going...

    You shouldn't need to do anything in about:config, so I'm not sure if something may be in a weird state now, but other browsers should still work. Some things to try:

    Make sure that you're going to exactly https://localhost:4443 - if you leave off the "https" or the port, it won't go to the right place.

    If you say that prometheus (http://localhost:9090) works, that should mean that at least nginx is running and able to handle requests.

    Try SSHing into the VM (vagrant ssh) and then once you're inside, run curl --insecure https://localhost. Do you get back a dump of Tildes HTML?

    5 votes
    1. [2]
      Soptik
      Link Parent
      Oh. It works now, thank you. The problem is, that I downloaded the repository and didn't get vagrant running in few days. I created new branch and tried adding the code class exception method. I...

      Oh. It works now, thank you.

      The problem is, that I downloaded the repository and didn't get vagrant running in few days. I created new branch and tried adding the code class exception method. I forgot about it. When I got vagrant running today and I tried to connect, there was Security connection failed. I didn't know it was because of my change, which I've forgot about.

      When I did what you said, there was some error trace of about 15 files. I immediately remembered of myself playing with source file and I reverted the change. It started working.

      I feel dumb now, I shouldn't mess with the source code without checking that it works first.

      Thank you.

      Edit: And now, when I make something bad with the source code, the error trace is shown in firefox, after I added security exception. Great idea with dumping tildes html.

      4 votes
      1. Deimos
        Link Parent
        Yeah, there are kind of two different levels that things can break at. If it's just an error with a particular page in the app or something, you should be able to see the stack trace inside the...

        Edit: And now, when I make something bad with the source code, the error trace is shown in firefox, after I added security exception. Great idea with dumping tildes html.

        Yeah, there are kind of two different levels that things can break at. If it's just an error with a particular page in the app or something, you should be able to see the stack trace inside the browser. If it's a "deeper" error that prevents the app from even being able to start up (like a syntax error or a package not being installed), you'll probably need to run sudo journalctl -u gunicorn.service -f from inside the VM to get the stack trace from there. It tries to restart every 30 seconds, so it should get the app running automatically once it's fixed. There's a bit more detail in this section of the Development page: https://docs.tildes.net/development#general-developmentdebugging

        2 votes
  2. [9]
    Comment deleted by author
    Link
    1. [7]
      Soptik
      Link Parent
      I tried. I'm connecting to https, but I'm unable to add security exception on any browser. Interesting is that chromium-based browser do not even display security exception. And I did enter the...

      I tried. I'm connecting to https, but I'm unable to add security exception on any browser. Interesting is that chromium-based browser do not even display security exception. And I did enter the same url as firefox. Chrome just says localhost unexpectedly closed the connection.

      3 votes
      1. [3]
        Comment deleted by author
        Link Parent
        1. [2]
          Soptik
          Link Parent
          I tried restarting both computer and VM multiple times

          I tried restarting both computer and VM multiple times

          2 votes
          1. [2]
            Comment deleted by author
            Link Parent
            1. Soptik
              Link Parent
              Hm, at least my firefox doesn't have the button there. I assumed they removed it in new version.

              Hm, at least my firefox doesn't have the button there. I assumed they removed it in new version.

              1 vote
      2. [4]
        Emerald_Knight
        Link Parent
        Are you able to SSH into the VM via vagrant ssh?

        Are you able to SSH into the VM via vagrant ssh?

        1 vote
        1. [3]
          Soptik
          Link Parent
          Yes, I can

          Yes, I can

          1 vote
          1. [2]
            Emerald_Knight
            Link Parent
            I would recommend checking that the required services are running on the VM as a preliminary step.

            I would recommend checking that the required services are running on the VM as a preliminary step.

            1 vote
            1. Soptik
              Link Parent
              There is different error in firefox when the vagrant is still booting and the services are not running. I also tried displaying status of services listed in development docs and everything was...

              There is different error in firefox when the vagrant is still booting and the services are not running. I also tried displaying status of services listed in development docs and everything was running except gunicorn.service, which I started, but it didn't do anything.

              1 vote
    2. Soptik
      Link Parent
      Your edit: Firefox doesn't have the advanced button in new versions. I've followed guide to allow it in about:config, but it didn't work. Chrome and Chromium didn't even connect.

      Your edit: Firefox doesn't have the advanced button in new versions. I've followed guide to allow it in about:config, but it didn't work. Chrome and Chromium didn't even connect.

      1 vote
  3. [2]
    Emerald_Knight
    Link
    Be sure to check the Vagrantfile. Access is likely on non-standard ports. Be sure to specify the expected port with the correct protocol. For example, HTTPS on port 8443 would be...

    Be sure to check the Vagrantfile. Access is likely on non-standard ports. Be sure to specify the expected port with the correct protocol. For example, HTTPS on port 8443 would be https://localhost:8443.

    1 vote
    1. Soptik
      Link Parent
      It should be on 4443. Chromium-based browsers says that localhost unexpectedly closed the connection and Firefox doesn't seem to care that I defined security exception. config.vm.network...

      It should be on 4443. Chromium-based browsers says that localhost unexpectedly closed the connection and Firefox doesn't seem to care that I defined security exception.

      config.vm.network "forwarded_port", guest: 443, host: 4443
      
      1 vote