[GH-ISSUE #1080] Bad request (HTTP 400) #902

Closed
opened 2026-02-27 11:14:10 +03:00 by kerem · 20 comments
Owner

Originally created by @PeterBocan on GitHub (Mar 17, 2017).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1080

Impacted versions

Latest (using Installer)

  • Modoboa: latest
  • installer used: Yes
  • Webserver: Nginx

Steps to reproduce

Installed Modoboa using installer. I ran ./run.py mail.pbocan.net which was bad (it has prepended the mail part again) so I had to fix some duplicates in NGINX configuration (already had SSL set up) after that, I had to fix the names of the subdomain and so on.

I know a thing that may be breaking the code: /tmp is not mounted (at all) with /noexec flag. (I am running on VPS)

Current behavior

Reaching the frontend of the mail administration responds with HTTP 400 (Bad request)

Expected behavior

Display the login screen

Video/Screenshot link (optional)

screenshot 2017-03-17 14 10 34
Originally created by @PeterBocan on GitHub (Mar 17, 2017). Original GitHub issue: https://github.com/modoboa/modoboa/issues/1080 # Impacted versions Latest (using Installer) * Modoboa: latest * installer used: Yes * Webserver: Nginx # Steps to reproduce Installed Modoboa using installer. I ran ```./run.py mail.pbocan.net``` which was bad (it has prepended the mail part again) so I had to fix some duplicates in NGINX configuration (already had SSL set up) after that, I had to fix the names of the subdomain and so on. I know a thing that may be breaking the code: /tmp is not mounted (at all) with /noexec flag. (I am running on VPS) # Current behavior Reaching the frontend of the mail administration responds with HTTP 400 (Bad request) # Expected behavior Display the login screen # Video/Screenshot link (optional) <img width="318" alt="screenshot 2017-03-17 14 10 34" src="https://cloud.githubusercontent.com/assets/2006860/24044429/8bc71808-0b1b-11e7-8811-79d400b75ebc.png">
kerem 2026-02-27 11:14:10 +03:00
Author
Owner

@PeterBocan commented on GitHub (Mar 17, 2017):

Can I/Should I rerun the installer?

<!-- gh-comment-id:287357488 --> @PeterBocan commented on GitHub (Mar 17, 2017): Can I/Should I rerun the installer?
Author
Owner

@tonioo commented on GitHub (Mar 17, 2017):

@PeterBocan When did you run the installer?

<!-- gh-comment-id:287372253 --> @tonioo commented on GitHub (Mar 17, 2017): @PeterBocan When did you run the installer?
Author
Owner

@PeterBocan commented on GitHub (Mar 17, 2017):

today.

<!-- gh-comment-id:287372564 --> @PeterBocan commented on GitHub (Mar 17, 2017): today.
Author
Owner

@tonioo commented on GitHub (Mar 17, 2017):

Ok, so now the right way to run the installer is:

sudo ./run.py pbocan.net

Please try to run the installer once again.

<!-- gh-comment-id:287373116 --> @tonioo commented on GitHub (Mar 17, 2017): Ok, so now the right way to run the installer is: ```shell sudo ./run.py pbocan.net ``` Please try to run the installer once again.
Author
Owner

@PeterBocan commented on GitHub (Mar 17, 2017):

Do I have to edit the installer.cfg first? It seems like I should set at least the usernames and passwords right?

<!-- gh-comment-id:287373827 --> @PeterBocan commented on GitHub (Mar 17, 2017): Do I have to edit the installer.cfg first? It seems like I should set at least the usernames and passwords right?
Author
Owner

@tonioo commented on GitHub (Mar 17, 2017):

yes, add default values are 'password'.

<!-- gh-comment-id:287374074 --> @tonioo commented on GitHub (Mar 17, 2017): yes, add default values are 'password'.
Author
Owner

@PeterBocan commented on GitHub (Mar 17, 2017):

Okay, now I get Internal Server Error. Do I need to create mysql user manually? And/or what should I check?

It did not generate the let's encrypt certificate. Have to check it manually: It could not paste ACME challenge into the root of the website.

<!-- gh-comment-id:287383034 --> @PeterBocan commented on GitHub (Mar 17, 2017): Okay, now I get Internal Server Error. Do I need to create mysql user manually? And/or what should I check? It did not generate the let's encrypt certificate. Have to check it manually: It could not paste ACME challenge into the root of the website.
Author
Owner

@tonioo commented on GitHub (Mar 17, 2017):

No, it should be created by the installer. Can you set DEBUG to True inside /srv/modoboa/instance/instance/settings.py, reload uwsgi and retry please?

<!-- gh-comment-id:287398310 --> @tonioo commented on GitHub (Mar 17, 2017): No, it should be created by the installer. Can you set DEBUG to True inside /srv/modoboa/instance/instance/settings.py, reload uwsgi and retry please?
Author
Owner

@PeterBocan commented on GitHub (Mar 17, 2017):

now I can't even load webpage. ERR_CONNECTION_RESET or ERR_CONNECTION_CLOSED. Dammit.

EDIT: My bad, I have commented out nonexistent paths to certificates.

<!-- gh-comment-id:287409958 --> @PeterBocan commented on GitHub (Mar 17, 2017): now I can't even load webpage. ERR_CONNECTION_RESET or ERR_CONNECTION_CLOSED. Dammit. EDIT: My bad, I have commented out nonexistent paths to certificates.
Author
Owner

@tonioo commented on GitHub (Mar 21, 2017):

@PeterBocan Is your problem fixed now?

<!-- gh-comment-id:288008656 --> @tonioo commented on GitHub (Mar 21, 2017): @PeterBocan Is your problem fixed now?
Author
Owner

@PeterBocan commented on GitHub (Mar 21, 2017):

No, I haven't solved it yet. I may install the certificate as a root at first time and then I hope it will renew the certificate by itself.

<!-- gh-comment-id:288050591 --> @PeterBocan commented on GitHub (Mar 21, 2017): No, I haven't solved it yet. I may install the certificate as a root at first time and then I hope it will renew the certificate by itself.
Author
Owner

@flyncos commented on GitHub (Apr 1, 2017):

I have the same problem, I did no changes to the installer settings and I just ran ./run.py mysite.com, I get a ERR_CONNECTION_CLOSED and log files are empty with debug enabled.

<!-- gh-comment-id:290949881 --> @flyncos commented on GitHub (Apr 1, 2017): I have the same problem, I did no changes to the installer settings and I just ran `./run.py mysite.com`, I get a ERR_CONNECTION_CLOSED and log files are empty with debug enabled.
Author
Owner

@PeterBocan commented on GitHub (Apr 1, 2017):

You most likely don't have SSL certs.

<!-- gh-comment-id:290949952 --> @PeterBocan commented on GitHub (Apr 1, 2017): You most likely don't have SSL certs.
Author
Owner

@flyncos commented on GitHub (Apr 1, 2017):

@PeterBocan No, the certs are there and ok

<!-- gh-comment-id:290950378 --> @flyncos commented on GitHub (Apr 1, 2017): @PeterBocan No, the certs are there and ok
Author
Owner

@flyncos commented on GitHub (Apr 2, 2017):

Fixed by me, I had wrong permissions on the uwsgi socket and forgot to add the reverse entry in the /etc/hosts file
121.21.xx.xx mail.pbocan.net

<!-- gh-comment-id:290962427 --> @flyncos commented on GitHub (Apr 2, 2017): Fixed by me, I had wrong permissions on the uwsgi socket and forgot to add the reverse entry in the /etc/hosts file `121.21.xx.xx mail.pbocan.net`
Author
Owner

@lazynooblet commented on GitHub (Apr 15, 2017):

FYI this also occurs if you mispell the hostname during "deploy" command

<!-- gh-comment-id:294280992 --> @lazynooblet commented on GitHub (Apr 15, 2017): FYI this also occurs if you mispell the hostname during "deploy" command
Author
Owner

@tonioo commented on GitHub (Jun 1, 2017):

@PeterBocan Any news about this? Looks like this issue is more related to the installer than to modoboa.

<!-- gh-comment-id:305541154 --> @tonioo commented on GitHub (Jun 1, 2017): @PeterBocan Any news about this? Looks like this issue is more related to the installer than to modoboa.
Author
Owner

@PeterBocan commented on GitHub (Jun 1, 2017):

Havent had time to look at that yet.

<!-- gh-comment-id:305583926 --> @PeterBocan commented on GitHub (Jun 1, 2017): Havent had time to look at that yet.
Author
Owner

@mylastore commented on GitHub (Sep 5, 2017):

I had the same problem Bad request (HTTP 400) wen't to sleep and the next day everything was install correctly seems the it takes time for the domain propagation to take place. I could not fine any documentation on how to set your domain DNS settings or there is no need to have any custom DNS records.

<!-- gh-comment-id:327242125 --> @mylastore commented on GitHub (Sep 5, 2017): I had the same problem Bad request (HTTP 400) wen't to sleep and the next day everything was install correctly seems the it takes time for the domain propagation to take place. I could not fine any documentation on how to set your domain DNS settings or there is no need to have any custom DNS records.
Author
Owner

@PeterBocan commented on GitHub (Sep 5, 2017):

@mylastore I went for AWS WebMail and they said on their site, that it will take 3 days to propagate change DNS globally, which turned up to be true actually.

<!-- gh-comment-id:327255728 --> @PeterBocan commented on GitHub (Sep 5, 2017): @mylastore I went for AWS WebMail and they said on their site, that it will take 3 days to propagate change DNS globally, which turned up to be true actually.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#902
No description provided.