[JIRA] Created: (HUDSON-8353) p4 counter change still returns null, like mentioned in HUDSON-7664

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] Created: (HUDSON-8353) p4 counter change still returns null, like mentioned in HUDSON-7664

Kohsuke Kawaguchi
Administrator
p4 counter change still returns null, like mentioned in HUDSON-7664
-------------------------------------------------------------------

                 Key: HUDSON-8353
                 URL: http://issues.hudson-ci.org/browse/HUDSON-8353
             Project: Hudson
          Issue Type: Bug
          Components: perforce
    Affects Versions: current
         Environment: p4: 2009.2
hudson: 1.376, 1.386, 1.389
plugin: 1.1.12-SNOASHOT & 1.1.13

            Reporter: Lestin


Hi,

I'm having these errors while running hudson with perforce plugin.

I've been searching over internet for almost 2 days and still can't figure out where i did wrong.
I sense it might be my settings but i've tried all combination i can think of before file this.

Even strange thing is, if i wrap around /tools/bin/p4 with my own script, say myp4 with the following lines, it worked!
        #!/bin/csh
        /tools/bin/p4 -u a_user_name $argv

I can't see the background log of p4 (or i don't know how as i'm a java idiot) hence have to start from here. Thanks.

[ana] $ /tools/bin/p4 counter change
Caught exception communicating with perforce. Could not get value of counter!com.tek42.perforce.PerforceException: Could not get value of counter!
        at com.tek42.perforce.parse.CounterBuilder.build(CounterBuilder.java:45)
        at com.tek42.perforce.parse.Counters.getCounter(Counters.java:60)
        at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:546)
        at hudson.model.AbstractProject.checkout(AbstractProject.java:1061)
        at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
        at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
        at hudson.model.Run.run(Run.java:1273)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
        at hudson.model.ResourceController.execute(ResourceController.java:88)
        at hudson.model.Executor.run(Executor.java:129)


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-8353) p4 counter change still returns null, like mentioned in HUDSON-7664

Kohsuke Kawaguchi
Administrator

    [ http://issues.hudson-ci.org/browse/HUDSON-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=144480#action_144480 ]

rpetti commented on HUDSON-8353:
--------------------------------

If you use
{code}
#!/bin/csh
/tools/bin/p4 $argv
{code}
does it work?

If it doesn't, then I would double check your username and password in the job config.

> p4 counter change still returns null, like mentioned in HUDSON-7664
> -------------------------------------------------------------------
>
>                 Key: HUDSON-8353
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-8353
>             Project: Hudson
>          Issue Type: Bug
>          Components: perforce
>    Affects Versions: current
>         Environment: p4: 2009.2
> hudson: 1.376, 1.386, 1.389
> plugin: 1.1.12-SNOASHOT & 1.1.13
>            Reporter: lestin
>
> Hi,
> I'm having these errors while running hudson with perforce plugin.
> I've been searching over internet for almost 2 days and still can't figure out where i did wrong.
> I sense it might be my settings but i've tried all combination i can think of before file this.
> Even strange thing is, if i wrap around /tools/bin/p4 with my own script, say myp4 with the following lines, it worked!
>         #!/bin/csh
>         /tools/bin/p4 -u a_user_name $argv
> I can't see the background log of p4 (or i don't know how as i'm a java idiot) hence have to start from here. Thanks.
> [ana] $ /tools/bin/p4 counter change
> Caught exception communicating with perforce. Could not get value of counter!com.tek42.perforce.PerforceException: Could not get value of counter!
> at com.tek42.perforce.parse.CounterBuilder.build(CounterBuilder.java:45)
> at com.tek42.perforce.parse.Counters.getCounter(Counters.java:60)
> at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:546)
> at hudson.model.AbstractProject.checkout(AbstractProject.java:1061)
> at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
> at hudson.model.Run.run(Run.java:1273)
> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:129)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[JIRA] Assigned: (HUDSON-8353) p4 counter change still returns null, like mentioned in HUDSON-7664

