Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble installing PDF Annotate backend Server #16

Open
Deltafox01 opened this issue Feb 4, 2021 · 4 comments
Open

Trouble installing PDF Annotate backend Server #16

Deltafox01 opened this issue Feb 4, 2021 · 4 comments

Comments

@Deltafox01
Copy link

Hello Guys.

Im having trouble installing the Server Backend component.
In your README you are suggesting: "Copy server.conf.in to server.conf and adjust to your requirements."

I can not copy your example file, because it does not exist in the default folder.... ?

Am i missing something?

Thanks in advance for your help!

@rekXx
Copy link

rekXx commented Feb 6, 2021

There is a file named "config.js.in"
Renaming/copying this to "config.js" worked for me.

@cig0
Copy link

cig0 commented Feb 8, 2021

@rekXx were you able to successfully install the server, annotate and download documents?

@Deltafox01
Copy link
Author

Deltafox01 commented Feb 8, 2021

There is a file named "config.js.in"
Renaming/copying this to "config.js" worked for me.

Thanks!
It did, a part of it, work for me!

Server is starting, but thats it! Cant make notes in PDFs.... "establishing connection".... is being shown when i open a PDF file in Nextcloud.... i tried everything.... localhost, Server IP, full Server Domain/Name, different Ports....

image

:-(

@rekXx
Copy link

rekXx commented Feb 9, 2021

@rekXx were you able to successfully install the server, annotate and download documents?

Unfortunately I am stuck at a connection problem as mentioned by @Deltafox01.

Cant make notes in PDFs.... "establishing connection".... is being shown when i open a PDF file in Nextcloud....

running the server doesn't throw any errors. I just get:

$ nodejs server.js
Using pdftk to run as pdftk
Using svg2pdf to run as svg2pdf
listening on *:8080

The problem is already mentioned in another thread, but no solution has been posted so far:
#14

Ok, I got it going while writing this post and fiddeling around with some configurations.

Now my setup looks like this:
Nextcloud and pdf-annotations server are on two different virtual machines behind a third vm that acts as a reverse proxy for the first two. The reverse proxy does the ssl termination and forwards the traffic to the corresponding server via http on the local network (on the same server).

Directing the wan-port to the reverse proxy in my setup is crucial, because pdf-annotations server seems to force a ssl connection back to the nextcloud instance.

This is the additional entry for the nginx reverse proxy:
(I needed to use 8081 as 8080 is already in use. But this setup should as well allow the usage of port 443 for both nextcloud and pdf-annotations server. But for testing I don't want to mess around with the working configuration)
192.168.0.14 = reverse proxy server
192.168.0.17 = pdf-annotations server

server {
        listen 8081 ssl http2;

        server_name nextcloud.[...].net 192.168.0.14;
        access_log /var/log/nginx/nextcloud.access.log;
        error_log /var/log/nginx/nextcloud.error.log;

        include snippets/nextcloud.[...].conf;
        include snippets/ssl-params.conf;

        client_max_body_size 16G;


        location /socket.io {
                include snippets/proxy-params.conf;
                proxy_ssl_protocols TLSv1.3;
                proxy_buffering off;

                proxy_set_header Connection "Keep-Alive";
                proxy_cache_bypass $http_upgrade;
                proxy_max_temp_file_size 8192m;

                proxy_pass http://192.168.0.17:8080; #pdf annotations server
        }
        location /download {
                include snippets/proxy-params.conf;
                proxy_ssl_protocols TLSv1.3;
                proxy_buffering off;

                proxy_set_header Connection "Keep-Alive";
                proxy_cache_bypass $http_upgrade;
                proxy_max_temp_file_size 8192m;


                proxy_pass http://192.168.0.17:8080; #pdf annotations server
        }
}

Not quite sure whether all entries are necessary (did some copy and paste), but it works. Maybe you could give me some feedback on that.

I also added an entry in /etc/hosts of the pdf-annotations server to resolve the dns name to the local ip address of the reverse proxy 192.168.0.14 (in my case).

The last trick after successfully opening the pdf file without the connecting message was to click on the pencil icon in the top right corner and selcting the pencil.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants