Re: [go-cd] Bug: New authorization plugins never actually let me log in

2017-07-05 Thread Chris Northwood
Hi Aravind,

It's the Vagrant box in this repo:
https://github.com/cnorthwood/gocd-tls-auth

You should just be able to vagrant up, and then hit http://localhost:8153
which is mapped through to the VM. I used the old gocd-demo Vagrantfile for
the config, but on top of Ubuntu Xenial to get Java 8 (there's some
additional stuff in there to get an Apache doing TLS client certificate
auth to support the dev of my plugin, but using port 8153 should bypass all
that).

Chris

On 5 July 2017 at 22:37, Chris Northwood  wrote:

> Hi Aravind,
>
> It's the Vagrant box in this repo: https://github.com/
> cnorthwood/gocd-tls-auth
>
> You should just be able to vagrant up, and then hit http://localhost:8153
> which is mapped through to the VM. I used the old gocd-demo Vagrantfile for
> the config, but on top of Ubuntu Xenial to get Java 8 (there's some
> additional stuff in there to get an Apache doing TLS client certificate
> auth to support the dev of my plugin, but using port 8153 should bypass all
> that).
>
> Chris
>
> On 5 July 2017 at 21:47, Aravind SV  wrote:
>
>> Hey Chris,
>>
>> On Wed, Jul 5, 2017 at 7:02 AM, Chris Northwood 
>> wrote:
>>
>>> I'm not running the server on localhost, but on a Vagrant box, and then
>>> using the port forwarding feature, I'm unsure if that'll matter?
>>>
>>
>> It's probably related to that, somehow. How can I reproduce this setup?
>> Can you provide more information? Is it a remote box that you're somehow
>> connecting to?
>>
>> Cheers,
>> Aravind
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "go-cd" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/go-cd/la2lmt7C07U/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> go-cd+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-cd] Bug: New authorization plugins never actually let me log in

2017-07-05 Thread Aravind SV
Hey Chris,

On Wed, Jul 5, 2017 at 7:02 AM, Chris Northwood 
wrote:

> I'm not running the server on localhost, but on a Vagrant box, and then
> using the port forwarding feature, I'm unsure if that'll matter?
>

It's probably related to that, somehow. How can I reproduce this setup? Can
you provide more information? Is it a remote box that you're somehow
connecting to?

Cheers,
Aravind

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-cd] Run on all agents skipping some agents and running twice on others.

2017-07-05 Thread Magnus Lyckå
We have a cleanup pipeline with a single stage with one job set to run on 
all agents.
It's triggered by a Cron Timer Specification, so there is no automatic 
pipeline scheduling.

With 11 agents, it will run 11 jobs, but it might run twice on some agents 
and never 
run on other agents! There is no obvious patterns in which agents are 
repeated or 
ignored. It varies between runs. Has anyone else come across this?

This seems to happen the whole time. It's as if it decides to run on 11 
agents, and then
just gives the jobs to the first eleven agents who ask for work, regardless 
of whether
they already ran this pipeline instance.

It can look like this. Note that jobs 1 and 2 runs on agent 004, jobs 3 and 
9 on 007, and jobs 6 and 8 runs on 005.

  defaultJob-runOnAll-1 Passed Completed build-go-agent004(x.x.x.70)
defaultJob-runOnAll-10 Passed Completed 5 minutes and 13 seconds 
build-go-agent014(x.x.x.88)
defaultJob-runOnAll-11 Passed Completed 3 minutes and 20 seconds 
build-go-agent013(x.x.x.86)
defaultJob-runOnAll-2 Passed Completed 11 seconds 
build-go-agent004(x.x.x.70)
defaultJob-runOnAll-3 Passed Completed build-go-agent007(x.x.x.79)
defaultJob-runOnAll-4 Passed Completed build-go-agent009(x.x.x.82)
defaultJob-runOnAll-5 Passed Completed 1 minute and 23 seconds 
build-go-agent001(x.x.x.76)
defaultJob-runOnAll-6 Passed Completed build-go-agent005(x.x.x.77)
defaultJob-runOnAll-7 Passed Completed 1 minute build-go-agent011(x.x.x.84)
defaultJob-runOnAll-8 Passed Completed 13 seconds 
build-go-agent005(x.x.x.77)
defaultJob-runOnAll-9 Passed Completed 11 seconds 
build-go-agent007(x.x.x.79)