Kohsuke Kawaguchi
Administrator
In reply to this post by Kohsuke Kawaguchi

     [ http://issues.hudson-ci.org/browse/HUDSON-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

rpetti reassigned HUDSON-8353:
------------------------------

    Assignee: rpetti

> p4 counter change still returns null, like mentioned in HUDSON-7664
> -------------------------------------------------------------------
>
>                 Key: HUDSON-8353
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-8353
>             Project: Hudson
>          Issue Type: Bug
>          Components: perforce
>    Affects Versions: current
>         Environment: p4: 2009.2
> hudson: 1.376, 1.386, 1.389
> plugin: 1.1.12-SNOASHOT & 1.1.13
>            Reporter: lestin
>            Assignee: rpetti
>
> Hi,
> I'm having these errors while running hudson with perforce plugin.
> I've been searching over internet for almost 2 days and still can't figure out where i did wrong.
> I sense it might be my settings but i've tried all combination i can think of before file this.
> Even strange thing is, if i wrap around /tools/bin/p4 with my own script, say myp4 with the following lines, it worked!
>         #!/bin/csh
>         /tools/bin/p4 -u a_user_name $argv
> I can't see the background log of p4 (or i don't know how as i'm a java idiot) hence have to start from here. Thanks.
> [ana] $ /tools/bin/p4 counter change
> Caught exception communicating with perforce. Could not get value of counter!com.tek42.perforce.PerforceException: Could not get value of counter!
> at com.tek42.perforce.parse.CounterBuilder.build(CounterBuilder.java:45)
> at com.tek42.perforce.parse.Counters.getCounter(Counters.java:60)
> at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:546)
> at hudson.model.AbstractProject.checkout(AbstractProject.java:1061)
> at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
> at hudson.model.Run.run(Run.java:1273)
> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:129)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-8353) p4 counter change still returns null, like mentioned in HUDSON-7664

Kohsuke Kawaguchi
Administrator
In reply to this post by Kohsuke Kawaguchi

    [ http://issues.hudson-ci.org/browse/HUDSON-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=144488#action_144488 ]

lestin commented on HUDSON-8353:
--------------------------------

I'm not at my machine hence can't try it out, will feedback tomorrow.
But I'm 100% sure that username and password is correct, because:

1. I have removed my default .p4tickets and set my P4USER variable
   Double checked that from the terminal, i can use p4 login to login
2. I tried with a wrong password in job config and it did report error
3. Then i set P4TICKET to a local one and used p4 login -a to create that file //as i'll need my other terminals to carry out normal work
4. Besides that, there's no environment variable starts with P4, i.e.
   env | grep P4, only gives out P4USER & P4TICKET

Is it possible that i'm starting java -jar hudson.war in a linux machine instead of following the recommended setup which requires root login?
Is it possible that it's related with java version?

Thanks.

> p4 counter change still returns null, like mentioned in HUDSON-7664
> -------------------------------------------------------------------
>
>                 Key: HUDSON-8353
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-8353
>             Project: Hudson
>          Issue Type: Bug
>          Components: perforce
>    Affects Versions: current
>         Environment: p4: 2009.2
> hudson: 1.376, 1.386, 1.389
> plugin: 1.1.12-SNOASHOT & 1.1.13
>            Reporter: lestin
>            Assignee: rpetti
>
> Hi,
> I'm having these errors while running hudson with perforce plugin.
> I've been searching over internet for almost 2 days and still can't figure out where i did wrong.
> I sense it might be my settings but i've tried all combination i can think of before file this.
> Even strange thing is, if i wrap around /tools/bin/p4 with my own script, say myp4 with the following lines, it worked!
>         #!/bin/csh
>         /tools/bin/p4 -u a_user_name $argv
> I can't see the background log of p4 (or i don't know how as i'm a java idiot) hence have to start from here. Thanks.
> [ana] $ /tools/bin/p4 counter change
> Caught exception communicating with perforce. Could not get value of counter!com.tek42.perforce.PerforceException: Could not get value of counter!
> at com.tek42.perforce.parse.CounterBuilder.build(CounterBuilder.java:45)
> at com.tek42.perforce.parse.Counters.getCounter(Counters.java:60)
> at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:546)
> at hudson.model.AbstractProject.checkout(AbstractProject.java:1061)
> at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
> at hudson.model.Run.run(Run.java:1273)
> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:129)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-8353) p4 counter change still returns null, like mentioned in HUDSON-7664

