[Support] Paperless-ng Docker


118 posts in this topic Last Reply

Recommended Posts

20 hours ago, mweis said:

 

here is my mail.log ???? [...]

 

Sorry, for the late response. Looks like you got your answer here.

 

On 2/15/2021 at 9:21 AM, muppie said:

Hi!

 

Maybe this is a question for the actual developer, but it might not be. I’m having trouble with using environment variables in the unraid template to ensure that the dates are in the local way (DMY) instead of the US way (MDY), but I can’t seem to make it work. I’m attaching the way I have set it up, can someone confirm that it’s correct and it’s wrong somewhere else? All the ”dates created” on the added files in paperless-ng is wrong and based on MDY.

 

Many thanks in advance

 

//Muppie

 

Have you checked the documentation? The variable PAPERLESS_FILENAME_DATE_ORDER you are using means something different:

 

PAPERLESS_FILENAME_DATE_ORDER=<format>: Paperless will check the document text for document date information. Use this setting to enable checking the document filename for date information. The date order can be set to any option as specified in https://dateparser.readthedocs.io/en/latest/settings.html#date-order. The filename will be checked first, and if nothing is found, the document text will be checked as normal.

 

Have a look at the first page of this post. We discussed changing the date order there.

Link to post
  • Replies 117
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

another plus is, that this docker uses a different method on checking the "consume" inbound directory for new documents. Although I pointed this dir to a standard user share (including cache = YE

Overview: Dedicated support thread for the Docker template paperless-ng in the selfhosters/unRAID-CA-templates repository Docker Hub: https://github.com/jonaswinkler/paperless-ng Documentati

Really just want to say THANKS for bringing this template to the community. Paperless (OG) left something to be desired for me, but Paperless-ng really does what I want and has the look/feel I was aft

Posted Images

1 hour ago, T0a said:

Sorry, for the late response. Looks like you got your answer here.

 

 

Have you checked the documentation? The variable PAPERLESS_FILENAME_DATE_ORDER you are using means something different:

 

PAPERLESS_FILENAME_DATE_ORDER=<format>: Paperless will check the document text for document date information. Use this setting to enable checking the document filename for date information. The date order can be set to any option as specified in https://dateparser.readthedocs.io/en/latest/settings.html#date-order. The filename will be checked first, and if nothing is found, the document text will be checked as normal.

 

Have a look at the first page of this post. We discussed changing the date order there.

Thanks! I must’ve misunderstood something. 

Link to post

Hi there! 

I have the latest version installed (1.1.4) and I've noticed that all the files I've imported via the "Consume" folder, still exist in that folder but proceeded with a dot making them invisible. Is that normal? How do I get rid of them ?

Thanks!

Link to post

I have just installed paperless-ng. A year ago I was using the 'old' paperless and I have a backup of that database. All files seem present but when I search for a text It will not return any results. It should work as when I go to that document and check the 'content' tab it has that exact string I am searching for. Is there anything I need to do when coming from an old database? Perhaps reindex or something?

 

On the site I see "docker-compose run --rm webserver document_index reindex" but I don't use docker-compose (I use this template) so where can I find this script?

 

Ah I see it now:

Quote

docker exec -it paperless-ng <command> <arguments>

I was confused by the webserver part at first :)

Edited by mattie112
Link to post

Completely new to unRAID... planning to migrate from Windows/Docker Desktop in the near future.  In the FAQs you have listed a note about inotify not working on NFS shares -- does that apply to the way the data volume is mounted for this app, or all instances of paperless-ng running via Docker containers?  I've been experimenting with Paperless for a couple of weeks now in a sandbox, and plan to roll it out on my unRAID... but I had hoped the inotify folder watcher would just work since unRAID is Linux at its core (I got bit last year trying to set it up on Windows Docker because inotify doesn't work on Windows folders at all - volumes or not).

Link to post

I can't answer your specific question about inotify on Unraid. I'm playing with Paperless-ng on my Unraid server and it seems to see and process files in the consume folder with no problem. I would describe my experience this way - Paperless-ng works great on an Unraid server, and you will spend more time thinking about things like tags and workflow than actually getting it to work.

Link to post
14 hours ago, rswafford said:

Completely new to unRAID... planning to migrate from Windows/Docker Desktop in the near future.  In the FAQs you have listed a note about inotify not working on NFS shares -- does that apply to the way the data volume is mounted for this app, or all instances of paperless-ng running via Docker containers?  I've been experimenting with Paperless for a couple of weeks now in a sandbox, and plan to roll it out on my unRAID... but I had hoped the inotify folder watcher would just work since unRAID is Linux at its core (I got bit last year trying to set it up on Windows Docker because inotify doesn't work on Windows folders at all - volumes or not).

 

Do you want to mount the 'consume' directory via NFS? Why? Ionotify works fine on docker just the regular folder mapping/mount.

Link to post
59 minutes ago, mattie112 said:

 

Do you want to mount the 'consume' directory via NFS? Why? Ionotify works fine on docker just the regular folder mapping/mount.

No, I wanted to consume the directory directly via a folder mount. I was confused by the note and wanted to make sure there wasn't anything funky with the Docker on unRAID setup that would make it appear as an NFS mount somehow. Thanks!

Link to post

Decided to install and just manually add all my docs from paperless back. I'm getting a strange error on about half of them and google is zero help. 

[2021-03-04 16:55:26,100] [ERROR] [paperless.consumer] Error while consuming document 2021-01-30-0104240000-none-20180222_175754-0000124.jpg: ExifOrientationError: Invalid rotation (0)

The documents in question are absolutely oriented correctly. Has anyone seen this or know of a work around? Thanks!

Link to post

Hi guys, i got an issue with my paperless-ng container. After update the container semed to be corrupted. so i had to completly clean my docker.img file since it got damaged.

Now i reinstalled redis docker and paperless. however when i start the "paperless"-Docker it instantly stops again. in the systemlogs i only find this as an error:
"Mar 10 09:57:41 Tower nginx: 2021/03/10 09:57:41 [error] 3603#3603: *4528 connect() to unix:/var/tmp/paperless-ng.sock failed (111: Connection refused) while connecting to upstream, client: 192.168.2.116, server: , request: "GET /dockerterminal/paperless-ng/ws HTTP/1.1", upstream: "http://unix:/var/tmp/paperless-ng.sock:/ws", host: "tower""

 

192.168.2.116 is my local pc from where i got the interface open.

edit. Also tried with removing the app data from the old one - got it backup through. But didn't change a thing. 
Did i have to do anything in redis before the container could work ? been i while since i set it up.

 

Any idea what the issue could be ? and if ya need anythign else to help just say so.

Edited by eav86
Link to post

I love the program and I've been using it for my document management a lot, however has there been anything to address this error that I get constantly when my Consume directory tries to pull in a PDF?

 

Title.pdf

LeptonicaError: [2021-03-17 15:03:07,879] [ERROR] [ocrmypdf._exec.ghostscript] **** Error: stream operator isn't terminated by valid EOL. Output may be incorrect. **** Error: stream operator isn't terminated by valid EOL. Output may be incorrect. 

 

It seems to happen about two out of 3 times and is rather annoying.

Link to post

Is this always the same document or different ones? Is your consume directory mapped by docker but local on Unraid or is it somekind of network directory? Also does it tries a couple of times and does it work or does it never consume that pdf?

Link to post
1 minute ago, mattie112 said:

Is this always the same document or different ones? Is your consume directory mapped by docker but local on Unraid or is it somekind of network directory? Also does it tries a couple of times and does it work or does it never consume that pdf?

It's always different ones.

 

It's mapped in Docker and local in Unraid, it's basically in the same Share.

 

The only way I've found for it to work is to open the PDF and "reprint" it as another PDF, that works about 80% of the time. It's very annoying to do it over and over.

Link to post
On 3/10/2021 at 10:05 AM, eav86 said:

Hi guys, i got an issue with my paperless-ng container. After update the container semed to be corrupted. so i had to completly clean my docker.img file since it got damaged.

Now i reinstalled redis docker and paperless. however when i start the "paperless"-Docker it instantly stops again. in the systemlogs i only find this as an error:
"Mar 10 09:57:41 Tower nginx: 2021/03/10 09:57:41 [error] 3603#3603: *4528 connect() to unix:/var/tmp/paperless-ng.sock failed (111: Connection refused) while connecting to upstream, client: 192.168.2.116, server: , request: "GET /dockerterminal/paperless-ng/ws HTTP/1.1", upstream: "http://unix:/var/tmp/paperless-ng.sock:/ws", host: "tower""

 

192.168.2.116 is my local pc from where i got the interface open.

edit. Also tried with removing the app data from the old one - got it backup through. But didn't change a thing. 
Did i have to do anything in redis before the container could work ? been i while since i set it up.

 

Any idea what the issue could be ? and if ya need anythign else to help just say so.

Still looking for help with the issue :/ have tried basicly everything but changing the port. but the container still instantly switches to "stopped" after it get started.

Link to post
On 2/7/2021 at 5:02 PM, Michelangelo said:

 

Update on my own post:

 

Looks like i fixed it!

 

For people who might experience the same issue, here is what I did to fix the problem: 

 

Before troubleshooting, I installed Redis via the Community apps platform. I picked the one from Bitnami. I did all configuration, with and without password, and it all worked as expected. But since I don't like the fact that my harddrive is constantly active, i started looking for a solution. 

 

Since I, with the help of jonaswinkler(developer of Paperless-NG) , figured out that the issue was happening somehwere between Paperless and Redis, I removed the Bitnami Redis and installed the Redis docker container manually via the Add container button (used redis:latest to make sure I recieved the latest version). I configured the port, removed the password line from the paperless docker settings and rebooted both dockers. After that, uploading works and the disk stops working after it's done with its tasks. 

 

 

Remaining question: Would you recommend using a password between Redis and Paperless-ng? 

 

