Path error on spooldir

hi all,
i’m running CP as a local set of images started via the docker-compose file.
when i try and add the following code I get the error below.

I’m thinking that as connect is running inside a container it’s looking for that path inside the container… please advise, how do i fix ?
thinking is mapping a volume. not exactly sure how.
thinking if i’ve mapped a volume then i will point the spool source loader to looked at the internal mounted volume.

curl -i -X PUT -H "Accept:application/json" \
    -H  "Content-Type:application/json" http://localhost:8083/connectors/source-csv-spooldir-00/config \
    -d '{
        "connector.class": "com.github.jcustenborder.kafka.connect.spooldir.SpoolDirCsvSourceConnector",
        "topic": "orders_spooldir_00",
        "input.path": "/Users/george/Desktop/MyDocs/dev/aws-kafka-confluent/demo-scene/csv-to-kafka/data/unprocessed/",
        "finished.path": "/Users/george/Desktop/MyDocs/dev/aws-kafka-confluent/demo-scene/csv-to-kafka/data/processed/",
        "error.path": "/Users/george/Desktop/MyDocs/dev/aws-kafka-confluent/demo-scene/csv-to-kafka/data/error/",
        "input.file.pattern": ".*\\.csv",
        "schema.generation.enabled":"true",
        "csv.first.row.as.header":"true"
        }'

{“error_code”:400,“message”:“Connector configuration is invalid and contains the following 2 error(s):\nInvalid value ‘/Users/george/Desktop/MyDocs/dev/aws-kafka-confluent/demo-scene/csv-to-kafka/data/unprocessed’ must be a directory. for configuration input.path\nInvalid value ‘/Users/george/Desktop/MyDocs/dev/aws-kafka-confluent/demo-scene/csv-to-kafka/data/error’ must be a directory. for configuration error.path\nYou can also find the above list of errors at the endpoint /connector-plugins/{connectorType}/config/validate”}

enjoying answering my own questions…
yes, added a volume definition to my connect container specification in the docker-compose.yaml, mapped to local file location, then told connect to use the internal path.
G

The path should be from the kafka connect server on which you have the connector installed.
You will have to give the parh on the connect worker node and place the file there with proper permissions

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