Kohsuke Kawaguchi
Administrator
In reply to this post by Kohsuke Kawaguchi

    [ http://issues.hudson-ci.org/browse/HUDSON-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=144489#action_144489 ]

Lestin commented on HUDSON-8353:
--------------------------------

Hi rpetti,

Yes, you were right. Removing the "-u" bit did trigger the password invalid error again.

However, i'm 100% sure that the passwd i gave out was right especially i can login in normal terminal.
What i realized was, when i said expose it in environment in job spec, the passwd *IS* scrambled.
Hence if hudson took that scrambled password, p4 won't be happy with it.

Then i changed the config.xml in the job spec with the correct passwd in <p4Passwd> field.
Then i restarted hudson, start a manual build, still reporting login failure.

Is it possible that this is down to my linux settings over security?

Thanks.

> p4 counter change still returns null, like mentioned in HUDSON-7664
> -------------------------------------------------------------------
>
>                 Key: HUDSON-8353
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-8353
>             Project: Hudson
>          Issue Type: Bug
>          Components: perforce
>    Affects Versions: current
>         Environment: p4: 2009.2
> hudson: 1.376, 1.386, 1.389
> plugin: 1.1.12-SNOASHOT & 1.1.13
>            Reporter: Lestin
>            Assignee: rpetti
>
> Hi,
> I'm having these errors while running hudson with perforce plugin.
> I've been searching over internet for almost 2 days and still can't figure out where i did wrong.
> I sense it might be my settings but i've tried all combination i can think of before file this.
> Even strange thing is, if i wrap around /tools/bin/p4 with my own script, say myp4 with the following lines, it worked!
>         #!/bin/csh
>         /tools/bin/p4 -u a_user_name $argv
> I can't see the background log of p4 (or i don't know how as i'm a java idiot) hence have to start from here. Thanks.
> [ana] $ /tools/bin/p4 counter change
> Caught exception communicating with perforce. Could not get value of counter!com.tek42.perforce.PerforceException: Could not get value of counter!
> at com.tek42.perforce.parse.CounterBuilder.build(CounterBuilder.java:45)
> at com.tek42.perforce.parse.Counters.getCounter(Counters.java:60)
> at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:546)
> at hudson.model.AbstractProject.checkout(AbstractProject.java:1061)
> at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
> at hudson.model.Run.run(Run.java:1273)
> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:129)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-8353) p4 counter change still returns null, like mentioned in HUDSON-7664

