movim / movim_ynh

[UNMAINTAINED -> go to YunoHost-Apps/movim_ynh]
https://github.com/YunoHost-Apps/movim_ynh
Other
14 stars 6 forks source link

Installing movim crashes agendav #16

Closed Trowic closed 8 years ago

Trowic commented 8 years ago

Hello,

I have Agendav installed on my yunohost instance and after installing movim i was unable to access agendav. Removing movim, makes it possible again to access it.

Moreover i had an issue : the websocket was unable to contact movim core. Couldn't figure why.

Ps : i have very limite knowledge with the technologies used in yunohost so please forgive me for this short errors message.

src386 commented 8 years ago

Hello, Thanks for reporting. I am able to reproduce the bug in my server, I will take a look.

src386 commented 8 years ago

Ok this problems occurs when SSO is enabled for Movim. I am working on it.

src386 commented 8 years ago

@Trowic : would you please install movim using SSH and provide the full output ?

yunohost app install https://github.com/src386/movim_ynh

Because I think it's two separate problem (agendav and websocket error).

Trowic commented 8 years ago

The output is very long so i posted it to gist : https://gist.github.com/Trowic/dba85cfe645754a66cbd

src386 commented 8 years ago

Thanks, two things :

Trowic commented 8 years ago

Ok so i've done it and updated the gist https://gist.github.com/Trowic/dba85cfe645754a66cbd Same problems Movim can't communicate with the server (websocket connection error) and breaks access to agendav.

src386 commented 8 years ago

Ok, movim should work now. I'm working on the agendav bug, it will be solved with the next release :) You should reinstall it because I think some passwords are visible in the gist links. New mysql password will be generated.

Trowic commented 8 years ago

Did you push some modifications to the github repos ? Can you explain what you fixed ? I can't see why movim should work. I've tried after the apt-get update and it didn't fix it.

src386 commented 8 years ago

I have pushed modifications only in the "dev" branch, and it's to fix the bug with agendav. Basicaly, there was a bug : when you click on disconnect, you are redirected to the login page, then yunohost automaticaly logs you... so it was impossible to disconnect. So I used a regex to exclude urls with "login" keyword. I thought that would apply only to movim, but it applies to agendav too.

I removed that regex and I have made a small modification in movim source code to avoid being redirected to the login page after disconnecting. This should avoid problem with other apps. As I said, it's still in the "dev" branch. You can try :

git clone https://github.com/src386/movim_ynh
cd movim_ynh
git checkout -b dev origin/dev
(if you want to upgrade)
yunohost app upgrade movim -f .
(or, if you perform a fresh install)
yunohost app install .

Keep in mind that it's dev, not fully tested yet.

2.

The websocket error you have is something else, it's because of your problem with apt repositories. You fixed it with apt-get update, are you able to use movim now ? Is it working ?

Trowic commented 8 years ago

Ok thanks for the comment in 1. ! I thnik i'll wait until your next stable release.

The websocket problem isn't solved. I'm thinking it may be because my yunohost instance lives inside a docker.

Thanks again for your help !

src386 commented 8 years ago

I don't really know docker but if Yunohost works, Movim should works. Can you post the output of :

service movim status

Movim has a daemon, that command will check if it's running.

Trowic commented 8 years ago
~$ sudo service movim status
Running

And still the error on movim login page and movim admin : Erreur de connexion WebSocket, vérifiez si le démon Movim est en cours d’exécution

src386 commented 8 years ago

Can you do :

