Is it connected by Wi-Fi or Ethernet cable? You can try using the one it isn't connected by. It could be either your Wi-Fi chip or Ethernet jack is defective.
Additionally, are you trying to use a web browser or higher-profile app (Youtube, etc.), or are you trying to connect to some old Kodi repository that isn't online anymore (and therefore would give you an error upon an attempt to connect).
Also, have you considered a factory reset?