Kohsuke Kawaguchi
Administrator
In reply to this post by Kohsuke Kawaguchi

    [ http://issues.hudson-ci.org/browse/HUDSON-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=144490#action_144490 ]

lestin commented on HUDSON-8353:
--------------------------------

BTW, I saw this in the Console Output, is it hard coded?

/usr/bin/p4 login -p

For the record, we don't have /usr/bin/p4, what can i do?

Thanks.

> p4 counter change still returns null, like mentioned in HUDSON-7664
> -------------------------------------------------------------------
>
>                 Key: HUDSON-8353
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-8353
>             Project: Hudson
>          Issue Type: Bug
>          Components: perforce
>    Affects Versions: current
>         Environment: p4: 2009.2
> hudson: 1.376, 1.386, 1.389
> plugin: 1.1.12-SNOASHOT & 1.1.13
>            Reporter: lestin
>            Assignee: rpetti
>
> Hi,
> I'm having these errors while running hudson with perforce plugin.
> I've been searching over internet for almost 2 days and still can't figure out where i did wrong.
> I sense it might be my settings but i've tried all combination i can think of before file this.
> Even strange thing is, if i wrap around /tools/bin/p4 with my own script, say myp4 with the following lines, it worked!
>         #!/bin/csh
>         /tools/bin/p4 -u a_user_name $argv
> I can't see the background log of p4 (or i don't know how as i'm a java idiot) hence have to start from here. Thanks.
> [ana] $ /tools/bin/p4 counter change
> Caught exception communicating with perforce. Could not get value of counter!com.tek42.perforce.PerforceException: Could not get value of counter!
> at com.tek42.perforce.parse.CounterBuilder.build(CounterBuilder.java:45)
> at com.tek42.perforce.parse.Counters.getCounter(Counters.java:60)
> at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:546)
> at hudson.model.AbstractProject.checkout(AbstractProject.java:1061)
> at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
> at hudson.model.Run.run(Run.java:1273)
> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:129)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-8353) p4 counter change still returns null, like mentioned in HUDSON-7664

Kohsuke Kawaguchi
Administrator
In reply to this post by Kohsuke Kawaguchi

    [ http://issues.hudson-ci.org/browse/HUDSON-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=144493#action_144493 ]

Lestin commented on HUDSON-8353:
--------------------------------

Reading more on Hudson, I realized i might need to mention our p4 login method.

We're using ticket based logins for p4. Hence i guess that's why i saw the -P thing.

I did more than that however.

In my normal terminal, using the same p4 login id with -p, i got a printout of aaabbbccc.
However, in the hudson log (where i'm using myp4 with -u wrapped), i saw -P eeefff.

Those issued tickets were different for the same user id, one in terminal and the other in hudson plugin.

Will this info help a bit towards the answer? Thanks.

Lestin

> p4 counter change still returns null, like mentioned in HUDSON-7664
> -------------------------------------------------------------------
>
>                 Key: HUDSON-8353
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-8353
>             Project: Hudson
>          Issue Type: Bug
>          Components: perforce
>    Affects Versions: current
>         Environment: p4: 2009.2
> hudson: 1.376, 1.386, 1.389
> plugin: 1.1.12-SNOASHOT & 1.1.13
>            Reporter: Lestin
>            Assignee: rpetti
>
> Hi,
> I'm having these errors while running hudson with perforce plugin.
> I've been searching over internet for almost 2 days and still can't figure out where i did wrong.
> I sense it might be my settings but i've tried all combination i can think of before file this.
> Even strange thing is, if i wrap around /tools/bin/p4 with my own script, say myp4 with the following lines, it worked!
>         #!/bin/csh
>         /tools/bin/p4 -u a_user_name $argv
> I can't see the background log of p4 (or i don't know how as i'm a java idiot) hence have to start from here. Thanks.
> [ana] $ /tools/bin/p4 counter change
> Caught exception communicating with perforce. Could not get value of counter!com.tek42.perforce.PerforceException: Could not get value of counter!
> at com.tek42.perforce.parse.CounterBuilder.build(CounterBuilder.java:45)
> at com.tek42.perforce.parse.Counters.getCounter(Counters.java:60)
> at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:546)
> at hudson.model.AbstractProject.checkout(AbstractProject.java:1061)
> at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
> at hudson.model.Run.run(Run.java:1273)
> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:129)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-8353) p4 counter change still returns null, like mentioned in HUDSON-7664

Kohsuke Kawaguchi
Administrator
In reply to this post by Kohsuke Kawaguchi

    [ http://issues.hudson-ci.org/browse/HUDSON-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=144494#action_144494 ]

rpetti commented on HUDSON-8353:
--------------------------------

Make sure P4CONFIG is not net in your hudson environment, and that there are no .p4config files anywhere in your directory hierarchy. For examply, if your workspace is /hudson/workspace/jobname, make sure /hudson/workspace/jobname/.p4config, /hudson/workspace/.p4config, /hudson/.p4config and /.p4config do not exist.

Additionally, make sure P4USER, P4PASSWD and P4TICKET are *not* set in your hudson environment. The plugin is supposed to handle this on it's own.

By hudson environment, I'm referring to the environment as it is when you start hudson with java -jar hudson.war. This is what hudson uses as a default when building on the master.

The password in config.xml is *supposed* to be scrambled. It's encrypted. If this is being passed directly into the build environment without being decrypted, then that is a bug that needs to be fixed, but it doesn't affect what you are currently seeing, since perforce operations run in a different context than build actions.

If the plugin is using "/usr/bin/p4" for login, then that means there was some error when running the p4 executable you've defined in your configuration. Remember to have the full path directly to the perforce client executable.

With regards to JVM versions, you should be running 1.5 or 1.6 Sun/Oracle. Many people have experienced problems running OpenJDK, so I suggest avoiding it.

Please include your whole job log instead of just the stack trace. It will help narrow down the problem.

> p4 counter change still returns null, like mentioned in HUDSON-7664
> -------------------------------------------------------------------
>
>                 Key: HUDSON-8353
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-8353
>             Project: Hudson
>          Issue Type: Bug
>          Components: perforce
>    Affects Versions: current
>         Environment: p4: 2009.2
> hudson: 1.376, 1.386, 1.389
> plugin: 1.1.12-SNOASHOT & 1.1.13
>            Reporter: Lestin
>            Assignee: rpetti
>
> Hi,
> I'm having these errors while running hudson with perforce plugin.
> I've been searching over internet for almost 2 days and still can't figure out where i did wrong.
> I sense it might be my settings but i've tried all combination i can think of before file this.
> Even strange thing is, if i wrap around /tools/bin/p4 with my own script, say myp4 with the following lines, it worked!
>         #!/bin/csh
>         /tools/bin/p4 -u a_user_name $argv
> I can't see the background log of p4 (or i don't know how as i'm a java idiot) hence have to start from here. Thanks.
> [ana] $ /tools/bin/p4 counter change
> Caught exception communicating with perforce. Could not get value of counter!com.tek42.perforce.PerforceException: Could not get value of counter!
> at com.tek42.perforce.parse.CounterBuilder.build(CounterBuilder.java:45)
> at com.tek42.perforce.parse.Counters.getCounter(Counters.java:60)
> at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:546)
> at hudson.model.AbstractProject.checkout(AbstractProject.java:1061)
> at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
> at hudson.model.Run.run(Run.java:1273)
> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:129)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[JIRA] Resolved: (HUDSON-8353) p4 counter change still returns null, like mentioned in HUDSON-7664

Kohsuke Kawaguchi
Administrator
In reply to this post by Kohsuke Kawaguchi

     [ http://issues.hudson-ci.org/browse/HUDSON-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lestin resolved HUDSON-8353.
----------------------------

      Assignee: Lestin  (was: rpetti)
    Resolution: Not A Defect

Hi rpetti,

I finally found the issue with my environment.
Basically the p4 command i was using is a wrapper programme that detects P4VER.

For some reason, the plugin doesn't like this and produced strange outcomes.
When i used myp4 i mentioned, as it started another shell, hence our wrapper worked again.
So i switched to the "real" p4 by looking for perforce installation, the plugin worked.

Hence i think my original ticket was not a defect, but maybe it's worth to enhance the plugin to detect such error or printout more "grey-box" message for analysis? It literally took me a week to find this out.

Thanks.

> p4 counter change still returns null, like mentioned in HUDSON-7664
> -------------------------------------------------------------------
>
>                 Key: HUDSON-8353
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-8353
>             Project: Hudson
>          Issue Type: Bug
>          Components: perforce
>    Affects Versions: current
>         Environment: p4: 2009.2
> hudson: 1.376, 1.386, 1.389
> plugin: 1.1.12-SNOASHOT & 1.1.13
>            Reporter: Lestin
>            Assignee: Lestin
>
> Hi,
> I'm having these errors while running hudson with perforce plugin.
> I've been searching over internet for almost 2 days and still can't figure out where i did wrong.
> I sense it might be my settings but i've tried all combination i can think of before file this.
> Even strange thing is, if i wrap around /tools/bin/p4 with my own script, say myp4 with the following lines, it worked!
>         #!/bin/csh
>         /tools/bin/p4 -u a_user_name $argv
> I can't see the background log of p4 (or i don't know how as i'm a java idiot) hence have to start from here. Thanks.
> [ana] $ /tools/bin/p4 counter change
> Caught exception communicating with perforce. Could not get value of counter!com.tek42.perforce.PerforceException: Could not get value of counter!
> at com.tek42.perforce.parse.CounterBuilder.build(CounterBuilder.java:45)
> at com.tek42.perforce.parse.Counters.getCounter(Counters.java:60)
> at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:546)
> at hudson.model.AbstractProject.checkout(AbstractProject.java:1061)
> at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
> at hudson.model.Run.run(Run.java:1273)
> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:129)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[JIRA] Closed: (HUDSON-8353) p4 counter change still returns null, like mentioned in HUDSON-7664

