1

This is funny because most questions I found are the other way around.

  1. I have a flask server that I start on debugging mode, listening on port 6000.
  2. I have a script that accesses the url through localhost which sends back a JSON reply.

When I do an ssh tunnel using ssh -L and run the script that sends a request in my machine to localhost everything works fine. When I run the script directly from the server it also works fine. However, since I want to ultimately use a big data set, I setup a cron job. When the cron runs, the script crashes with connection refused error. I can see that the server is running after the script crashes and the port is correct on both.

I have no idea why this can happen. Any ideas are appreciated.

Solution

I couldn't figure out the reason or how to solve it, so I decided to run manually and put it in the background.

How to make a programme continue to run after log out from ssh?

Community
  • 1
  • 1
gamda
  • 580
  • 6
  • 24

0 Answers0