tail -n 20 /var/log/movim.log
Trowic commented 8 years ago
Encrypted
yN6uDC0I8WYHjatN1YUGBVSKFNJRSX3c : 157 connected
yN6uDC0I8WYHjatN1YUGBVSKFNJRSX3c widgets before : 2.8423615 MB
yN6uDC0I8WYHjatN1YUGBVSKFNJRSX3c widgets : 4.8449554 MB
yN6uDC0I8WYHjatN1YUGBVSKFNJRSX3c : 157 deconnected
yN6uDC0I8WYHjatN1YUGBVSKFNJRSX3c : 211 connected
yN6uDC0I8WYHjatN1YUGBVSKFNJRSX3c : 216 connected
yN6uDC0I8WYHjatN1YUGBVSKFNJRSX3c : 221 connected
yN6uDC0I8WYHjatN1YUGBVSKFNJRSX3c : 226 connected
yN6uDC0I8WYHjatN1YUGBVSKFNJRSX3c : 231 connected
yN6uDC0I8WYHjatN1YUGBVSKFNJRSX3c : 216 deconnected
yN6uDC0I8WYHjatN1YUGBVSKFNJRSX3c : 226 deconnected
yN6uDC0I8WYHjatN1YUGBVSKFNJRSX3c : 211 deconnected
yN6uDC0I8WYHjatN1YUGBVSKFNJRSX3c : 221 deconnected
yN6uDC0I8WYHjatN1YUGBVSKFNJRSX3c : 231 deconnected
yN6uDC0I8WYHjatN1YUGBVSKFNJRSX3c : linker killed
src386 commented 8 years ago

That's weird, looks like you are connected... Try to restart the daemon ?

Trowic commented 8 years ago

Still the same, and i've tried with firefox IE and Chrome (they work on pod.movim.eu). Still the same kind of output in the log.

In the admin panel, the navigator is connected to movim core but not to movim daemon. Little red < - - > symbol between.

Did i missed something in a config file ?

src386 commented 8 years ago

Can you post the content of /etc/nginx/conf.d/mydomain.fr.d/movim.conf ?

Trowic commented 8 years ago
location /movim {
        alias /var/www/movim/;

        if ($scheme = http) {
                rewrite ^ https://$server_name$request_uri? permanent;
        }

        index index.php;
        try_files $uri $uri/ /index.php;

        location ~ [^/]\.php(/|$) {
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;
                fastcgi_pass unix:/var/run/php5-fpm-movim.sock;
                fastcgi_index index.php;
                include fastcgi_params;
                fastcgi_param REMOTE_USER     $remote_user;
                fastcgi_param PATH_INFO       $fastcgi_path_info;
                fastcgi_param SCRIPT_FILENAME $request_filename;
                }

        location ~ ^/movim/ws/ {
                proxy_pass http://localhost:9537;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "Upgrade";
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto https;
                proxy_redirect off;

                # To avoid disconnecting after 60sec :
                proxy_read_timeout 14400s;
                proxy_send_timeout 14400s;
                # (14400s is 4h)
                }
        }

location ~ /\.ht {
        deny all;
        }

location ~ /(config|log)$ {
        return 403;
        }

# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
src386 commented 8 years ago

It's correct. Can you try this :

service movim stop
su -c "cd /var/www/movim && php daemon.php https://mydomain.fr/movim 9537" movim

Then try to login on movim.

Trowic commented 8 years ago

I did this and i still have the same issue. I'll try to redirect port 9537 from my server to the docker hosting yunohost and keep you posted. I'm thinking that's why my browser can't contact movim deamon.

src386 commented 8 years ago

Good luck :/ Yeah Movim tries to connect tu 127.0.0.1 So if the daemon runs another server, I guess you have to redirect.

src386 commented 8 years ago

Ok you should try to upgrade movim now.

yunohost app upgrade movim -u https://github.com/src386/movim_ynh

Agendav should work :)

Trowic commented 8 years ago

Sorry for the delay, but thank you very much. Your patch worked agdendav stays alive \o/ !

src386 commented 8 years ago

Nice !

src386 commented 8 years ago

Do you mind if I close the issue ?

Trowic commented 8 years ago

Not at all, you successfully resolved the bug about agendav, so it's all good.

Thanks again for your help and your work with this yunohost app :)