For everyone using Bitnami Redis with a password the answer to this is to use this connection string:
 

redis://default:[PASSWORD]@[IP]:6379

Link to post

New to UNRAID and paperless-ng. Installed the docker and created a superuser. I will have to look into how to setup the workflow for consuming docuemnts. However, any reason I shouldn't be able to load documents via the WebUI? When I try to do this I get the following error: "HTTP error: 500 Internal Server Error".

Link to post

Yeah there is a "upload document" option. It works here, can you check the logs of the paperless container? Perhaps the directory is not writeable or something like that?

 

And also: for consuming you should not really need to do a lot of config, does it not work when you add some documents to the "scans" (consume) folder

Link to post
3 hours ago, mattie112 said:

Yeah there is a "upload document" option. It works here, can you check the logs of the paperless container? Perhaps the directory is not writeable or something like that?

 

This is what the log shows. There are multiple instances of the error as I tried more than once. Does this help?

 

File "/usr/local/lib/python3.7/asyncio/tasks.py", line 414, in wait_for
return await fut
File "/usr/local/lib/python3.7/site-packages/asgiref/current_thread_executor.py", line 23, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.7/site-packages/asgiref/sync.py", line 343, in thread_handler
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/usr/src/paperless/src/documents/views.py", line 430, in post
task_name=os.path.basename(doc_name)[:100])
File "/usr/local/lib/python3.7/site-packages/django_q/tasks.py", line 73, in async_task
enqueue_id = broker.enqueue(pack)
File "/usr/local/lib/python3.7/site-packages/django_q/brokers/redis_broker.py", line 18, in enqueue
return self.connection.rpush(self.list_key, task)
File "/usr/local/lib/python3.7/site-packages/redis/client.py", line 2016, in rpush
return self.execute_command('RPUSH', name, *values)
File "/usr/local/lib/python3.7/site-packages/redis/client.py", line 898, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 1192, in get_connection
connection.connect()
File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 563, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error -5 connecting to replace-with-ip:6379. No address associated with hostname.
[2021-03-23 21:00:08,790] [ERROR] [django.request] Internal Server Error: /api/documents/post_document/

 

Quote

 

And also: for consuming you should not really need to do a lot of config, does it not work when you add some documents to the "scans" (consume) folder

 

Definitely not working for me. I took an existing UNRAID share and created a paperless folder. In there I have subfolders for consume, consumed, and export. I pointed paperless to these folders in the docker setup. I placed a file in the consume folder but nothing appears to have happened. What else can I provide here?

Edited by randonw
Link to post

Do you have a redis container running? And the PAPERLESS_REDIS environment variable correctly set? It uses redis to schedule tasks (like consuming)

 

I have `sameersbn/redis` running with no other config then the port (6379)

 

and the env variable for paperless set to:

redis://iip_unraid_server:6379

Link to post
2 hours ago, mattie112 said:

Do you have a redis container running? And the PAPERLESS_REDIS environment variable correctly set? It uses redis to schedule tasks (like consuming)

 

I have `sameersbn/redis` running with no other config then the port (6379)

 

and the env variable for paperless set to:

redis://iip_unraid_server:6379

 

I do not have redis running. I must have missed that step. I will look into it and report back. Is it thought that this address BOTH the WebUI and consume issues?

Link to post

Has anybody managed to get this working through the SWAG reverse proxy container? I've verified the NGINX config file values as per  the documentation but it still isn't working - I get a 502 Bad Gateway error.

 

Here is my swag conf file if it helps...

 

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name paperless.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 10M;

    # enable for ldap auth, fill in ldap details in ldap.conf
    #include /config/nginx/ldap.conf;

    # enable for Authelia
    #include /config/nginx/authelia-server.conf;

    location / {
        # enable the next two lines for http auth
        #auth_basic "Restricted";
        #auth_basic_user_file /config/nginx/.htpasswd;

        # enable the next two lines for ldap auth
        #auth_request /auth;
        #error_page 401 =200 /ldaplogin;

        # enable for Authelia
        #include /config/nginx/authelia-location.conf;

        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_app paperless-ng;
        set $upstream_port 8000;
        set $upstream_proto https;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

	# These configuration options are required for WebSockets to work.
	proxy_set_header Connection "upgrade";

	proxy_redirect off;
	proxy_set_header Host $host;
	proxy_set_header X-Real-IP $remote_addr;
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    }
}

 

Also to add, this is what I get in the paperless log whenever I try to access the site through swag:

[44] [WARNING] Invalid HTTP request received.
  Traceback (most recent call last):
    File "/usr/local/lib/python3.7/site-packages/uvicorn/protocols/http/httptools_impl.py", line 167, in data_received
      self.parser.feed_data(data)
    File "httptools/parser/parser.pyx", line 193, in httptools.parser.parser.HttpParser.feed_data
  httptools.parser.errors.HttpParserInvalidMethodError: invalid HTTP method

 

Edited by Lumpy_BD
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.