Kohsuke Kawaguchi
Administrator
In reply to this post by Kohsuke Kawaguchi

     [ http://issues.hudson-ci.org/browse/HUDSON-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lestin closed HUDSON-8353.
--------------------------


Found a way to solve the issue, not a real defect for the plugin.
Closing ticket.

> p4 counter change still returns null, like mentioned in HUDSON-7664
> -------------------------------------------------------------------
>
>                 Key: HUDSON-8353
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-8353
>             Project: Hudson
>          Issue Type: Bug
>          Components: perforce
>    Affects Versions: current
>         Environment: p4: 2009.2
> hudson: 1.376, 1.386, 1.389
> plugin: 1.1.12-SNOASHOT & 1.1.13
>            Reporter: Lestin
>            Assignee: Lestin
>
> Hi,
> I'm having these errors while running hudson with perforce plugin.
> I've been searching over internet for almost 2 days and still can't figure out where i did wrong.
> I sense it might be my settings but i've tried all combination i can think of before file this.
> Even strange thing is, if i wrap around /tools/bin/p4 with my own script, say myp4 with the following lines, it worked!
>         #!/bin/csh
>         /tools/bin/p4 -u a_user_name $argv
> I can't see the background log of p4 (or i don't know how as i'm a java idiot) hence have to start from here. Thanks.
> [ana] $ /tools/bin/p4 counter change
> Caught exception communicating with perforce. Could not get value of counter!com.tek42.perforce.PerforceException: Could not get value of counter!
> at com.tek42.perforce.parse.CounterBuilder.build(CounterBuilder.java:45)
> at com.tek42.perforce.parse.Counters.getCounter(Counters.java:60)
> at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:546)
> at hudson.model.AbstractProject.checkout(AbstractProject.java:1061)
> at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
> at hudson.model.Run.run(Run.java:1273)
> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:129)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-8353) p4 counter change still returns null, like mentioned in HUDSON-7664