I don't know why the column "duration" is sometimes empty, but that's 
common also
for pipelines that seem to work.

We have other pipelines with run on all agents enabled, and I've never seen 
this
problem on the others. (I didn't do an extensive search though.) One 
pipeline even 
has just the same config as I describe in the first paragraph. It just runs 
an hour
earlier, and has a different , but it still seems to work.

The problematic pipeline's config looks like this:


  
  0 0 22 ? * MON-FRI
  

  
  


  

  
-m

  

  

  



-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-cd] Bug: New authorization plugins never actually let me log in

2017-07-05 Thread Chris Northwood
Hi Ketan,

I was previously using this one: https://app.vagrantup.
com/gocd/boxes/gocd-demo which I originally got from https://www.gocd.org/
2015/08/05/Go-Sample-Virtualbox/ - however that box is an older version of
Ubuntu that can't run the latest GoCD due to the Java 8 dependency.

I should only be running a single instance:

ubuntu@ubuntu-xenial:~$ ps aux | grep go
go1323  0.0  0.1  47296  4656 ?Ss   10:54   0:00
/lib/systemd/systemd --user
go1327  0.0  0.0  63476  2124 ?S10:54   0:00 (sd-pam)
go1367 71.4 22.2 3735732 899732 ?  Sl   10:54   0:45 java
-server -Djava.security.egd=file:/dev/./urandom -Xms512m -Xmx1024m
-XX:MaxMetaspaceSize=256m -Duser.language=en
-Djruby.rack.request.size.threshold.bytes=3000
-Duser.country=US -Dcruise.config.dir=/etc/go
-Dcruise.config.file=/etc/go/cruise-config.xml
-Dcruise.server.port=8153 -Dcruise.server.ssl.port=8154 -jar /usr/share/go
-server/go.jar
go1371  4.0  2.4 3440364 99820 ?   Sl   10:54   0:02 java -jar
/usr/share/go-agent/agent-bootstrapper.jar -serverUrl
https://127.0.0.1:8154/go
go1803  187  4.3 2449576 177712 ?  Sl   10:55   0:01
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
-Dcruise.console.publish.interval=10
-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom
-Dagent.plugins.md5=d972231b5a553fbf14f0939342257a59
-Dagent.binary.md5=PubINBE6cd1wLkXj8BvEcQ==
-Dagent.launcher.md5=xt6jpMOq1AbvCqRWkaamCQ==
-Dagent.tfs.md5=64stwdXndt019D6QtoWa6Q==
-jar agent.jar -serverUrl https://127.0.0.1:8154/go -sslVerificationMode
NONE

Confusingly, this never happens on prod, just the stripped down Vagrant box
I'm using to try and create a minimal test case.

I'm not running the server on localhost, but on a Vagrant box, and then
using the port forwarding feature, I'm unsure if that'll matter?

I note this issue also exists on GitHub issues: https://github.com/
gocd/gocd/issues/3618 which suggests some environment issue to trigger this
bug that we haven't figured out. Using incognito mode doesn't work for me,
however...

On 5 July 2017 at 11:43, Ketan Padegaonkar 
wrote:

> If all you want to do is quickly get a production like server up and
> running with least amount of fuss, I've provided an example here along with
> the config and password file.
>
> https://github.com/gocd/gocd/issues/3618#issuecomment-311545904
>
>
> On Wed, Jul 5, 2017 at 4:11 PM Ketan Padegaonkar <
> ketanpadegaon...@gmail.com> wrote:
>
>> On Tue, Jul 4, 2017 at 7:17 PM Chris Northwood 
>> wrote:
>>
>>> Hi Aravind,
>>>
>>> I'm still having issues using the Vagrant box, and getting it set up
>>> with 17.7. When I try to create a pipeline (before adding the authorization
>>> plugin), I get a CSRF error.
>>>
>>
>> That's usually an indication that you have another server running on the
>> same host but different ports causing all sorts of weirdness. Could you
>> confirm that you only have one server running on "localhost", or whatever
>> you're using for development?
>>
>>
>>> If I add the authorization plugin, I can never get past the login screen
>>> (similar to https://groups.google.com/forum/m/#!topic/go-cd/Qe_tEdgQhTg).
>>> I'm curious if there's any obvious environment issues between us, as the
>>> Vagrant box should give us the same environment :/ Alternatively, could the
>>> gocd demo Vagrant box get updated to the latest version of GoCD, so I can
>>> use that as a base instead of rolling my own?
>>>
>>
>> What demo vagrant box are you referring to? We use the box built out of
>> the Vagrantfile 
>> checked into the gocd repository. Alternatively:
>>
>> docker run -it --rm -v $(pwd):/gocd -v $HOME/.gradle:/go/.gradle
>> gocdcontrib/gocd-dev-build:v1.0.23 /bin/bash
>>
>> The docker example is a lot easier to work with, since it involves not
>> having to download and install stuff on a network. If you run that docker
>> command in the directory containing your gocd sourcecode, it's mounted in
>> `/gocd` inside the docker container.
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "go-cd" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/go-cd/la2lmt7C07U/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> go-cd+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-cd] Bug: New authorization plugins never actually let me log in

