Getting error while using TeamCity command line tool. What is missing? - teamcity

I'm trying to use TeamCity command line tool but receiving an error? What is missing?
The command executed:
java -jar tcc.jar info --host http://tc
The output:
[Connecting to "http://tc" TeamCity Server] started
[Connecting to "http://tc" TeamCity Server] done
[Logging in] started
[Logging in] done
[ ] info: error
com.thoughtworks.xstream.converters.ConversionException: No enum constant jetbrains.buildServer.BuildTypeDescriptor.CheckoutType.AUTO : No enum constant jetbrains.buildServer.BuildTypeDescriptor.CheckoutType.AUTO
---- Debugging information ----
message : No enum constant jetbrains.buildServer.BuildTypeDescriptor.CheckoutType.AUTO
cause-exception : java.lang.IllegalArgumentException
cause-message : No enum constant jetbrains.buildServer.BuildTypeDescriptor.CheckoutType.AUTO
class : jetbrains.buildServer.BuildTypeDescriptor$CheckoutType
required-type : jetbrains.buildServer.BuildTypeDescriptor$CheckoutType
converter-type : com.thoughtworks.xstream.converters.enums.EnumConverter
path : /Project/configs/Configuration/checkoutType
line number : 1
class[1] : jetbrains.buildServer.BuildTypeData
converter-type[1] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
class[2] : java.util.ArrayList
converter-type[2] : com.thoughtworks.xstream.converters.collections.CollectionConverter
class[3] : jetbrains.buildServer.ProjectData
version : null
-------------------------------

Related

getting log from telnet session and writing relevant info to file but line gets overwritten by timestamp variable in expect script

Here is a sample remote session that I am automating
[sample-session]
$telnet 172.16.11.2
Trying 172.16.11.2...
Connected to 172.16.11.2.
Escape character is '^]'.
BCM96858 Broadband Router
Login: user
Password:
> voice show
Global Parameters:
------------------
BoundIfName : bronu8.2501
IP address family : IPv4
BoundIpAddr : 172.16.11.2
Voice Log Levels : general=3,cmgr=3,disp=3,sipcctk=3,bos=3,ept=3,cms=3,prov=3,lhapi=3,istw=3,dsphal=3,slicslac=3
Management Protocol : OMCI
Voice DNS Server Enable : Off
Voice DNS Server Primary : 0.0.0.0
Voice DNS Server Secondary : 0.0.0.0
Service Provider 0:
--------------------
Associated Voice Profile: 1
Locale : IND
DTMFMethod : InBand
HookFlashMethod : None
DigitMap : x+T
Log Server Addr : 0.0.0.0
Log Server Port : 0
T38 : on
V18 : on
RTPDSCPMark : 46
European flash : Off
SIP:
SIP mode : RFC3261
Domain :
Port : 5060
Transport : UDP
SIP URI for TLS calls: Off
RegExpires : 300
RegRetryInterval : 60
DSCPMark : 46
Registrar Addr : 172.16.11.201
Registrar Port : 5060
Proxy Addr : 172.16.11.201
Proxy Port : 5060
OutBoundProxy Addr : 172.16.11.201
OutBoundProxy Port : 5060
Music Server Addr : 0.0.0.0
Music Server Port : 0
Conferencing URI :
Conferencing Option : Local
Failover Enable : Off
Sip OPTIONS Enable : Off
Back-to-primary cfg : Disabled
Secondary Domain :
Secondary Registrar Addr : 0.0.0.0
Secondary Registrar Port : 5060
Secondary Proxy Addr : 0.0.0.0
Secondary Proxy Port : 5060
Secondary Outbound Proxy Addr : 0.0.0.0
Secondary Outbound Proxy Port : 5060
To Tag Matching : On
Timer B ( in ms ) : 32000
Timer F ( in ms ) : 32000
SRTP Usage Option : Disabled
Account 0:
-----------
ActivationStatus : Enabled
VoipServiceStatus : Up
CallStatus : Idle
Associated LineInst : 1
PhysEndpt : 0
Extension : 122
DisplayName :
AuthName : 122
AuthPwd : 0000
TxGain : 0 dB
RxGain : 0 dB
CALLFEATURES:
MWI : off
Caller ID number : on
Caller ID name : on
CallWaiting : on
CFWDNum :
CallFwdAll : off
CallFwdBusy : off
CallFwdNoans : off
AnonymousOutgoingCall: off
AnonymousCallRcvBlock: off
DoNotDisturb : off
CallCompOnBusy : off
SpeedDial : off
WarmLine : off
WarmLineNum :
CallBarring : off
CallBarringMode : None
CallBarringPin : 9999
CallBarringDigitMap :
NetPrivacy : on
CODECSETTINGS:
VAD : on
pTime : 20
CodecList : (0) G.711MuLaw
(1) G.711ALaw
(2) G.723.1
(3) G.726_16
(4) G.726_24
(5) G.726_32
Account 1:
-----------
ActivationStatus : Enabled
VoipServiceStatus : Up
CallStatus : Idle
Associated LineInst : 2
PhysEndpt : 1
Extension : 121
DisplayName :
AuthName : 121
AuthPwd : 0000
TxGain : 0 dB
RxGain : 0 dB
CALLFEATURES:
MWI : off
Caller ID number : on
Caller ID name : on
CallWaiting : on
CFWDNum :
CallFwdAll : off
CallFwdBusy : off
CallFwdNoans : off
AnonymousOutgoingCall: off
AnonymousCallRcvBlock: off
DoNotDisturb : off
CallCompOnBusy : off
SpeedDial : off
WarmLine : off
WarmLineNum :
CallBarring : off
CallBarringMode : None
CallBarringPin : 9999
CallBarringDigitMap :
NetPrivacy : on
CODECSETTINGS:
VAD : on
pTime : 20
CodecList : (0) G.711MuLaw
(1) G.711ALaw
(2) G.723.1
(3) G.726_16
(4) G.726_24
(5) G.726_32
> exit
Bye bye. Have a nice day!!!
Connection closed by foreign host.
[/sample-session]
My aim is to obtain lines containing ActivationStatus and VoipServiceStatus.
So I wrote this script
#!/usr/bin/expect -f
set timeout 2
set ip_addr [lindex $argv 0]
set OUTFILE "voip_status.log"
spawn telnet 172.16.11.$ip_addr
expect {
timeout { send_user "\nFailed to get login prompt for $ip_addr\n"; exit 1 }
eof { send_user "\ntelnet failure for server $ip_addr\n"; exit 2 }
"*Login:"
}
#expect "*Login:"
send -- "user\r"
expect "*Password:"
send -- "user\r"
expect ">"
send -- "voice show\r"
expect ">"
set voice_full_output $expect_out(buffer)
set voice_stat_lines [ split $voice_full_output "\n" ]
foreach line $voice_stat_lines {
if {[string match "*VoipServiceStatus*" $line]} {
set timestamp [timestamp -format %Y-%m-%d_%H:%M:%S]
set chan [open $OUTFILE a+]
#puts "ok - MATCH $line"
puts $chan "$line $timestamp"
close $chan
}
if {[string match "*ActivationStatus*" $line]} {
set chan [open $OUTFILE a+]
#puts "ok - MATCH $line"
puts $chan "$line"
close $chan
}
}
send -- "exit\r"
expect eof
Here is my output
$ cat voip_status.log
ActivationStatus : Enabled
2021-03-17_11:32:35tus : Up
ActivationStatus : Enabled
2021-03-17_11:32:35tus : Up
As you can see that time stamp has overwritten the line I had filtered out.
I wanted timestamp to appear at the end of line .
Why is this happening ?
Here I made an experimental setup which anybody can run to see this behaviour.
Contents of 'output-voice-log-for-experiment.sh' follow
[file to give input]
#!/usr/bin/perl
print "
Account 0:
-----------
ActivationStatus : Enabled
VoipServiceStatus : Up
CallStatus : Idle
Associated LineInst : 1
PhysEndpt : 0
Extension : 122
DisplayName :
AuthName : 122
AuthPwd : 0000
TxGain : 0 dB
RxGain : 0 dB
CALLFEATURES:
MWI : off
Caller ID number : on
Caller ID name : on
CallWaiting : on
CFWDNum :
CallFwdAll : off
CallFwdBusy : off
CallFwdNoans : off
AnonymousOutgoingCall: off
AnonymousCallRcvBlock: off
DoNotDisturb : off
CallCompOnBusy : off
SpeedDial : off
WarmLine : off
WarmLineNum :
CallBarring : off
CallBarringMode : None
CallBarringPin : 9999
CallBarringDigitMap :
NetPrivacy : on
CODECSETTINGS:
VAD : on
pTime : 20
CodecList : (0) G.711MuLaw
(1) G.711ALaw
(2) G.723.1
(3) G.726_16
(4) G.726_24
(5) G.726_32
Account 1:
-----------
ActivationStatus : Enabled
VoipServiceStatus : Up
CallStatus : Idle
Associated LineInst : 2
PhysEndpt : 1
Extension : 121
DisplayName :
AuthName : 121
AuthPwd : 0000
TxGain : 0 dB
RxGain : 0 dB
CALLFEATURES:
MWI : off
Caller ID number : on
Caller ID name : on
CallWaiting : on
CFWDNum :
CallFwdAll : off
CallFwdBusy : off
CallFwdNoans : off
AnonymousOutgoingCall: off
AnonymousCallRcvBlock: off
DoNotDisturb : off
CallCompOnBusy : off
SpeedDial : off
WarmLine : off
WarmLineNum :
CallBarring : off
CallBarringMode : None
CallBarringPin : 9999
CallBarringDigitMap :
NetPrivacy : on
CODECSETTINGS:
VAD : on
pTime : 20
CodecList : (0) G.711MuLaw
(1) G.711ALaw
(2) G.723.1
(3) G.726_16
(4) G.726_24
(5) G.726_32
> exit
"
[/file to give input]
Contents of 'process-experimental-echo.sh' follow
[file to process input]
#!/usr/bin/expect -f
spawn ./output-voice-log-for-experiment.sh
set timeout 20
set OUTFILE "experimental_voip_status.log"
expect ">"
set voice_full_output $expect_out(buffer)
set voice_stat_lines [ split $voice_full_output "\n" ]
foreach line $voice_stat_lines {
if {[string match "*VoipServiceStatus*" $line]} {
set timestamp [timestamp -format %Y-%m-%d_%H:%M:%S]
set chan [open $OUTFILE a+]
puts "ok - MATCH $line"
puts $chan "$line $timestamp"
close $chan
}
if {[string match "*ActivationStatus*" $line]} {
set chan [open $OUTFILE a+]
puts "ok - MATCH $line"
puts $chan "$line"
close $chan
}
}
[/file to process input]
Now simply run ./process-experimental-echo.sh and see this behaviour yourself.
Here is the output file you will get
$ cat experimental_voip_status.log
ActivationStatus : Enabled
2021-03-17_12:27:11tus : Up
ActivationStatus : Enabled
2021-03-17_12:27:11tus : Up
Thanks.
If you look at the output file using cat -vet it shows the non-printing control characters, tabs, and end-of-line, and you get:
ActivationStatus : Enabled^M$
VoipServiceStatus : Up^M 2021-03-17_09:02:53$
You can see ^M in the middle of a line, which is carriage-return. On a terminal this makes the cursor go back to the start of the line, and start overprinting.
This is the typical result of spawn, which runs a command through a pty, which alters each output newlines into carriage-return and newline. This is normal and desired for a pty. You can either turn it off (see stty -onlcr), or knowing that it is likely to be there, you can remove it in your script: after the foreach ... line, trim the variable $line to remove \r:
set line [string trimright $line "\r"]

