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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

https socket not working with letsencrypt #215

Closed
6 tasks done
lorvent opened this issue May 15, 2016 · 29 comments
Closed
6 tasks done

https socket not working with letsencrypt #215

lorvent opened this issue May 15, 2016 · 29 comments

Comments

@lorvent
Copy link

lorvent commented May 15, 2016

Sorry for another thread 馃槩

Before submitting your issue, please make sure that you've checked all of the checkboxes below.

  • You're running the latest release version of Deployer.
  • Ensure that you're running at least PHP 5.5.9, you can check this by running php -v
  • You've ran composer install --no-dev from the root of your installation.
  • You've ran npm install --production from the root of your installation.
  • You've ran rm -rf bootstrap/cache/* from the root of your installation.
  • You have restarted the queue listener and node socket server.

To help us better understand your issue, please answer the following.

Expected behaviour

I have issued ssl certificates using letsencrypt and passed cert values into .env

node socket should run properly

Actual behaviour

It shows me error that its not running
x

Steps to reproduce

  • install letsencrypt and issue ssl
  • enter certificate info into .env
  • modify node url to https://...

Environment info

Operating System: ubuntu 14.04
PHP Version: 7.0.6
Node Version: 4.4.4
Database System: mysql
Database Version: 5.6.30

Logs (see storage/logs/) or other output that would be helpful

(If logs are large, please upload as attachment).

@lorvent
Copy link
Author

lorvent commented May 15, 2016

Now, i am able to solve this problem by restarting server but now i have one strange problem.

for a project, before restarting server....one deployment was always in "pending" status

then i cancelled that deployment

then i ran deployments on another project and it worked properly

but if i run deployment on first project now...again it is in pending mode only

@REBELinBLUE
Copy link
Owner

hmm, can you try running php artisan deployer:cleanup ?

@lorvent
Copy link
Author

lorvent commented May 16, 2016

Thanks for that command,

it cancelled pending deployments...however for same project, if i start a new deployment manually....again its in pending mode only 馃槩

@REBELinBLUE
Copy link
Owner

hmm, that is really odd. Is there any thing in the log? Was the project working previously? Can the repository URL be reached?

@lorvent
Copy link
Author

lorvent commented May 16, 2016

Project working properly before
now it says Problem with repository

but ssh key added to repo and was working fine before

x

@lorvent
Copy link
Author

lorvent commented May 18, 2016

further testing reveals that repos hosted at github,bitbucket working fine but hosted my own gitlab instance are failing.

eventhough i have added ssh key properly, it still shows error

[RuntimeException]
  Could not mirror repository - Cloning into bare repository '/var/www/html/deploy/storage/app/mi
  rrors/git_git.lorvent.com_lorvent_lcrm.git'...
  Permission denied (publickey,password).
  fatal: Could not read from remote repository.
  Please make sure you have the correct access rights
  and the repository exists.

so no clue...how to fix it :'(

@REBELinBLUE
Copy link
Owner

REBELinBLUE commented May 18, 2016

Hmm, that is odd, gitlab is what Deployer has been used with for the last year at my (now previous) employer. Have a look on your gitlab server, is the key in /home/git/.ssh/authorized_keys ?

@lorvent
Copy link
Author

lorvent commented May 19, 2016

No they are not there

but i added them to deploy keys section of repo....not into authorized_keys

@knvpk
Copy link
Contributor

knvpk commented May 19, 2016

Hi @lorvent , im also using gitlab repositories in the deployer and running with out any problem. here are some checks to solve the problem you had.

  1. it is clear that repository permissions, please check
    key in the deployer keys of that gitlab repo is same as the project you created in the deployer ssh key and server authorized keys .

  2. please make sure the gitlab running and accessible git via 22 port . if you have changed the gitlab git port you want to mention that in the url like
    ssh://git@sample.com:2222/url/repo.git , of course mine is running on the port 2222.

@lorvent
Copy link
Author

lorvent commented May 19, 2016

Hi Pavan, thanks for stepping in ( or shall i say dhanya vadhaalu ;) )

  1. i am not clear what you mean, can you please elaborate
  2. i am using 22 only, i checked it now.

@REBELinBLUE
Copy link
Owner