Kohsuke Kawaguchi
Administrator
In reply to this post by Kohsuke Kawaguchi

    [ http://issues.hudson-ci.org/browse/HUDSON-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=144621#action_144621 ]

rpetti commented on HUDSON-8353:
--------------------------------

Since I don't know why the original wrapper was failing, I can't write a test to detect such an error. Additionally, all the information available is dumped along with the stack trace, so I'm not sure what else I could possibly add. Generally I advise people to not use wrappers at all, since they often introduce strange issues like this.

> p4 counter change still returns null, like mentioned in HUDSON-7664
> -------------------------------------------------------------------
>
>                 Key: HUDSON-8353
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-8353
>             Project: Hudson
>          Issue Type: Bug
>          Components: perforce
>    Affects Versions: current
>         Environment: p4: 2009.2
> hudson: 1.376, 1.386, 1.389
> plugin: 1.1.12-SNOASHOT & 1.1.13
>            Reporter: lestin
>            Assignee: lestin
>
> Hi,
> I'm having these errors while running hudson with perforce plugin.
> I've been searching over internet for almost 2 days and still can't figure out where i did wrong.
> I sense it might be my settings but i've tried all combination i can think of before file this.
> Even strange thing is, if i wrap around /tools/bin/p4 with my own script, say myp4 with the following lines, it worked!
>         #!/bin/csh
>         /tools/bin/p4 -u a_user_name $argv
> I can't see the background log of p4 (or i don't know how as i'm a java idiot) hence have to start from here. Thanks.
> [ana] $ /tools/bin/p4 counter change
> Caught exception communicating with perforce. Could not get value of counter!com.tek42.perforce.PerforceException: Could not get value of counter!
> at com.tek42.perforce.parse.CounterBuilder.build(CounterBuilder.java:45)
> at com.tek42.perforce.parse.Counters.getCounter(Counters.java:60)
> at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:546)
> at hudson.model.AbstractProject.checkout(AbstractProject.java:1061)
> at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
> at hudson.model.Run.run(Run.java:1273)
> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:129)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-8353) p4 counter change still returns null, like mentioned in HUDSON-7664

Kohsuke Kawaguchi
Administrator
In reply to this post by Kohsuke Kawaguchi

    [ http://issues.hudson-ci.org/browse/HUDSON-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=144622#action_144622 ]

Lestin commented on HUDSON-8353:
--------------------------------

Hi rpetti,

Not complaining but i didn't see detailed p4 activities in the tracedump from localhost:8080/threadDump.
Maybe i was looking at the wrong place? Can you give me the right direction to look for?
//I was expecting something like:   $p4exe -P ... count, which i can copy & paste to terminal.
//also the outputs from the above command that the plugin receives will be useful for this case.

As my comments above, somewhere i saw a reference to /use/bin/p4, that's when i start to rethink of our wrapper and replace it by the real installation.

Our wrapper is as simple as:
   get version from $P4VER
   call <$P4VER_installation>/bin/p4

Thanks for the help & sorry for this unnecessarily raised ticket.

Lestin

> p4 counter change still returns null, like mentioned in HUDSON-7664
> -------------------------------------------------------------------
>
>                 Key: HUDSON-8353
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-8353
>             Project: Hudson
>          Issue Type: Bug
>          Components: perforce
>    Affects Versions: current
>         Environment: p4: 2009.2
> hudson: 1.376, 1.386, 1.389
> plugin: 1.1.12-SNOASHOT & 1.1.13
>            Reporter: Lestin
>            Assignee: Lestin
>
> Hi,
> I'm having these errors while running hudson with perforce plugin.
> I've been searching over internet for almost 2 days and still can't figure out where i did wrong.
> I sense it might be my settings but i've tried all combination i can think of before file this.
> Even strange thing is, if i wrap around /tools/bin/p4 with my own script, say myp4 with the following lines, it worked!
>         #!/bin/csh
>         /tools/bin/p4 -u a_user_name $argv
> I can't see the background log of p4 (or i don't know how as i'm a java idiot) hence have to start from here. Thanks.
> [ana] $ /tools/bin/p4 counter change
> Caught exception communicating with perforce. Could not get value of counter!com.tek42.perforce.PerforceException: Could not get value of counter!
> at com.tek42.perforce.parse.CounterBuilder.build(CounterBuilder.java:45)
> at com.tek42.perforce.parse.Counters.getCounter(Counters.java:60)
> at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:546)
> at hudson.model.AbstractProject.checkout(AbstractProject.java:1061)
> at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
> at hudson.model.Run.run(Run.java:1273)
> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:129)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-8353) p4 counter change still returns null, like mentioned in HUDSON-7664

