Teamcity - intermittent clearcase snapshot error - reading changes - windows-xp

Getting the following error in the Project View against projects reading changes from a clearcase snapshot
Error collecting changes for VCS root 'VS Root Name'
jetbrains.buildServer.vcs.VcsException: Process cleartool lshistory -eventid -recurse - since 22-December-2010.16:42:08 -fmt %u#--#%Nd#--#%En#--#%m#--#%Vn#--#%o#--#%e#--#%Nc#- -#%[activity]p###----###\n \\server\D$\path\vob returns -1
jetbrains.buildServer.vcs.VcsException: Error collecting changes for VCS root 'VS Root Name'
jetbrains.buildServer.vcs.VcsException: Process cleartool lshistory -eventid -recurse - since 22-December-2010.16:42:08 -fmt %u#--#%Nd#--#%En#--#%m#--#%Vn#--#%o#--#%e#--#%Nc#--#%[activity]p###----###\n \\server\D$\path\vob returns -1
at jetbrains.buildServer.buildTriggers.vcs.clearcase.ClearCaseSupport.collectChangesWithConnection(ClearCaseSupport.java:622)
at jetbrains.buildServer.buildTriggers.vcs.clearcase.ClearCaseSupport.collectChanges(ClearCaseSupport.java:612)

The simplest way to troubleshoot that kind of error is to execute the same command in a shell sesssion (DOS here), and see the detailed error message that cleartool will produce.
(TeamCity only display the fact that the command has failed)
Possible errors are:
no albd process on the server where the snapshot view is
UNC path problem (can you make a simple 'dir \\server\D$\path\vob'?)
right issue (are you using the right account to query this view)
...

Related

MacOS, AppleScript and Git