No I know you didn't edit that file, but when you add a key in gitlab it is supposed to update it.

Try running the command to rebuild it http://docs.gitlab.com/ee/raketasks/maintenance.html

@lorvent
Copy link
Author

lorvent commented May 19, 2016

Actually i don't have authorized_keys file at that location

@REBELinBLUE
Copy link
Owner

Replace /home/git with the home directory of whatever user you have gitlab running as 馃槈

@lorvent
Copy link
Author

lorvent commented May 19, 2016

lol.... i am on that folder only

i copied ssh key manually into authorized_keys still no luck 馃槶

@REBELinBLUE
Copy link
Owner

Uh I wouldn't edit the file manually. Did you try the command to regenerate it?

Can you add the log from the gitlab-shell folder (not gitlab). I have only ever installed from source, never used the package so not sure where it would be off hand

@lorvent
Copy link
Author

lorvent commented May 19, 2016

i have tried command but it didn't add anything so added them manually still no luck.

and how to check gitlab-shell log?

gitlab-shell was there is old versions and in omnibus i don't think its available

@lorvent
Copy link
Author

lorvent commented May 19, 2016

looks like, i need to install gitlab-shell manually so installed it now.still no luck.

@REBELinBLUE
Copy link
Owner

Uh I wouldn't just randomly install extra things if they aren't needed ;) I will have to set up gitlab on a VM later as I no longer have access to a server

@REBELinBLUE
Copy link
Owner

According to http://docs.gitlab.com/ce/logs/logs.html the log should be in /var/log/gitlab/gitlab-shell/

@lorvent
Copy link
Author

lorvent commented May 19, 2016

as i have no other option and its from gitlab, i installed...

my log is like

I, [2016-05-19T01:37:28.288402 #24672]  INFO -- : POST http://127.0.0.1:8080/api/v3/internal/allowed 0.03507
I, [2016-05-19T01:37:28.288652 #24672]  INFO -- : gitlab-shell: executing git command <git-receive-pack /var/opt/gitlab/git-data/repositories/company/repo.git> for user with key key-8.
I, [2016-05-19T01:37:29.021475 #24678]  INFO -- : POST http://127.0.0.1:8080/api/v3/internal/allowed 0.04968
I, [2016-05-19T01:37:29.363963 #24684]  INFO -- : GET http://127.0.0.1:8080/api/v3/internal/broadcast_message 0.02461
I, [2016-05-19T01:57:47.954949 #26200]  INFO -- : Removing key key-12
I, [2016-05-19T01:58:05.428949 #26239]  INFO -- : Adding key key-17 => "ssh-rsa ..."
I, [2016-05-19T03:00:41.950444 #30504]  INFO -- : Adding key key-1 => "ssh-rsa ..."
I, [2016-05-19T03:00:41.950666 #30504]  INFO -- : Adding key key-2 => "ssh-rsa ..."
I, [2016-05-19T03:00:41.950780 #30504]  INFO -- : Adding key key-3 => "ssh-rsa ..."
I, [2016-05-19T03:00:41.950885 #30504]  INFO -- : Adding key key-4 => "ssh-rsa ..."
I, [2016-05-19T03:00:41.950990 #30504]  INFO -- : Adding key key-5 => "ssh-rsa ..."
I, [2016-05-19T03:00:41.951093 #30504]  INFO -- : Adding key key-6 => "ssh-rsa ..."
I, [2016-05-19T03:00:41.951195 #30504]  INFO -- : Adding key key-8 => "ssh-rsa ..."
I, [2016-05-19T03:00:41.951305 #30504]  INFO -- : Adding key key-10 => "ssh-rsa ..."
I, [2016-05-19T03:00:41.951531 #30504]  INFO -- : Adding key key-13 => "ssh-rsa ..."
I, [2016-05-19T03:00:41.951655 #30504]  INFO -- : Adding key key-16 => "ssh-rsa ..."
I, [2016-05-19T03:00:41.951771 #30504]  INFO -- : Adding key key-17 => "ssh-rsa ..."
I, [2016-05-19T03:03:43.912507 #30708]  INFO -- : Adding key key-1 => "ssh-rsa ..."
I, [2016-05-19T03:03:43.912690 #30708]  INFO -- : Adding key key-2 => "ssh-rsa ..."
I, [2016-05-19T03:03:43.912814 #30708]  INFO -- : Adding key key-3 => "ssh-rsa ..."
I, [2016-05-19T03:03:43.912899 #30708]  INFO -- : Adding key key-4 => "ssh-rsa ..."
I, [2016-05-19T03:03:43.912966 #30708]  INFO -- : Adding key key-5 => "ssh-rsa ..."
I, [2016-05-19T03:03:43.913059 #30708]  INFO -- : Adding key key-6 => "ssh-rsa ..."
I, [2016-05-19T03:03:43.913120 #30708]  INFO -- : Adding key key-8 => "ssh-rsa ..."
I, [2016-05-19T03:03:43.913200 #30708]  INFO -- : Adding key key-10 => "ssh-rsa ..."
I, [2016-05-19T03:03:43.913294 #30708]  INFO -- : Adding key key-13 => "ssh-rsa ..."
I, [2016-05-19T03:03:43.913364 #30708]  INFO -- : Adding key key-16 => "ssh-rsa ..."
I, [2016-05-19T03:03:43.913447 #30708]  INFO -- : Adding key key-17 => "ssh-rsa ..."
I, [2016-05-19T03:26:04.432035 #32468]  INFO -- : Adding key key-1 => "ssh-rsa ..."
I, [2016-05-19T03:26:04.432209 #32468]  INFO -- : Adding key key-2 => "ssh-rsa ..."
I, [2016-05-19T03:26:04.432293 #32468]  INFO -- : Adding key key-3 => "ssh-rsa ..."
I, [2016-05-19T03:26:04.432355 #32468]  INFO -- : Adding key key-4 => "ssh-rsa ..."
I, [2016-05-19T03:26:04.432421 #32468]  INFO -- : Adding key key-5 => "ssh-rsa ..."
I, [2016-05-19T03:26:04.432482 #32468]  INFO -- : Adding key key-6 => "ssh-rsa ..."
I, [2016-05-19T03:26:04.432537 #32468]  INFO -- : Adding key key-8 => "ssh-rsa ..."
I, [2016-05-19T03:26:04.432593 #32468]  INFO -- : Adding key key-10 => "ssh-rsa ..."
I, [2016-05-19T03:26:04.432689 #32468]  INFO -- : Adding key key-13 => "ssh-rsa ..."
I, [2016-05-19T03:26:04.432751 #32468]  INFO -- : Adding key key-16 => "ssh-rsa ..."
I, [2016-05-19T03:26:04.432828 #32468]  INFO -- : Adding key key-17 => "ssh-rsa ..."
I, [2016-05-19T03:26:36.269924 #32515]  INFO -- : Adding key key-1 => "ssh-rsa ..."
I, [2016-05-19T03:26:36.270089 #32515]  INFO -- : Adding key key-2 => "ssh-rsa ..."
I, [2016-05-19T03:26:36.270158 #32515]  INFO -- : Adding key key-3 => "ssh-rsa ..."
I, [2016-05-19T03:26:36.270219 #32515]  INFO -- : Adding key key-4 => "ssh-rsa ..."
I, [2016-05-19T03:26:36.270278 #32515]  INFO -- : Adding key key-5 => "ssh-rsa ..."
I, [2016-05-19T03:26:36.270336 #32515]  INFO -- : Adding key key-6 => "ssh-rsa ..."
I, [2016-05-19T03:26:36.270445 #32515]  INFO -- : Adding key key-8 => "ssh-rsa ..."
I, [2016-05-19T03:26:36.270507 #32515]  INFO -- : Adding key key-10 => "ssh-rsa ..."
I, [2016-05-19T03:26:36.270584 #32515]  INFO -- : Adding key key-13 => "ssh-rsa ..."
I, [2016-05-19T03:26:36.270663 #32515]  INFO -- : Adding key key-16 => "ssh-rsa ..."
I, [2016-05-19T03:26:36.270735 #32515]  INFO -- : Adding key key-17 => "ssh-rsa ..."
I, [2016-05-19T03:54:12.495822 #2395]  INFO -- : Adding key key-1 => "ssh-rsa ..."
I, [2016-05-19T03:54:12.495995 #2395]  INFO -- : Adding key key-2 => "ssh-rsa ..."
I, [2016-05-19T03:54:12.496071 #2395]  INFO -- : Adding key key-3 => "ssh-rsa ..."
I, [2016-05-19T03:54:12.496137 #2395]  INFO -- : Adding key key-4 => "ssh-rsa ..."
I, [2016-05-19T03:54:12.496198 #2395]  INFO -- : Adding key key-5 => "ssh-rsa ..."
I, [2016-05-19T03:54:12.496269 #2395]  INFO -- : Adding key key-6 => "ssh-rsa ..."
I, [2016-05-19T03:54:12.496344 #2395]  INFO -- : Adding key key-8 => "ssh-rsa ..."
I, [2016-05-19T03:54:12.496452 #2395]  INFO -- : Adding key key-10 => "ssh-rsa ..."
I, [2016-05-19T03:54:12.496570 #2395]  INFO -- : Adding key key-13 => "ssh-rsa ..."
I, [2016-05-19T03:54:12.496647 #2395]  INFO -- : Adding key key-16 => "ssh-rsa ..."
I, [2016-05-19T03:54:12.496710 #2395]  INFO -- : Adding key key-17 => "ssh-rsa ..."
I, [2016-05-19T04:15:35.812069 #14618]  INFO -- : Adding key key-1 => "ssh-rsa ..."
I, [2016-05-19T04:15:35.812295 #14618]  INFO -- : Adding key key-2 => "ssh-rsa ..."
I, [2016-05-19T04:15:35.812369 #14618]  INFO -- : Adding key key-3 => "ssh-rsa ..."
I, [2016-05-19T04:15:35.812433 #14618]  INFO -- : Adding key key-4 => "ssh-rsa ..."
I, [2016-05-19T04:15:35.812581 #14618]  INFO -- : Adding key key-5 => "ssh-rsa ..."
I, [2016-05-19T04:15:35.812662 #14618]  INFO -- : Adding key key-6 => "ssh-rsa ..."
I, [2016-05-19T04:15:35.812733 #14618]  INFO -- : Adding key key-8 => "ssh-rsa ..."
I, [2016-05-19T04:15:35.812919 #14618]  INFO -- : Adding key key-10 => "ssh-rsa ..."
I, [2016-05-19T04:15:35.812979 #14618]  INFO -- : Adding key key-13 => "ssh-rsa ..."
I, [2016-05-19T04:15:35.813057 #14618]  INFO -- : Adding key key-16 => "ssh-rsa ..."
I, [2016-05-19T04:15:35.813115 #14618]  INFO -- : Adding key key-17 => "ssh-rsa ..."
I, [2016-05-19T04:19:31.976958 #14930]  INFO -- : Adding key key-1 => "ssh-rsa ..."
I, [2016-05-19T04:19:31.977109 #14930]  INFO -- : Adding key key-2 => "ssh-rsa ..."
I, [2016-05-19T04:19:31.977191 #14930]  INFO -- : Adding key key-3 => "ssh-rsa ..."
I, [2016-05-19T04:19:31.977253 #14930]  INFO -- : Adding key key-4 => "ssh-rsa ..."
I, [2016-05-19T04:19:31.977309 #14930]  INFO -- : Adding key key-5 => "ssh-rsa ..."
I, [2016-05-19T04:19:31.977393 #14930]  INFO -- : Adding key key-6 => "ssh-rsa ..."
I, [2016-05-19T04:19:31.977457 #14930]  INFO -- : Adding key key-8 => "ssh-rsa ..."
I, [2016-05-19T04:19:31.977523 #14930]  INFO -- : Adding key key-10 => "ssh-rsa ..."
I, [2016-05-19T04:19:31.977599 #14930]  INFO -- : Adding key key-13 => "ssh-rsa ..."
I, [2016-05-19T04:19:31.977664 #14930]  INFO -- : Adding key key-16 => "ssh-rsa ..."
I, [2016-05-19T04:19:31.977722 #14930]  INFO -- : Adding key key-17 => "ssh-rsa ..."
I, [2016-05-19T09:33:32.562118 #6133]  INFO -- : POST http://127.0.0.1:8080/api/v3/internal/allowed 2.84134
I, [2016-05-19T09:33:32.562327 #6133]  INFO -- : gitlab-shell: executing git command <git-receive-pack /var/opt/gitlab/git-data/repositories/company/repo.git> for user with key key-5.
I, [2016-05-19T09:33:33.260970 #6143]  INFO -- : POST http://127.0.0.1:8080/api/v3/internal/allowed 0.03497
I, [2016-05-19T09:33:36.281218 #6148]  INFO -- : GET http://127.0.0.1:8080/api/v3/internal/broadcast_message 2.75847

@lorvent
Copy link
Author

lorvent commented May 20, 2016

Hi,

after lot of experiments, i found what the issue is.

if i swap beanstalkd with redis in .env for QUEUE_DRIVER then its working fine.

its not related to ssh keys at all.

but i have beanstalkd running...

@REBELinBLUE
Copy link
Owner

Hmm, that makes no sense 馃 Have you tried restarting beanstalkd?

@lorvent
Copy link
Author

lorvent commented May 20, 2016

For sake of testing, just now i tried

killed beanstalkd process
started service again

made a deployment.....its just in 'pending' mode

then hit 'php artisan deployer:cleanup'

now deployment cancelled and shows message `There was an error retrieving the repository information, please check that the URL is correct and that the SSH key has been added

went back to redis and tried deployment...its working again properly on same repo.

but i have only one complaint with redis (may be some other reason aswell)

I have a repo where i want to have 2 seperate projects for 2 branches

when i am deploying on second branch, its always failing at npm,gulp section(custom commands of migration)

so i am not sure whether related to redis or using same repo for 2 projects causing the problem (with local repos cloning feature).
`

@REBELinBLUE
Copy link
Owner

2 projects with different branches shouldn't matter, the local clone is the whole repo using the git mirror feature.

So are you having that problem with redis as well? When you use beanstalk do you get anything in php artisan queue:failed ?

@lorvent
Copy link
Author

lorvent commented May 21, 2016

Hello,

this is what it shows

+---------+------------+---------------+-----------------------------------------+---------------------+
| ID      | Connection | Queue         | Class                                   | Failed At           |
+---------+------------+---------------+-----------------------------------------+---------------------+
| 3477615 | redis      | deployer-low  | mailer@handleQueuedMessage              | 2016-05-19 23:08:56 |
| 3477614 | redis      | deployer-low  | mailer@handleQueuedMessage              | 2016-05-19 23:08:56 |
| 3477613 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-19 10:36:31 |
| 3477612 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-19 09:33:34 |
| 3477611 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-19 08:52:12 |
| 3477610 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-19 08:08:17 |
| 3477609 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-19 07:09:36 |
| 3477608 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-19 06:47:02 |
| 3477607 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-19 04:13:20 |
| 3477606 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-19 03:55:41 |
| 3477605 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-19 03:28:34 |
| 3477604 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-19 03:25:19 |
| 3477603 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-19 03:01:21 |
| 3477602 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-19 01:43:26 |
| 3477601 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-19 01:42:23 |
| 3477600 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-19 01:37:31 |
| 3477599 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-19 00:45:36 |
| 3477598 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-18 10:29:21 |
| 3477597 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-18 10:25:53 |
| 3477596 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-18 10:22:27 |
| 3477595 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-18 10:07:51 |
| 3477594 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-18 09:56:13 |
| 3477593 | beanstalkd | deployer-high | REBELinBLUE\Deployer\Jobs\DeployProject | 2016-05-18 09:49:58 |
+---------+------------+---------------+-----------------------------------------+---------------------+

@REBELinBLUE
Copy link
Owner

I am assuming those DeployProject jobs match up with the ones which failed?

@lorvent
Copy link
Author

lorvent commented May 21, 2016

yeah!

@lorvent lorvent closed this as completed May 27, 2016
@REBELinBLUE
Copy link
Owner

Just seen you've closed this issue, did you solve the problem then?

@lorvent
Copy link
Author

lorvent commented May 27, 2016

as i mentioned before, shifting from beanstalk to redis solved the problem,
i wanted to use beanstalk as before but i guess you are busy these days and me too want it to work as it is , i don't want to play with server much...so win-win 馃槣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants