Did an apt-get update on my countly server, now getting 502 Bad Gateway

I was tinkering around with my countly server, and ran apt-get dist-upgrade, and now the only thing my server will do is:

502 Bad Gateway
nginx/1.14.0 (Ubuntu)

Being absolutely new at node and countly, how do I fix this? How do I go about looking at how to fix this?



  • Hello,
    first thing is to try to restart countly process by running countly restart
    then check countly logs at countly/log/countly-dashboard.log and countly-api.log
    and check for errors there

    And check out our trouble shooting section

    Comment actions Permalink
  • I've tried that as per your suggestion, and anything I do on that troubleshooting page results in

    /usr/bin/nodejs: symbol lookup error: /usr/bin/nodejs: undefined symbol: nghttp2_session_get_hd_inflate_dynamic_table_size
    Preparing production files...
    node: symbol lookup error: node: undefined symbol: nghttp2_session_get_hd_inflate_dynamic_table_size
    Restarting Countly...

    Interestingly, when I was playing around with this the other day and I turned off the monetization plug-in, this same error kept happening and I needed to totally rebuild countly. I'm trying to avoid that fate again....

    Things I've definitely tried:
    countly restart
    countrly rebuild
    countly config list values

    All result in the same error above.

    Comment actions Permalink
  • Is it on Ubuntu 18.04?

    In short, it seems you need to reinstall nodejs, removing it and installing again.

    apt-get -y remove nodejs
    wget -qO- https://deb.nodesource.com/setup_6.x | bash -
    apt-get update
    apt-get -y install nodejs

    If that does not help, then try installing nodejs directly from binaries:
    Linux Binaries (x86/x64)

    Comment actions Permalink
  • Yes, it is Ubuntu 18.04 hosted on a 2GB/1CPU instance on Digital Ocean. It was working fine for a day or so; my apps are low volume enough that 1 CPU is enough for me. I did NOT use the countly auto-build DigitalOcean script since that installs to Ubuntu 16.04.

    Anyway, I just tried this, and I'm still getting the same 502 Bad Gateway error, with the same error as posted in the OP in the logs. Do you have anything else to try? I'm eager to get this to work

    Thanks for the help so far.

    Comment actions Permalink
  • Unfortunately that happens on 18.04 and we have no idea why, we suggest moving back to 16.04 until issue is resolved, that is why official image is still on Ubuntu 16

    Comment actions Permalink
  • Hmm, ok. That's interesting. I'll do so, thanks!

    On that note: where can I check for when it would be updated for 18.04 and an OS upgrade would be safe?

    Comment actions Permalink
  • Just as a sidenote, Jon, you might have missed advice to install node as a plain binary. You can just download it from the link Arturs gave you and symlink it to current location of the binary.

    Comment actions Permalink

Please sign in to leave a comment.