-
Notifications
You must be signed in to change notification settings - Fork 754
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
Could not create paste: Error saving paste. Sorry. #1122
Comments
If this is by any chance a fresh Docker installation, see here (scroll down to "Fix Permissions") » https://ppfeufer.de/privatebin-your-self-hosted-pastebin-instance/ |
It is not a Docker container installation, it is running inside a virtual machine, on the guest OS of the virtual machine itself. |
Does the application have any logs I can check? I am having a hard time debugging even with strace. |
Still, check the file permissions and the Nginx logs. |
Happens intermittently to me too
JSON in the request is
which looks valid? Could it be php-json not being installed? That doesn't explain why sometimes it goes through and sometimes it returns that. |
@fitzg2 what logs are you checking? |
@zamunda68 Nginx error logs clearly |
Lads, I found it - it was the SELinux. As soon as I set it to "permissive", the issue was resolved. The command I used to set it to permissive:
I will adjust its configuration. Thank you for your help! |
Just FYI: SeLinux is a security feature. By disabling it you are disabling a security feature of your OS. This guide in our wiki may help and have some setup tips: https://github.com/PrivateBin/PrivateBin/wiki/Installation-on-Red-Hat-with-SELinux |
This happens to me without SELinux. Same error still going on
|
@fitzg2 The JSON encoding error means that the message sent by the client to the server got mangled before it could reach the PHP logic. We try and document all the factors that commonly contribute to this in: Beyond those settings in the web- and php service, it can also occur if you use some kind of caching or loadbalancing service in front of your PrivateBin instance. You will have to carefully review your setup of each component in the stack to eliminate each possibility. |
It has nothing to do with size as the request is very small.
|
@fitzg2 If you've already caught an example JSON, you can use it to debug what in your stack is mangling it. You can use curl or a similar tool to repeatedly send the message to your instance and check on each layer of your stack what might cause the message to get modified:
You can also verify what PHP actually receives by adding a |
Steps to reproduce
What happens
Could not create paste: Error saving paste. Sorry.
What should happen
There should be a link generated to the paste
Additional information
Basic information
Server OS: Rocky Linux 9.2
Webserver: NGINX 1.20.1
Browser: Chrome 114
PrivateBin version: 1.5.2
I can reproduce this issue on https://privatebin.net: Yes / No
No
The text was updated successfully, but these errors were encountered: