YunoHost-Apps / kresus_ynh

Kresus (personal finance manager) for YunoHost
https://kresus.org/
GNU Affero General Public License v3.0
20 stars 20 forks source link

Kresus App fails to open on Yunohost on Raspberry pi 4 from webadmin #169

Closed Didou09 closed 12 months ago

Didou09 commented 1 year ago

Describe the bug

clicking this leads to this
image image

Context

IPv6 reverse DNS
image image

Steps to reproduce

see above

Expected behavior

*A working Kresus instance, able to open normally in my browser

Logs

I can't find any logs corresponding to the failed attempt at opening the app.

Is it possible that either the IPv6 or the reverse DNS issue is causing the app to not open ? Please tell me it;s something else, I already struggled to make it work thus far... I don't know how to debug these 2, and some of it depends on my Internet provider, which I have no control on, living in a shared house.

nicofrand commented 1 year ago

Without any logs it's hard to tell what's wrong. Maybe https://github.com/YunoHost-Apps/kresus_ynh/issues/162.

You'll have to check the apps logs, through CLI I guess.

Didou09 commented 1 year ago

OK @nicofrand , I can connect as admin via ssh in a terminal. Which command should I type that would be the most informative to help debug this ?

I've found this log file thus far: /var/log/kresus/kresus.log

It's attached too kresus.log

nicofrand commented 1 year ago

OK, Kresus seems to be running.

What is the output of curl http://127.0.0.1:9876 -v ?

Didou09 commented 1 year ago

This, does it help?

image

Looks like the port is open

nicofrand commented 1 year ago

What about curl http://[::1]:9876 then?

Didou09 commented 1 year ago

This one fails:

image

It's not mentionned in the Yunohost port-forwarding page: https://yunohost.org/en/isp_box_config

What does it correspond to ? how shall I configure it ?

nicofrand commented 1 year ago

I just wanted to see if it was reachable through IP6. What is the output of netstat -plnt | grep 9876?

Didou09 commented 1 year ago

image

Does that help ?

nicofrand commented 1 year ago

We are now sure Kresus is running, on localhost and port 9876. It's a shame we don't see past the "LISTEN" part. I guess it is "node"?

That also means the curl http://127.0.0.1:9876 should work. Can you try again? You are doing it from the raspberry right? What about nc -zv 127.0.0.1 9876?

Didou09 commented 1 year ago

So I'm doing everything from the raspberry (I connect to it via ssh from my pc).

There was nothing after the "LISTEN" in the previous screenshot, I've done it again below: image

In that test I had to interrupt the curl http://127.0.0.1:9876 because nothing was happening (I waited ~30 seconds). This particular command does not seem to work.

nicofrand commented 1 year ago

Ah, can you try running the netstat command as sudo please?

That should look like this:

tcp        0      0 127.0.0.1:33060         0.0.0.0:*               LISTEN      1365/mysqld  
Didou09 commented 1 year ago

It's indeed listening to something:

image

If I try to sudo the curl command however it still does not work (nothing happens and after a while I interrupt it with ctrl+C

Didou09 commented 1 year ago

@nicofrand any chance there is a solution to this ?

nicofrand commented 1 year ago

Does it occur every time you try to install it? As far as I can tell from the logs, Kresus in running alright. The issue comes from your network I guess but I don't know what is going on… You might want to try to get some help on the Yunohost room on Matrix, or on the forum.

Didou09 commented 12 months ago

So I tried uninstalling and re-installing => same behaviour.

Like you suggested @nicofrand, I understand this may to do with how my network and / or yunohost is configured. I tried reaching out to the yunohost folks both on the Matrix chatroom and on the forum. It's been 22 days now and I haven't received a single answer, I'm not even sure anyone has actually looked at the messages. I think I'll give up, I'm stuck and don't know how to solve the probem.

Do you know any other good open source client-side app for personal finance that does not require to run on a server ? Thanks for your help,

Didou09 commented 12 months ago

ok, looks like someone (you?) just answered on Matrix after I re-posted the same message again, thanks

nicofrand commented 12 months ago

Yup, it was me. Can you try curl -4 http://127.0.0.1:9876? And service kresus status?

Didou09 commented 12 months ago

done, posted on Matrix,

Thanks for your help ! very appreciated

nicofrand commented 12 months ago

Answers from Matrix:

I still don't know why the request times out.

nicofrand commented 12 months ago

Can you try curl http://127.0.0.1:47603/kresus please? Also the content of /etc/nginx/conf.d/warren.nohost.me.d/kresus.conf (or something like that).

bnjbvr commented 12 months ago

Do you have set a firewall?

Didou09 commented 12 months ago

curl http://127.0.0.1:47603/kresus

image

Didou09 commented 12 months ago

content of /etc/nginx/conf.d/warren.nohost.me.d/kresus.conf

 rewrite ^/kresus$ /kresus/ permanent;
location /kresus/ {
  alias /var/www/kresus/build/client/;
  try_files $uri $uri/index.html @kresus;

  # Include SSOWAT user panel.
  include conf.d/yunohost_panel.conf.inc;
}

location ~ /kresus/\.(css|js|png|jpe?g|svg|eot|woff2?)$ {
  more_set_headers 'Cache-Control: max-age=2592000, must-revalidate, public';
  gzip_types text/plain text/css application/javascript text/javascript;
  try_files $uri $uri/index.html @kresus;
}

location @kresus {
  client_max_body_size  8M;
  send_timeout          600;
  proxy_connect_timeout 600;
  proxy_send_timeout    600;
  proxy_read_timeout    600;
  proxy_set_header      Host $host;

  proxy_pass http://127.0.0.1:47603;
  proxy_redirect off;
}
Didou09 commented 12 months ago

Do you have set a firewall?

Not sure actually. I did not install one myself, that's for sure. Maybe my Internet Service Provider (ISP) implements one in the router by default ? I'm living in the USA since 4 month, not sure what the habits are here, I'll ask some colleagues

Didou09 commented 12 months ago

Also here the logs from the diagnostics (someone asked for it on Matrix):

https://paste.yunohost.org/raw/ociyonizup

nicofrand commented 12 months ago

OK, I think I see what's going on and it has nothing to do with this package nor Kresus.

How do you access your YunoHost admin? Please try accessing https://warren.nohost.me from a different network. If that works please take a look at https://yunohost.org/en/dns_local_network.

Didou09 commented 12 months ago

OK, thanks

Now I can access Kresus and try to create a first account / connection to my bank Thanks a lot

I have a new question directly concerning Kresus: I see that to create a direct connection to my bank I nee to give my login and password. How are these credentials saved in Kresus ? Are they crypted ? how can I be sure they are not saved in plain text ?

Also, is there an option to manually enter them everytime I want to update / download data from the bank instead of storing them permanently ?

image

nicofrand commented 12 months ago

OK, I'll close this issue then.

For any question directly related to Kresus please refer to the FAQ (https://kresus.org/en/faq.html#how-is-my-banking-data-stored-in-kresus) or the forum (https://community.kresus.org).

You can also see open issues/feature requests on Kresus' repository: https://framagit.org/kresusapp/kresus/.