TimeoutException when trying to connect to Azure service bus queue through informatica

I am trying to load 2k records on azure service bus queue through informatica, but getting timeout exception. The connection is working file for 700 records, successfully loading on queue.
I have created JMS and JNDI connection and is working fine if number of records are less.
Error:
2020-05-04 23:27:28 : ERROR : (3084 | WRITER_1__1) : (IS | PC_INT_EE_QA) : node01_lxinfaeeqa1 : JAVA PLUGIN_1762 : [ERROR] JMS writer encountered a JMS exception: Timed out while waiting to get credit to sendException Stack: javax.jms.JMSException: Timed out while waiting to get credit to send
at org.apache.qpid.amqp_1_0.jms.impl.MessageProducerImpl.send(MessageProducerImpl.java:331)
at com.informatica.powerconnect.jms.server.writer.JMSMessageWriter$QueueWriter.writeMessage(JMSMessageWriter.java:93)
at com.informatica.powerconnect.jms.server.writer.JMSWriterPartitionDriver.execute(JMSWriterPartitionDriver.java:401)
Linked Exception Stack: java.util.concurrent.TimeoutException
at org.apache.qpid.amqp_1_0.transport.ConnectionEndpoint.waitUntil(ConnectionEndpoint.java:1232)
at org.apache.qpid.amqp_1_0.transport.SessionEndpoint.waitUntil(SessionEndpoint.java:686)
at org.apache.qpid.amqp_1_0.transport.LinkEndpoint.waitUntil(LinkEndpoint.java:360)
at org.apache.qpid.amqp_1_0.client.Sender.send(Sender.java:320)
at org.apache.qpid.amqp_1_0.jms.impl.MessageProducerImpl.send(MessageProducerImpl.java:321)
at com.informatica.powerconnect.jms.server.writer.JMSMessageWriter$QueueWriter.writeMessage(JMSMessageWriter.java:93)
at com.informatica.powerconnect.jms.server.writer.JMSWriterPartitionDriver.execute(JMSWriterPartitionDriver.java:401)
.
2020-05-04 23:27:28 : ERROR : (3084 | WRITER_1__1) : (IS | PC_INT_EE_QA) : node01_lxinfaeeqa1 : JAVA PLUGIN_1762 : [ERROR] at com.informatica.powerconnect.jms.server.writer.JMSWriterPartitionDriver.execute(JMSWriterPartitionDriver.java:431)
2020-05-04 23:27:28 : ERROR : (3084 | WRITER_1__1) : (IS | PC_INT_EE_QA) : node01_lxinfaeeqa1 : SDKS_38502 : Plug-in #300800's target [Target_jms: Partition 1] failed in method [execute].
2020-05-04 23:27:28 : INFO : (3084 | WRITER_1__1) : (IS | PC_INT_EE_QA) : node01_lxinfaeeqa1 : WRT_8333 : Rolling back all the targets due to fatal session error.
2020-05-04 23:28:28 : INFO : (3084 | WRITER_1__1) : (IS | PC_INT_EE_QA) : node01_lxinfaeeqa1 : WRT_8325 : Final rollback executed for the target [Target_jms] at end of load
2020-05-04 23:28:28 : ERROR : (3084 | WRITER_1__1) : (IS | PC_INT_EE_QA) : node01_lxinfaeeqa1 : WRT_8081 : Writer run terminated. [Error in loading data to target table [Target_jms: Partition 1]]
2020-05-04 23:28:28 : INFO : (3084 | WRITER_1__1) : (IS | PC_INT_EE_QA) : node01_lxinfaeeqa1 : WRT_8168 : End loading table [Target_jms: Partition 1] at: Mon May 04 13:58:28 2020
2020-05-04 23:28:28 : INFO : (3084 | WRITER_1__1) : (IS | PC_INT_EE_QA) : node01_lxinfaeeqa1 : WRT_8035 : Load complete time: Mon May 04 13:58:28 2020
Appreciate the help.
The queue size for azure was 1GB but it seems that Azure service bus queue can only accept 100 messages in one transaction. I was able to solve the issue by changing the properties at informatica session level.
Commit type to "Target"
commit interval to "100"
And in target properties kept the JMS priority to 9.

