https://github.com/blobmon/simplechan
I installed the bulletin board above on the Internet, but the home screen is displayed, but when I click on it and enter it, it doesn't show what should be displayed.Click to see something like this.
psycopg2.OperationalError
OperationalError: FATAL: Peer authentication failed for user "simplech_role"
Traceback (most recent call last)
File"/root/simplechan/venv/lib/python 2.7/site-packages/flask/app.py", line 2309, in__call__
return self.wsgi_app(environ, start_response)
File "/root/simplechan/venv/lib/python 2.7/site-packages/flask/app.py", line 2295, in wsi_app
response=self.handle_exception(e)
File"/root/simplechan/venv/lib/python 2.7/site-packages/flask/app.py", line 1741, in handle_exception
erase(exc_type, exc_value, tb)
File "/root/simplechan/venv/lib/python 2.7/site-packages/flask/app.py", line 2292, in wsi_app
response=self.full_dispatch_request()
File"/root/simplechan/venv/lib/python 2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv=self.handle_user_exception(e)
File"/root/simplechan/venv/lib/python 2.7/site-packages/flask/app.py", line 1718, in handle_user_exception
erase(exc_type, exc_value, tb)
File"/root/simplechan/venv/lib/python 2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File"/root/simplechan/venv/lib/python 2.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions [rule.endpoint](***req.view_args)
File "/root/simplechan/app/app/__init__.py", line 91, in mod_logs
handler=Handler()
File "/root/simplechan/app/app/handler.py", line 26, in __init__
self.con=psycopg2.connect("dbname='{}'user='{}'.format(app.config['DB_NAME'], app.config['DB_ROLE']))
File"/root/simplechan/venv/lib/python 2.7/site-packages/psycopg2/_init__.py", line 130, inconnect
conn=_connect(dsn, connection_factory=connection_factory, **kwasync)
OperationalError: FATAL: Peer authentication failed for user "simplech_role"
The debugger caught an exception in your WSGI application. You can now look at the traceback which to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" header. From the text traceback you can create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.
You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:
dump() shows all variables in the frame
dump(obj) dumps all that's known about the object
Through to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.
appears.What caused this to happen?
"Also, to install ""ffmpeg"" as stated on the site, while activating it
pip install ffmpeg
If you type
Could not find a version that matches the requirement subprocess (from ffmpeg) (from versions:)
No matching distribution found for subprocess (from ffmpeg)
appears in red letters.How can I install it?
Also, the last time you run python, it looks like this.
(venv)root@ubuntu-s-1vcpu-1gb-blr1-01:~/simplechan/app#python runserver.py
/root/simplechan/venv/local/lib/python 2.7/site-packages/psycopg2/_init__.py:144:UserWarning: The psycopg2 wheel package will be re-renamed from release 2.8; in order to keep installing from binary please use "pip installation." installation
""")
* Serving Flask app "app" (lazy loading)
* environment:production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server installed.
* Debug mode: on
* Running on http://0.0.0:5000 / (Press CTRL+C to quit)
* Restarting with stat
/root/simplechan/venv/local/lib/python 2.7/site-packages/psycopg2/_init__.py:144:UserWarning: The psycopg2 wheel package will be re-renamed from release 2.8; in order to keep installing from binary please use "pip installation." installation
""")
* Debugger is active!
* Debugger PIN: 931-992-838
Judging from the error message, the database authentication seems to have failed. Did you create the role and database successfully?
Please check if you can log in to the database.
Since you didn't specify a password, I think you need to check if you trust localhost.
python-connect to a DB using psycopg2 without password-Stack Overflow
ffmpeg·PyPI seems to be a completely meaningless dummy package.
Generic programs like ffmpeg are not usually installed in the language package manager.
I'm obviously calling you from the command line.
simplechan/blobHandler.py at master blobmon/simplechan
Ubuntu has apt, so
sudo apt install ffmpeg
I'm afraid you'll be able to get in.
I will add it because it was resolved by the comments.
After all, you didn't specify a password, so you had to set the localhost to trust.
Now that the cause is clear, I will specify the procedure without relying on the link instead of using the fluffy expression "trust settings".
Open /etc/postgresql-9.6/pg_hba.conf
.
Replace the PostgreSQL version with your own.
You must change the METHOD
to trust
in the line where the ADDRESS
is 127.0.0.1/32
.
This eliminates the need for passwords for local connections.
This value is trust
by default in Gentoo and so on, but it seems to be md5
in Debian series.
581 PHP ssh2_scp_send fails to send files as intended
611 GDB gets version error when attempting to debug with the Presense SDK (IDE)
618 Uncaught (inpromise) Error on Electron: An object could not be cloned
578 Understanding How to Configure Google API Key
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.