gitviola / ynab-bank-importer

💰 Pull transactions from your bank and import them to YNAB automatically.
https://ynab.com/referral/?ref=C-_IP8eD8dWYfEec&utm_source=customer_referral
MIT License
133 stars 20 forks source link

Net::OpenTimeout #37

Open owohub opened 5 years ago

owohub commented 5 years ago

While following your docker setup instructions and using Docker for Mac, I am running into a Net::OpenTimeout issue. Never used Docker before, so I would highly appreciate some help getting this great tool running.

/usr/local/lib/ruby/2.5.0/net/http.rb:937:in `initialize': execution expired (Net::OpenTimeout)

Thank you!

gitviola commented 5 years ago

Hi @owohub, what Dumper are you using? And if it's the FinTS dumper, what bank is it? I'm asking this because I suspect that the problem lays outside of the script. I could take some measures to improve the logging to see at which part it has trouble communicating outside after validating this.

Also, do you mind running the following command:

docker-compose run --rm importer bash -c "curl -v http://www.example.com/"

This will help us finding out if Docker for Mac is causing your issue. The command will go inside the container and run a curl command. If it works it means that the docker-container can communicate to the outside world. If it doesn't work then this is probably causing the struggles.

owohub commented 5 years ago

Hi,

thanks for getting back to me: FinTS dumper and DKB bank. The curl command successfully fetched the contents of example.com, so it doesn’t seem to be a primary network issue.

Best regards!

Am 26.12.2018 um 13:40 schrieb Martin Schurig notifications@github.com:

Hi @owohub, what Dumper are you using? And if it's the FinTS dumper, what bank is it? I'm asking this because I suspect that the problem lays outside of the script. I could take some measures to improve the logging to see at which part it has trouble communicating outside after validating this.

Also, do you mind running the following command:

docker-compose run --rm importer bash -c "curl -v http://www.example.com/" This will help us finding out if Docker for Mac is causing your issue. The command will go inside the container and run a curl command. If it works it means that the docker-container can communicate to the outside world. If it doesn't work then this is probably causing the struggles.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

gitviola commented 5 years ago

Glad to hear that the curl command works! What endpoint are you using for the DKB? It should be:

   # ...
   fints_endpoint: 'https://banking-dkb.s-fints-pt-dkb.de/fints30'
   fints_blz: 'YOUR_BLZ'
owohub commented 5 years ago

After putting the fints_endpoint in single quotes (you had previously told me it had to be double quotes :) and also putting the blz in single quotes the connection issues don’t show any more, but we’re back with the following error:

/usr/app/run.rb:16:in <main>': undefined methodfetch' for nil:NilClass (NoMethodError)

Looking forward to the continued troubleshooting...

Am 26.12.2018 um 17:28 schrieb Martin Schurig notifications@github.com:

Glad to hear that the curl command works! What endpoint are you using for the DKB? It should be:

...

fints_endpoint: 'https://banking-dkb.s-fints-pt-dkb.de/fints30'

fints_blz: 'YOUR_BLZ' — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

gitviola commented 5 years ago

Hi @owohub, have you tried putting all values in quotes? It still sounds like the config file can't be parsed correctly. Can you please also verify that all needed parameters are present? You can find all needed parameters here: https://github.com/schurig/ynab-bank-importer/wiki/FinTS---HBCI#configuration

owohub commented 5 years ago

Put everything in quotes. Verified all the hashes again. Also, all parameters apart from the optional cash_account_id are present. Error is still the same. Any other ideas? This is driving me nuts.

christophwolff commented 5 years ago

I think my issue is related to this. I run it on a raspberry pi without docker.

/usr/lib/ruby/2.3.0/net/http.rb:930:in `connect': Net::OpenTimeout (Net::OpenTimeout)
    from /usr/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
    from /usr/lib/ruby/2.3.0/net/http.rb:852:in `start'
    from /usr/lib/ruby/2.3.0/net/http.rb:1398:in `request'
    from /var/lib/gems/2.3.0/gems/httparty-0.16.3/lib/httparty/request.rb:145:in `perform'
    from /var/lib/gems/2.3.0/gems/httparty-0.16.3/lib/httparty.rb:573:in `perform_request'
    from /var/lib/gems/2.3.0/gems/httparty-0.16.3/lib/httparty.rb:507:in `post'
    from /var/lib/gems/2.3.0/gems/httparty-0.16.3/lib/httparty.rb:624:in `post'
    from /var/lib/gems/2.3.0/gems/ruby_fints-0.0.3/lib/fints/https_connection.rb:11:in `send_msg'
    from /var/lib/gems/2.3.0/gems/ruby_fints-0.0.3/lib/fints/dialog.rb:81:in `send_msg'
    from /var/lib/gems/2.3.0/gems/ruby_fints-0.0.3/lib/fints/dialog.rb:39:in `sync'
    from /var/lib/gems/2.3.0/gems/ruby_fints-0.0.3/lib/fints/client.rb:47:in `get_statement'
    from /home/pi/ynab-bank-importer/lib/dumper/fints.rb:23:in `fetch_transactions'
    from /home/pi/ynab-bank-importer/lib/account.rb:19:in `fetch_transactions'
    from run.rb:11:in `block in <main>'
    from run.rb:9:in `map'
    from run.rb:9:in `<main>'

I dont get the error everytime i run the app. Only every 5 fetches or something like that. I run the script every hour via crontab.

Thanks for your help

christophwolff commented 5 years ago

any news on this?