I’m getting an error: hostingpid1 an open port was not detected when i deploy the code

unable to deploy project. i was working as of last nite. nothing really changed.

Repl link/Link to where the bug appears:
Screenshots, links, or other helpful context:

code snippet

Hi @BeckyChan1 , welcome to the forums!
If you want to deploy your bot, try deploying it as a Reserved VM, with the Background worker option.
Other deployments are for web servers.
Hope this helps!

I tried, it seems to work, but I for some reason cannot connect to it

Could you send the full deployment logs of the repl?
Does the bot work normally?

on Development always work. It was working last nite. I found a bug so i decided to make some code changes and redeploy. this is when I get the “open port was not detected”

now when I deploy using VM, my request does not seem to be received. so Log shows nothing other than server has started

i see it says “initializng deployment without listening for application ports”

could that be reason why is not getting my requests?

Try Autoscale again, and send a screenshot of the deployment configuration that you’re using.

And this fails to deploy?
Also, Replit DB won’t store in deployments.

for some reason it worked. did you change something?

No, I’m not even in the repl, so I didn’t change anything.

Consider using external databases for this.

1 Like

I dont have a database .

It says that you use Replit DB in one of your files.

is just a simple telegram fowarding bot where I do some calculations before sending. I am a newbie. dont know how to host this on my own computer.

so being an idiot and paying for this

btw, my app print logs are not showing up, is there something I need to turn on? I am a python newbie. It shows when I am on development

At the end of each print statement, add flush=True:

print('Data: 1', flush=True)

This will make it show in the logs.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.