Jmeter - jmeter.save.SaveService: Conversion error com.thoughtworks.xstream.converters.ConversionException: -1 : -1

I am having issue with Opening JMeter Test Plan, below is the exception i am getting. This started happening suddenly after system restart.
Error -
015/03/25 13:08:17 ERROR - jmeter.save.SaveService: Conversion error com.thoughtworks.xstream.converters.ConversionException: -1 : -1
---- Debugging information ----
message : -1
cause-exception : java.lang.ArrayIndexOutOfBoundsException
cause-message : -1
class : org.apache.jmeter.testelement.property.DoubleProperty
required-type : org.apache.jmeter.testelement.property.DoubleProperty
converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree[6]/hashTree[10]/hashTree/ConstantThroughputTimer/doubleProp/name
line number : 1007
class[1] : org.apache.jmeter.timers.ConstantThroughputTimer
converter-type[1] : org.apache.jmeter.save.converters.TestElementConverter
class[2] : org.apache.jorphan.collections.ListedHashTree
converter-type[2] : org.apache.jmeter.save.converters.HashTreeConverter
After spending hours i found workaround. Just simply run Jmeter as Administrator and it will work.

print values at fixed position in Terminal window using UNIX

I am running a shell script which produces below output.
Built-By : apache
Created-By : Apache Maven
Implementation-Title : testApp
Implementation-Vendor-Id : com.test.app
Implementation-Version : testBox
Manifest-Version : 1.0
appname : TestStar
build-date : 02-03-2014-13 : 41
version : testBox
Expecting the below output: (Please ignore _ underscore)
Built-By_________________: apache
Created-By_______________: Apache Maven
Implementation-Title_____: testApp
Implementation-Vendor-Id_: com.test.app
Implementation-Version___: testBox
Manifest-Version_________: 1.0
appname__________________: TestStar
build-date_______________: 02-03-2014-13 : 41
version__________________: testBox
Someone Please help me. I am iterating two arrays to print these values.
show me your code.
maybe this would help:
#!/bin/bash
key=("appname" "version" "Created-By")
value=("TestStar" "testBox" "Apache Maven")
for i in "${!key[#]}";do
printf "%-15s %s\n" "${key[i]}" "${value[i]}"
done