2017-07-05 Thread Ketan Padegaonkar
If all you want to do is quickly get a production like server up and
running with least amount of fuss, I've provided an example here along with
the config and password file.

https://github.com/gocd/gocd/issues/3618#issuecomment-311545904

On Wed, Jul 5, 2017 at 4:11 PM Ketan Padegaonkar 
wrote:

> On Tue, Jul 4, 2017 at 7:17 PM Chris Northwood 
> wrote:
>
>> Hi Aravind,
>>
>> I'm still having issues using the Vagrant box, and getting it set up with
>> 17.7. When I try to create a pipeline (before adding the authorization
>> plugin), I get a CSRF error.
>>
>
> That's usually an indication that you have another server running on the
> same host but different ports causing all sorts of weirdness. Could you
> confirm that you only have one server running on "localhost", or whatever
> you're using for development?
>
>
>> If I add the authorization plugin, I can never get past the login screen
>> (similar to https://groups.google.com/forum/m/#!topic/go-cd/Qe_tEdgQhTg).
>> I'm curious if there's any obvious environment issues between us, as the
>> Vagrant box should give us the same environment :/ Alternatively, could the
>> gocd demo Vagrant box get updated to the latest version of GoCD, so I can
>> use that as a base instead of rolling my own?
>>
>
> What demo vagrant box are you referring to? We use the box built out of
> the Vagrantfile 
> checked into the gocd repository. Alternatively:
>
> docker run -it --rm -v $(pwd):/gocd -v
> $HOME/.gradle:/go/.gradle gocdcontrib/gocd-dev-build:v1.0.23 /bin/bash
>
> The docker example is a lot easier to work with, since it involves not
> having to download and install stuff on a network. If you run that docker
> command in the directory containing your gocd sourcecode, it's mounted in
> `/gocd` inside the docker container.
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-cd] Bug: New authorization plugins never actually let me log in

2017-07-05 Thread Ketan Padegaonkar
On Tue, Jul 4, 2017 at 7:17 PM Chris Northwood  wrote:

> Hi Aravind,
>
> I'm still having issues using the Vagrant box, and getting it set up with
> 17.7. When I try to create a pipeline (before adding the authorization
> plugin), I get a CSRF error.
>

That's usually an indication that you have another server running on the
same host but different ports causing all sorts of weirdness. Could you
confirm that you only have one server running on "localhost", or whatever
you're using for development?


> If I add the authorization plugin, I can never get past the login screen
> (similar to https://groups.google.com/forum/m/#!topic/go-cd/Qe_tEdgQhTg).
> I'm curious if there's any obvious environment issues between us, as the
> Vagrant box should give us the same environment :/ Alternatively, could the
> gocd demo Vagrant box get updated to the latest version of GoCD, so I can
> use that as a base instead of rolling my own?
>

What demo vagrant box are you referring to? We use the box built out of the
Vagrantfile  checked
into the gocd repository. Alternatively:

docker run -it --rm -v $(pwd):/gocd -v
$HOME/.gradle:/go/.gradle gocdcontrib/gocd-dev-build:v1.0.23 /bin/bash

The docker example is a lot easier to work with, since it involves not
having to download and install stuff on a network. If you run that docker
command in the directory containing your gocd sourcecode, it's mounted in
`/gocd` inside the docker container.

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.