Connection issues inside vps

In a vps, when i log in...it says

Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings

and when i do git pull it fails with message fatal: unable to access 'https://github.com/brand/repo/': gnutls_handshake() failed: Error in the pull function.

what could be the solution? many answers say updating git, libssls etc but none worked.

hoping to find a solution here.

thanks.

Comments

  • lgsinlgsin OG
    edited June 2021

    ofc updating won't work since the message writes:
    Check your Internet connection or proxy settings

    Did you check your internet connection?

    Thanked by (1)seenu
  • do you need to use any kind of vpn/proxy from that vps to get to the outside world?

    port 443 blocked?
    does ping work?

    Thanked by (1)seenu
  • Check your DNS settings on the VPS, are you able to ping google.com or similar?

    Thanked by (1)seenu
  • @Falzo said:
    do you need to use any kind of vpn/proxy from that vps to get to the outside world?

    port 443 blocked?
    does ping work?

    For example, ping github.com works very fine

    i didn't install ufw and it worked fine till today but may be server people enforced it,
    running sudo netstat -tulpn | grep :443 shows some are running on openlitespeed

    and i tried disabling ufw, no result

    added https with sudo ufw allow https still no result.

    what else could be the problem?


    Also is there any way to test whether https working or not from terminal? is there any command like ping for testing https?

  • alwyzonalwyzon Hosting Provider

    @seenu said:
    Also is there any way to test whether https working or not from terminal? is there any command like ping for testing https?

    Checkout wget or curl.

    — Michael

    Thanked by (1)seenu

    Alwyzon - Virtual Servers in Austria starting at 4,49 €/month (excl. VAT)

  • edited June 2021

    curl github.com finishes in a blink

    curl https://github.com takes forever and throws error

    curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to github.com:443

  • edited June 2021

    not sure....what to do 🤷

  • mikhomikho AdministratorHosting ProviderOG

    Check date and time of VPS

    if its a date/time mismatch, the certificate gets rejected.

  • curl http://github.com is fine but https isn't.. Are you running a super ancient distro such that ca-certificate is obsolete?

  • tetechtetech OG
    edited June 2021

    Try reducing MTU. HTTPS packets are larger than HTTP and improper MTU could be doing it.

    ifconfig eth0 mtu 1200 up
    

    or similar. The 1200 bytes is just for testing, probably won't need to go that low in reality.

    Thanked by (1)Mason
  • edited June 2021

    If your MTU is too high could cause issues retrieving from HTTPS sites because the packets are too big.

    Edit: oops what tetech said, didn't see his post.

    Thanked by (1)Mason
  • @mikho said: if its a date/time mismatch, the certificate gets rejected.

    Can you please tell me how? https://askubuntu.com/a/998449 tried this but no luck

    @lgsin said: curl http://github.com is fine but https isn't.. Are you running a super ancient distro such that ca-certificate is obsolete?

    Ubuntu 20

    @tetech said:
    Try reducing MTU. HTTPS packets are larger than HTTP and improper MTU could be doing it.

    ifconfig eth0 mtu 1200 up
    

    or similar. The 1200 bytes is just for testing, probably won't need to go that low in reality.

    HOLY SHIT!!!.... that did the job.

    now vps is blazing fast in git pull etc.

  • Thanks to everyone for posting your replies, i am able to solve it without contacting host :)

    it was working fine till yesterday so not sure what caused it but i am able to solve it easily thanks to you guys especially @tetech

    Thanked by (3)mikho Mason Not_Oles
Sign In or Register to comment.