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

Unable to login #61

Closed
francois072 opened this issue Jan 25, 2022 · 15 comments
Closed

Unable to login #61

francois072 opened this issue Jan 25, 2022 · 15 comments
Labels
bug Something isn't working

Comments

@francois072
Copy link

I am unable to login.

Getting this error:

Error while connecting to
server

DioError [DioErrorType. DEFAULT]:
SocketException: OS Error:
Connection refused, errno =111,
address =192.168.43.195, port =35176
@francois072 francois072 added the bug Something isn't working label Jan 25, 2022
@qcasey
Copy link
Collaborator

qcasey commented Jan 25, 2022

Are you able to connect to Paperless in a browser at http://192.168.43.195:35176 ?

What's the full url you're using?

@francois072
Copy link
Author

@francois072
Copy link
Author

Also can't login with this url: http://192.168.43.195:8000/

@francois072
Copy link
Author

francois072 commented Jan 25, 2022

#PAPERLESS_DEBUG=false

#Required services

#PAPERLESS_REDIS=redis://localhost:6379
#PAPERLESS_DBHOST=localhost
#PAPERLESS_DBPORT=5432
#PAPERLESS_DBNAME=paperless
#PAPERLESS_DBUSER=paperless
#PAPERLESS_DBPASS=paperless
#PAPERLESS_DBSSLMODE=prefer

#Paths and folders

PAPERLESS_CONSUMPTION_DIR=/var/lib/paperless/consume
PAPERLESS_DATA_DIR=/var/lib/paperless/data
PAPERLESS_MEDIA_ROOT=/var/lib/paperless/media
PAPERLESS_STATICDIR=/usr/share/paperless/static
PAPERLESS_FILENAME_FORMAT={title}

#Security and hosting

PAPERLESS_SECRET_KEY=54ebdb526aa23cfaff03804a6666a9a3
#PAPERLESS_ALLOWED_HOSTS=example.com,www.example.com
#PAPERLESS_CORS_ALLOWED_HOSTS=http://example.com,http://localhost:8000
#PAPERLESS_FORCE_SCRIPT_NAME=
#PAPERLESS_STATIC_URL=/static/
#PAPERLESS_AUTO_LOGIN_USERNAME=
#PAPERLESS_COOKIE_PREFIX=
PAPERLESS_ENABLE_HTTP_REMOTE_USER=true

#OCR settings

PAPERLESS_OCR_LANGUAGE=eng+afr
#PAPERLESS_OCR_MODE=skip
#PAPERLESS_OCR_OUTPUT_TYPE=pdfa
#PAPERLESS_OCR_PAGES=1
#PAPERLESS_OCR_IMAGE_DPI=300
PAPERLESS_OCR_CLEAN=clean
#PAPERLESS_OCR_DESKEW=true
#PAPERLESS_OCR_ROTATE_PAGES=true
#PAPERLESS_OCR_ROTATE_PAGES_THRESHOLD=12.0
#PAPERLESS_OCR_USER_ARGS={}
#PAPERLESS_CONVERT_MEMORY_LIMIT=0
PAPERLESS_CONVERT_TMPDIR=/var/lib/paperless/tmp
PAPERLESS_OCR_LANGUAGES=afr

#Software tweaks

#PAPERLESS_TASK_WORKERS=1
#PAPERLESS_THREADS_PER_WORKER=1
#PAPERLESS_TIME_ZONE=UTC
#PAPERLESS_CONSUMER_POLLING=10
PAPERLESS_CONSUMER_DELETE_DUPLICATES=true
PAPERLESS_CONSUMER_RECURSIVE=true
#PAPERLESS_CONSUMER_IGNORE_PATTERNS=[".DS_STORE/", "._", ".stfolder/*"]
#PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS=true
#PAPERLESS_OPTIMIZE_THUMBNAILS=true
#PAPERLESS_POST_CONSUME_SCRIPT=/path/to/an/arbitrary/script.sh
#PAPERLESS_FILENAME_DATE_ORDER=YMD
#PAPERLESS_FILENAME_PARSE_TRANSFORMS=[]
#PAPERLESS_THUMBNAIL_FONT_NAME=
#PAPERLESS_IGNORE_DATES=

