Flaskではデフォルトでは5000番ポートで開発サーバが起動する。 自分はとあるアプリの開発で普段、Flaskで開発したとあるアプリをMac上で起動しているんだけどこれがある日うまく動かなくなった。アプリケーション的になにかをいじったわけではなく、ぱっと思いつく心あたりはない。 ターミナルからMacで使用されているポートを確認したら確かに5000番が何かに使われている(IPとかユーザ名だけマスクした)。 % lsof -i:5000 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ControlCe 490 xxxxxxx 22u IPv4 0xf8bcd361exxxxxxxx 0t0 TCP *:commplex-main (LISTEN) ControlCe 490 xxxxxxx 23u IPv6 0xf8bcd36xxxxx