As part of my new role as senior machine learning engineer at MDPI, I’ve set up an mlflow service and experiment with the mlflow CLI to serve models stored in the Model Registry. Strangely, all requests to the endpoint returned an empty results.

$ http :5000/invocations inputs:='[1, 2, 3, 2000]'
HTTP/1.1 404 Not Found
Content-Length: 0
Server: AirTunes/670.6.2


What’s going on here? The Server header is a clear give away. Well, as it turns out, Apple decided to use port 5000 for their AirPlay feature. Luckily, you can easily disable this feature via System Settings.

Airplay Receiver settings

After disabling the Airplay Receiver, the gunicorn server used by mlflow responds as expected.

$ http :5000/invocations inputs:='[1, 2, 3, 2000]'
HTTP/1.1 200 OK
Connection: close
Content-Length: 35
Content-Type: application/json
Date: Sun, 8 Jan 2023 12:46:44 GMT
Server: gunicorn

{
    "predictions": [
        0,
        2,
        6,
        3998000
    ]
}

The unfortunate choice of port 5000 does not only affect mlflow. Even worse, mlflow was able to start without failure even though the port is already in use.