#Tika settings

PAPERLESS_TIKA_ENABLED=true
PAPERLESS_TIKA_ENDPOINT=http://localhost:9998
PAPERLESS_TIKA_GOTENBERG_ENDPOINT=http://localhost:3000

#Binaries

#PAPERLESS_CONVERT_BINARY=/usr/bin/convert
#PAPERLESS_GS_BINARY=/usr/bin/gs
#PAPERLESS_OPTIPNG_BINARY=/usr/bin/optipng

#Uploads

PAPERLESS_SCRATCH_DIR=/var/lib/paperless/uploads

#Webserver

GUNICORN_CMD_ARGS='--bind=127.0.0.1:8000'

@qcasey
Copy link
Collaborator

qcasey commented Jan 25, 2022

Does logging in with http://192.168.43.195:8000/ give the same Connection refused error, or something different?

Other people have fixed login errors by dropping the trailing slash, http://192.168.43.195:8000

Also, if you know have a Single Sign On like Authelia, see this discussion

@francois072
Copy link
Author

francois072 commented Jan 25, 2022

With the browser nothing is found and in the paperless app was what I was trying to login with when I sent the error message.

@qcasey
Copy link
Collaborator

qcasey commented Jan 25, 2022

With the browser nothing is found

The Paperless App needs the Server URL to be exactly what works in the browser. A Connection refused usually means the URL is typed wrong. I don't know which URL works for you.

@francois072
Copy link
Author

How can I find the correct URL?

@qcasey
Copy link
Collaborator

qcasey commented Jan 25, 2022

You need to use the IP address of the server with your paperless installation.

Here are two examples I use:

1.

Working in browser: https://paperless-demo.quinncasey.com/scan/dashboard <-- This url works in the browser
Working in Paperless App: https://paperless-demo.quinncasey.com

2

Working in browser: http://192.168.1.8:8010/scan/dashboard
Working in Paperless App: http://192.168.1.8:8010

Your server URL might be similar to 2

@francois072
Copy link
Author

francois072 commented Jan 25, 2022

From my desktop on which Paperless is running bare metal:

3: wlp0s29u1u3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether d0:37:45:3f:2e:02 brd ff:ff:ff:ff:ff:ff
inet 192.168.43.195/24 brd 192.168.43.255 scope global dynamic noprefixroute wlp0s29u1u3
valid_lft 2276sec preferred_lft 2276sec
inet6 fe80::7d8e:cd4:7a62:3c53/64 scope link noprefixroute
valid_lft forever preferred_lft forever

127.0.0.1:8000 Allows me to connect to Paperless from the desktop. Unsure why http://192.168.43.195:8000 wouldn't work.

Might try the Paperless Github, maybe something is misconfigured.

@qcasey
Copy link
Collaborator

qcasey commented Jan 25, 2022

127.0.0.1:8000 Allows me to connect to Paperless from the desktop. Unsure why http://192.168.43.195:8000 wouldn't work.

Ah! In the last part of your paperless server config, try changing

GUNICORN_CMD_ARGS='--bind=127.0.0.1:8000'

to

GUNICORN_CMD_ARGS='--bind=0.0.0.0:8000'

then restart the paperless server.

@francois072
Copy link
Author

It worked kind of.
Now I'm getting Bad Request (400) on the desktop and luckily on the phone too.

@qcasey
Copy link
Collaborator

qcasey commented Jan 25, 2022

Any clues in the logs?

@francois072
Copy link
Author

Unfortunately now nothing gets written to the logs.

@qcasey
Copy link
Collaborator

qcasey commented Jan 25, 2022

I'm thinking there might be something wrong with your config. I installed paperless-ng from the AUR, then ran the 3 suggested commands

sudo -u paperless paperless-manage migrate
sudo -u paperless paperless-manage createsuperuser
sudo systemctl start paperless.target

Edited the last line of /etc/paperless.conf to look like this:

# Have a look at the docs for documentation.
# https://paperless-ng.readthedocs.io/en/latest/configuration.html

# Debug. Only enable this for development.

#PAPERLESS_DEBUG=false

# Required services