Connect Spring roo project to Mongo database

I am new too roo and trying to create a simple app to push to Heroku. I have the app up and working on my localhost with a MongoDB running on the localhost as well. I added a MongoDB to the app in Heroku but it will not open on Heroku (the app not the DB). I don't know what the issue is but do I need to connect my app to the Heroku DB somehow? As in changing the database.properties file? I tried to test it locally using the Heroku DB by taking this URL (Which I can use to log into the DB just fine with mongoctl):
mongodb://heroku_app10830648:************************#ds047387.mongolab.com:4738/heroku_app10830648
and putting the info into the database.properties file:
#Updated at Wed Jan 09 19:16:49 MST 2013
#Wed Jan 09 19:16:49 MST 2013
mongo.database=heroku_app10830648
mongo.host=ds047387.mongolab.com
mongo.password=***********************
mongo.port=47387
mongo.username=heroku_app10830648
but when I build it with mvn package I get this error:
T E S T S
Results:
Tests in error:
testFindNotebook(com.xebia.shortnotes.domain.NotebookIntegrationTest): command failed [command failed [count] { "assertion" : "unauthorized db:heroku_app10830648 ns:heroku_app10830648.notebook lock type:0 client:71.208.224.103" , "assertionCode" : 10057 , "errmsg" : "db assertion failure" , "ok" : 0.0}
testFindAllNotebooks(com.xebia.shortnotes.domain.NotebookIntegrationTest): command failed [command failed [count] { "assertion" : "unauthorized db:heroku_app10830648 ns:heroku_app10830648.notebook lock type:0 client:71.208.224.103" , "assertionCode" : 10057 , "errmsg" : "db assertion failure" , "ok" : 0.0}
testFindNotebookEntries(com.xebia.shortnotes.domain.NotebookIntegrationTest): command failed [command failed [count] { "assertion" : "unauthorized db:heroku_app10830648 ns:heroku_app10830648.notebook lock type:0 client:71.208.224.103" , "assertionCode" : 10057 , "errmsg" : "db assertion failure" , "ok" : 0.0}
testSaveNotebook(com.xebia.shortnotes.domain.NotebookIntegrationTest): command failed [command failed [count] { "assertion" : "unauthorized db:heroku_app10830648 ns:heroku_app10830648.notebook lock type:0 client:71.208.224.103" , "assertionCode" : 10057 , "errmsg" : "db assertion failure" , "ok" : 0.0}
testDeleteNotebook(com.xebia.shortnotes.domain.NotebookIntegrationTest): command failed [command failed [count] { "assertion" : "unauthorized db:heroku_app10830648 ns:heroku_app10830648.notebook lock type:0 client:71.208.224.103" , "assertionCode" : 10057 , "errmsg" : "db assertion failure" , "ok" : 0.0}
testCountAllNotes(com.xebia.shortnotes.domain.NoteIntegrationTest): command failed [command failed [count] { "assertion" : "unauthorized db:heroku_app10830648 ns:heroku_app10830648.note lock type:0 client:71.208.224.103" , "assertionCode" : 10057 , "errmsg" : "db assertion failure" , "ok" : 0.0}
testFindNote(com.xebia.shortnotes.domain.NoteIntegrationTest): command failed [command failed [count] { "assertion" : "unauthorized db:heroku_app10830648 ns:heroku_app10830648.note lock type:0 client:71.208.224.103" , "assertionCode" : 10057 , "errmsg" : "db assertion failure" , "ok" : 0.0}
testFindAllNotes(com.xebia.shortnotes.domain.NoteIntegrationTest): command failed [command failed [count] { "assertion" : "unauthorized db:heroku_app10830648 ns:heroku_app10830648.note lock type:0 client:71.208.224.103" , "assertionCode" : 10057 , "errmsg" : "db assertion failure" , "ok" : 0.0}
testFindNoteEntries(com.xebia.shortnotes.domain.NoteIntegrationTest): command failed [command failed [count] { "assertion" : "unauthorized db:heroku_app10830648 ns:heroku_app10830648.note lock type:0 client:71.208.224.103" , "assertionCode" : 10057 , "errmsg" : "db assertion failure" , "ok" : 0.0}
testSaveNote(com.xebia.shortnotes.domain.NoteIntegrationTest): command failed [command failed [count] { "assertion" : "unauthorized db:heroku_app10830648 ns:heroku_app10830648.note lock type:0 client:71.208.224.103" , "assertionCode" : 10057 , "errmsg" : "db assertion failure" , "ok" : 0.0}
testDeleteNote(com.xebia.shortnotes.domain.NoteIntegrationTest): command failed [command failed [count] { "assertion" : "unauthorized db:heroku_app10830648 ns:heroku_app10830648.note lock type:0 client:71.208.224.103" , "assertionCode" : 10057 , "errmsg" : "db assertion failure" , "ok" : 0.0}
Tests run: 14, Failures: 0, Errors: 12, Skipped: 0
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
How do I use a different DB besides local in a mvn project.
[This post seems to be dormant, but I just ran into the same problem, and this is the top match in Google.]
I'm using a Spring/Roo/Mongo application which worked fine in "dev" mode, but when deployed to a cloud provider (OpenShift, CloudBees, Heroku, etc) and connecting to MongoHQ, the DB connections fail with the message:
command failed [command failed [count] { "ok" : 0.0 , "errmsg" :
"unauthorized"}
Turns out the problem is in the auto-generated applicationContext-mongo.xml file. You need to add the username and password attributes:
<mongo:db-factory dbname="${mongo.name}" host="${mongo.host}" id="mongoDbFactory" port="${mongo.port}" username="${mongo.username}" password="${mongo.password}"/>
Here's a (likely outdated) link to the official docs (if it helps): http://static.springsource.org/spring-data/data-mongo/docs/1.0.0.M5/reference/html/#d0e1210
One other tip: use spring.profiles.active to make your application select the correct credentials/configuration based on the dev-mode, or running within a specific cloud provider. It would be really nice if each PaaS would define a Java System Property like "current.paas=heroku" to make auto-configuration easier.

Resources