I have a project that will require reading a local repo and collecting the diff from the most recent commit and the one before it. I then need to do additional work with those diffs (add to an existing log file, make available for tech writers to edit existing API docs with the changes - might Slack them or API into Jira and build a ticket (like that option as it leaves a trail).
I can do the yeoman level work in an AppleScript, calling shell scripts when needed then parsing the data, and passing the cleaned data to the various applications/sites I need to. But other, less technical people will also be using this app and it would be nice to give them a simple UI to work with.
Anyway, after much digging through the Google, SO and other sources I was able to get a MacOS app working that can call an AppleScript and now I've run into a wall...
I can run this AppleScript from Script Editor and it works fine:
set strGitLog to do shell script "cd ~/Desktop/xxxxxx/Projects/UnifiedSDK/Repo/xxxxxx && git log -p -- file1.html"
"commit c39c6bb004d2e104b3f8e15a6125e3d68a5323ef
Author: Steve <xxxxxx#xxxxxx.com>
Date: Tue Oct 22 15:42:13 2019 -0400
Added deprecation warning to file1
diff --git a/file1.html b/file1.html
index b7af22b..9fdc781 100644
--- a/file1.html
+++ b/file1.html
## -51,6 +51,8 ##
<h2>Class Description</h2>
<p style=\"margin-bottom:10px;\">This is the description of the class</p>
+ <p style=\"margin-bottom:10px;\">Warning: This class is scheduled to be deprecated.</p>
+
<h3>Arguments:</h3>
<p style=\"margin-bottom:10px;\">These are the arguments that the class accepts</p>
...
but, if I place this script within a MacOS application:
script gitMessenger
property parent : class "NSObject"
to readMessage()
set strGitLog to do shell script "cd ~/Desktop/xxxxxx/Projects/UnifiedSDK/Repo/xxxxxx && git log -p -- file1.html"
log strGitLog
end readMessage
end script
I get this error message in the log:
fatal: Unable to read current working directory: Operation not permitted (error 128)
Which after checking seems to be a Git permissions error. If I pwd I am pointing to the right directory:
/Users/xxxxxx/Library/Containers/xxxxxx.GitMessenger/Data/Desktop/xxxxxx/Projects/UnifiedSDK/Repo/xxxxxx
and that directory has git initiated on it:
and it has permission for read/write to everyone. So I am a little at a loss right now how to get this to work. Any help or suggestions would be appreciated.

Postgresql 11.1: "Problem running post-install step. Installation may not complete correctly. Error with configuration or permissions."

I checked the log file and I think this is the part that caused the problem:
Setting up database
[15:30:54] Configuring pg11 to point to existing data dir D:\John's Files\My Documents\Code\Databases\PostgreSQL\data\pg11
Setting PostgreSQL port
= 5432
Executing C:\Installed Software\Developer Software\PostgreSQLv11.1/pgc config pg11 --datadir "D:\John's Files\My Documents\Code\Databases\PostgreSQL\data\pg11"
Script exit code: 1
Script output: ################################################
# FATAL SQL Error in check_release
# SQL Message = near "s": syntax error
# SQL Statement = SELECT r.component FROM releases r, versions v
WHERE r.component = v.component
AND r.component LIKE '%D:\John's Files\My Documents\Code\Databases\PostgreSQL\data\pg11%' AND v.is_current = 1
################################################
Script stderr: Program ended with an error exit code
Error with configuration or permissions. Please see log file for more information.
Problem running post-install step. Installation may not complete correctly
Error with configuration or permissions. Please see log file for more information.
I think the problem is the apostrophe in "John's". Does anyone know if that's right? Is there a fix to this problem? I don't want to rename my directory because Postgresql can't handle apostrophes.

capistrano upload! thinks ~ referenced local directory is on remote server

So every example I've looked up indicates this is how one is supposed to do it but I think I may have found a bug unless there's another way to do this.
I'm using upload! to upload assets to a remote list of servers. The task looks like this:
desc "Upload grunt compiled css/js."
task :upload_assets do
on roles(:all) do
%w{/htdocs/css /htdocs/js}.each do |asset|
upload! "#{fetch(:local_path) + asset}", "#{release_path.to_s + '/' + asset}", recursive: true
end
end
end
If local_path is defined as an absolute path such as:
set :local_path:, '/home/dcmbrown/projects/ABC'
This works fine. However if I do the following:
set :local_path:, '~/projects/ABC'
I end up getting the error:
The deploy has failed with an error: Exception while executing on ec2-54-23-88-125.us-west-2.compute.amazon.com: No such file or directory - ~/projects/ABC/htdocs/css
It's not a ' vs " issue as I've tried both (and I didn't think capistrano paid attention to that anyway).
Is this a bug? Is there a work around? Am I just doing it wrong?
I ended up discovering the best way to do this is to actually use path expansion! (headsmack)
irb> File.expand_path('~dcmbrown/projects/ABC')
=> "/home/dcmbrown/projects/ABC"
Of course what I'd like is to do automatic path expansion but you can't have everything. I think I was mostly dumbstruck that it didn't automatically; so much so I spent a couple of hours trying to figure out why it didn't work and ended up wasting time asking here. :(
I don't think the error is coming from the remote server, it just looks like it since it's running that upload command in the context of a deploy.
I just created a single cap task to just do an upload using the "~" character and it also fails with
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy#XXX: No such file or directory # rb_file_s_stat - ~/Projects/testapp/public/404.html
It appears to be a Ruby issue not Capistrano as this also fails in a Ruby console
~/Projects/testapp $ irb
2.2.2 :003 > File.stat('~/Projects/testapp/public/404.html')
Errno::ENOENT: No such file or directory # rb_file_s_stat - ~/Projects/testapp/public/404.html
from (irb):3:in `stat'
from (irb):3
from /Users/supairish/.rvm/rubies/ruby-2.2.2/bin/irb:11:in `<main>'

Default configuration in Play 2.0 causes IOException?

Is this a bug with the default configuration of Play 2.0? I have just installed Play 2.0 and when I create an application for the first time, I get this:
Error during sbt execution: java.io.IOException: Cannot write parent directory: Path(/home/hanxue/play/myFirstApp/app) of /home/hanxue/play/myFirstApp/app/views
The app subdirectory does not have write permissions:
hanxue#ubuntu-dev:~/play$ ls -l myFirstApp/
total 16
dr-xr-xr-x 2 hanxue hanxue 4096 2012-03-13 11:22 app
It also seems that the $PLAY/framework/sbt/boot/ directory need to be world-writable or otherwise play will throw an IOException about not being able to create /opt/play-2.0/framework/sbt/boot/sbt.boot.lock . Is this by design?
I solved it by giving it world-writable permission
chmod -R o+w /opt/play-2.0/framework/sbt/boot/
This is not a bug, it is just how sbt works(and play-2.0 uses sbt). Sbt downloads all necessary parts first time when its started, and default behavior of play is that all dependency go to same directory and this is place where you extracted play-2.0, so this directory needs write permissions. You will probably need write permissions on /opt/play-2.0/repository too.

Get the error when creating the view “cleartool mkview -tag $view-name $view-name" with Clearcase UCM Plugin 1.7.4

Get the error when creating the view “cleartool mkview -tag $view-name $view-name" with plugin 1.7.4.
Additional view-name added at the end of command line.
In the additional arguments I placed the UNC path to the view. In case I don't add it it gives me
"... UNC path should be provided..." error.
Log:
Building remotely on builder
[test] $ cleartool mkview -tag jenkins_Official_G4_FW_Platform_Dev_int_22 \\builder\cc_views\jenkins_Official_G4_FW_Platform_Dev_int_22 jenkins_Official_G4_FW_Platform_Dev_int_22
cleartool: Error: Extra arguments: "jenkins_Official_G4_FW_Platform_Dev_int_22"
cleartool mkview -tag $view-name $view-name
is incorrect.
You need either -vws (for the view storage path: your UNC path) or -stg (for the name of a view storage)
See cleartool mkview man page.
So it should be:
cleartool mkview -tag $view-name
with additional argument: -stg a_view-storage-unc_path
The OP ZeevT adds in the comments:
Tried now using snapshot view, but same failure.
See below the cmd generated by Jenkins:
Building remotely on build-xp [Hello World]
$ cleartool mkview -snapshot -tag jenkins_Official_G4_FW_Platform_Dev_int \\build-xp\CC_views\jenkins_Official_G4_FW_Platform_Dev_int.vws jenkins_Official_G4_FW_Platform_Dev_int
cleartool: Error: Extra arguments: "jenkins_Official_G4_FW_Platform_Dev_int" – ZeevT 2 days ago
I mention that the view storage path for a snapshot view should be preceded by -vws, and the OP confirms:
For snapshot view -vws solved the problem –
So there is still an issue for dynamic views...