akopulko / ffiiitc

FireFly III Transactions Classifier
MIT License
37 stars 9 forks source link

connection refused #16

Closed dufourya closed 8 months ago

dufourya commented 8 months ago

Hello, I am having issues trying to setup the classifier with ff3 in a docker container. I followed the installation directions but ffiiitc is unable to connect to the ff3 api.

FATAL {main.main} : Get "http://localhost:8080/api/v1/transactions?page=1": dial tcp 127.0.0.1:8080: connect: connection refused

I am able to connect to the ff3 api through localhost, the hostname, or 127.0.0.1 using curl and the same PA Token.

I specified the FF_API_KEY and FF_API_URL in the compose.yml file with and without quotes. If I use http://app:8080 for FF_APP_URL, the connection attempt times out.

2024/01/20 13:54:29 INFO {main.main} Firefly transaction classification started 2024/01/20 13:54:29 INFO {main.main} getting config 2024/01/20 13:54:29 INFO {main.main} loading classifier from model: data/model.gob 2024/01/20 13:54:29 ERROR {main.main} open data/model.gob: no such file or directory 2024/01/20 13:54:29 INFO {main.main} looks like we need to do some training... 2024/01/20 13:54:29 ERROR {main.main} open data/model.gob: no such file or directory 2024/01/20 13:54:29 INFO {firefly.(*FireFlyHttpClient).GetTransactionsDataset} get first page of transactions 2024/01/20 13:54:29 FATAL {main.main} : Get "http://localhost:8080/api/v1/transactions?page=1": dial tcp 127.0.0.1:8080: connect: connection refused 2024/01/20 13:54:29 FATAL {main.main} : Get "http://localhost:8080/api/v1/transactions?page=1": dial tcp 127.0.0.1:8080: connect: connection refused

dufourya commented 8 months ago

I figured out the issue. The image I built locally was ffiiitc:latest but the image in the compose file was akopulko/ffiiitc:latest. The wrong container was trying to connect to ff3. The documentation may need to include the distinction between built and pulled images.