#PAPERLESS_REDIS=redis://localhost:6379
#PAPERLESS_DBHOST=localhost
#PAPERLESS_DBPORT=5432
#PAPERLESS_DBNAME=paperless
#PAPERLESS_DBUSER=paperless
#PAPERLESS_DBPASS=paperless
#PAPERLESS_DBSSLMODE=prefer

# Paths and folders

PAPERLESS_CONSUMPTION_DIR=/var/lib/paperless/consume
PAPERLESS_DATA_DIR=/var/lib/paperless/data
PAPERLESS_MEDIA_ROOT=/var/lib/paperless/media
PAPERLESS_STATICDIR=/usr/share/paperless/static
#PAPERLESS_FILENAME_FORMAT=

# Security and hosting

#PAPERLESS_SECRET_KEY=change-me
#PAPERLESS_ALLOWED_HOSTS=example.com,www.example.com
#PAPERLESS_CORS_ALLOWED_HOSTS=http://example.com,http://localhost:8000
#PAPERLESS_FORCE_SCRIPT_NAME=
#PAPERLESS_STATIC_URL=/static/
#PAPERLESS_AUTO_LOGIN_USERNAME=
#PAPERLESS_COOKIE_PREFIX=
#PAPERLESS_ENABLE_HTTP_REMOTE_USER=false

# OCR settings

#PAPERLESS_OCR_LANGUAGE=eng
#PAPERLESS_OCR_MODE=skip
#PAPERLESS_OCR_OUTPUT_TYPE=pdfa
#PAPERLESS_OCR_PAGES=1
#PAPERLESS_OCR_IMAGE_DPI=300
#PAPERLESS_OCR_CLEAN=clean
#PAPERLESS_OCR_DESKEW=true
#PAPERLESS_OCR_ROTATE_PAGES=true
#PAPERLESS_OCR_ROTATE_PAGES_THRESHOLD=12.0
#PAPERLESS_OCR_USER_ARGS={}
#PAPERLESS_CONVERT_MEMORY_LIMIT=0
PAPERLESS_CONVERT_TMPDIR=/var/lib/paperless/tmp

# Software tweaks

#PAPERLESS_TASK_WORKERS=1
#PAPERLESS_THREADS_PER_WORKER=1
#PAPERLESS_TIME_ZONE=UTC
#PAPERLESS_CONSUMER_POLLING=10
#PAPERLESS_CONSUMER_DELETE_DUPLICATES=false
#PAPERLESS_CONSUMER_RECURSIVE=false
#PAPERLESS_CONSUMER_IGNORE_PATTERNS=[".DS_STORE/*", "._*", ".stfolder/*"]
#PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS=false
#PAPERLESS_OPTIMIZE_THUMBNAILS=true
#PAPERLESS_POST_CONSUME_SCRIPT=/path/to/an/arbitrary/script.sh
#PAPERLESS_FILENAME_DATE_ORDER=YMD
#PAPERLESS_FILENAME_PARSE_TRANSFORMS=[]
#PAPERLESS_THUMBNAIL_FONT_NAME=
#PAPERLESS_IGNORE_DATES=

# Tika settings

#PAPERLESS_TIKA_ENABLED=false
#PAPERLESS_TIKA_ENDPOINT=http://localhost:9998
#PAPERLESS_TIKA_GOTENBERG_ENDPOINT=http://localhost:3000

# Binaries

#PAPERLESS_CONVERT_BINARY=/usr/bin/convert
#PAPERLESS_GS_BINARY=/usr/bin/gs
#PAPERLESS_OPTIPNG_BINARY=/usr/bin/optipng

# Uploads

PAPERLESS_SCRATCH_DIR=/var/lib/paperless/uploads

# Webserver

GUNICORN_CMD_ARGS='--bind=0.0.0.0:8000'

After doing a sudo systemctl restart paperless.target, I can log in from my remote IP address of http://192.168.1.6:8000 in both the browser and Paperless App. Are you sure nothing comes up with sudo journalctl -u paperless-webserver.service?

This isn't a Paperless App issue at this point, so I'm going to close this and stop pinging the 14 watchers of this project 😄 lol. Reach out to me on gitter if you still are having trouble with your config after a system restart.

@qcasey qcasey closed this as completed Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants