postal icon indicating copy to clipboard operation
postal copied to clipboard

Postal installation Error

Open sahilsunesara opened this issue 9 years ago • 12 comments

Hello i am trying to install postal with the help of Quick Install Guide in fresh Ubuntu but i am not able to install and showing problem

Error : Generating a 4096 bit RSA private key ..........................................................................................................................................++ .........................++ writing new private key to '/etc/nginx/ssl/postal.key'

Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. root@vps130988:~#

Could you please help me in this matter

Thank you

sahilsunesara avatar Sep 23 '17 15:09 sahilsunesara

Have you looked at systemctl status nginx.service as the error instructs?

iammattmartin avatar Sep 23 '17 19:09 iammattmartin

As per https://github.com/atech/postal/issues/98#issuecomment-330030303 there is a small typo in the default nginx configuration in the build installed by default. You will need to edit /etc/nginx/sites-enabled/default and replace .crt with .cert

willpower232 avatar Sep 23 '17 19:09 willpower232

@willpower232 sorry i didn't get you.. could you please explain me..

sahilsunesara avatar Sep 24 '17 05:09 sahilsunesara

I reinstalled recently and had this issue. To resolve it I had to do this:

You will need to edit /etc/nginx/sites-enabled/default and replace .crt with .cert

willpower232 avatar Sep 24 '17 09:09 willpower232

do i need to run this command /etc/nginx/sites-enabled/default or i just need to edit via SFTP ?

sahilsunesara avatar Sep 24 '17 09:09 sahilsunesara

Edit via SFTP or any terminal text editor

willpower232 avatar Sep 24 '17 09:09 willpower232

i did not not working

do i need to do this rit

server { listen [::]:80; listen 0.0.0.0:80; server_name postal.yourdomain.com; return 301 https://$host$request_uri; }

server { listen [::]:443 ssl; listen 0.0.0.0:443 ssl; root /opt/postal/app/public; server_name postal.yourdomain.com; ssl_certificate ssl/postal.cert; ssl_certificate_key ssl/postal.key;

# Generate using: openssl dhparam 4096 -out /etc/ssl/dhparam.pem
# ssl_dhparam /etc/ssl/dhparam.pem;

ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
ssl_prefer_server_ciphers on;
ssl_ciphers EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA512:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:ECDH+AESGCM:ECDH+AES256:DH+AESGCM:DH+AES256:RSA+AESGCM:!aNULL:!eNULL:!LOW:!RC4:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS;

location / {
   client_max_body_size 50M;
   try_files $uri $uri/index.html $uri.html @puma;
}

location /assets {
   add_header Cache-Control max-age=3600;
}

location @puma {
    proxy_set_header X-Real-IP  $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto https;
    proxy_pass http://127.0.0.1:5000;
}

}

sahilsunesara avatar Sep 24 '17 09:09 sahilsunesara

Please clarify what you mean when you say not working.

willpower232 avatar Sep 25 '17 08:09 willpower232

Since this commit, which normalizes certificate extensions to '.cert', I guess everything the project need to fix is this installation step to produce 'postal.cert' as 'openssl' output.

rcmorano avatar Oct 11 '17 15:10 rcmorano

Qucik install attempt by using this as per instructions curl https://raw.githubusercontent.com/atech/postal/master/script/install/ubuntu1604.sh | sh leads to error. https://gyazo.com/624b99e1ef92eb0e027c4da7cdeb7043

Successfully installed procodile-1.0.17 2 gems installed Creating vhost "/postal" Creating user "postal" Setting permissions for user "postal" in vhost "/postal" --2017-10-16 10:41:28-- https://postal.atech.media/packages/stable/latest.tgz Resolving postal.atech.media (postal.atech.media)... 2a00:67a0:a:1::1b, 185.22.208.54 Connecting to postal.atech.media (postal.atech.media)|2a00:67a0:a:1::1b|:443... connected. ERROR: cannot verify postal.atech.media's certificate, issued by ‘CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US’: Issued certificate has expired. To connect to postal.atech.media insecurely, use `--no-check-certificate'.

gzip: stdin: unexpected end of file tar: Child returned status 1 tar: Error is not recoverable: exiting now

vikasastrologer avatar Oct 16 '17 17:10 vikasastrologer

Please advice what should someone new should do?

vikasastrologer avatar Oct 16 '17 17:10 vikasastrologer

@rcmorano atech may need to recreate the build to include all the changes, this was mentioned elsewhere I think

@gauta1 this should be resolved now as per https://github.com/atech/postal/issues/380

willpower232 avatar Oct 21 '17 11:10 willpower232