Kohsuke Kawaguchi
Administrator
In reply to this post by Kohsuke Kawaguchi

    [ http://issues.hudson-ci.org/browse/HUDSON-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=144623#action_144623 ]

rpetti commented on HUDSON-8353:
--------------------------------

The command is right in the stack trace.

{code}
[ana] $ /tools/bin/p4 counter change
Caught exception communicating with perforce. Could not get value of counter!
{code}

I'll look into making it dump the output of the command in the event of an error.

> p4 counter change still returns null, like mentioned in HUDSON-7664
> -------------------------------------------------------------------
>
>                 Key: HUDSON-8353
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-8353
>             Project: Hudson
>          Issue Type: Bug
>          Components: perforce
>    Affects Versions: current
>         Environment: p4: 2009.2
> hudson: 1.376, 1.386, 1.389
> plugin: 1.1.12-SNOASHOT & 1.1.13
>            Reporter: Lestin
>            Assignee: Lestin
>
> Hi,
> I'm having these errors while running hudson with perforce plugin.
> I've been searching over internet for almost 2 days and still can't figure out where i did wrong.
> I sense it might be my settings but i've tried all combination i can think of before file this.
> Even strange thing is, if i wrap around /tools/bin/p4 with my own script, say myp4 with the following lines, it worked!
>         #!/bin/csh
>         /tools/bin/p4 -u a_user_name $argv
> I can't see the background log of p4 (or i don't know how as i'm a java idiot) hence have to start from here. Thanks.
> [ana] $ /tools/bin/p4 counter change
> Caught exception communicating with perforce. Could not get value of counter!com.tek42.perforce.PerforceException: Could not get value of counter!
> at com.tek42.perforce.parse.CounterBuilder.build(CounterBuilder.java:45)
> at com.tek42.perforce.parse.Counters.getCounter(Counters.java:60)
> at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:546)
> at hudson.model.AbstractProject.checkout(AbstractProject.java:1061)
> at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
> at hudson.model.Run.run(Run.java:1273)
> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:129)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-8353) p4 counter change still returns null, like mentioned in HUDSON-7664

Kohsuke Kawaguchi
Administrator
In reply to this post by Kohsuke Kawaguchi

    [ http://issues.hudson-ci.org/browse/HUDSON-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=144624#action_144624 ]

Lestin commented on HUDSON-8353:
--------------------------------

Thanks rpetti.

Yes that's in the log, i forgot about that, sorry.
I saw the reference to /usr/bin/p4, i thought there were other things going on in the background.
Hence the question.

The output dump will be useful, thanks for that!

Lestin

> p4 counter change still returns null, like mentioned in HUDSON-7664
> -------------------------------------------------------------------
>
>                 Key: HUDSON-8353
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-8353
>             Project: Hudson
>          Issue Type: Bug
>          Components: perforce
>    Affects Versions: current
>         Environment: p4: 2009.2
> hudson: 1.376, 1.386, 1.389
> plugin: 1.1.12-SNOASHOT & 1.1.13
>            Reporter: Lestin
>            Assignee: Lestin
>
> Hi,
> I'm having these errors while running hudson with perforce plugin.
> I've been searching over internet for almost 2 days and still can't figure out where i did wrong.
> I sense it might be my settings but i've tried all combination i can think of before file this.
> Even strange thing is, if i wrap around /tools/bin/p4 with my own script, say myp4 with the following lines, it worked!
>         #!/bin/csh
>         /tools/bin/p4 -u a_user_name $argv
> I can't see the background log of p4 (or i don't know how as i'm a java idiot) hence have to start from here. Thanks.
> [ana] $ /tools/bin/p4 counter change
> Caught exception communicating with perforce. Could not get value of counter!com.tek42.perforce.PerforceException: Could not get value of counter!
> at com.tek42.perforce.parse.CounterBuilder.build(CounterBuilder.java:45)
> at com.tek42.perforce.parse.Counters.getCounter(Counters.java:60)
> at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:546)
> at hudson.model.AbstractProject.checkout(AbstractProject.java:1061)
> at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
> at hudson.model.Run.run(Run.java:1273)
> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:129)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira