Connection timeout error for GCP server


I created a gradio app and deployed on space. The app needs to connect to solr server running on GCP instance. The solr server is running on 8983 port in GCP. I am getting connection timeout whenever I try connecting to solr.

File “/usr/local/lib/python3.8/”, line 796, in create_connection
TimeoutError: [Errno 110] Connection timed out

@chris-rannou chris-rannou, You said on some post that it is because of some restrictions on outgoing ports. Can you please check if 8983 can be enabled for outbound traffic?

Hi @vputta ! I think only ports 80, 443, and 8080 are open: Spaces Overview

Appreciate your response.

But is it possible to enable other ports like 8983 for my space.

It is doable according to this thread

Thanks!! I changed the solr’s port from 8983 to 8080 and it worked. I thought the only allowed ports are 80 and 443. Didnt know about 8080. In my case, the ports 80 and 443 are occupied by some google internal processes and cannot free them up. But luckily 8080 was available.