Re: Unable to Run jenkins job on zos slave

73 views
Skip to first unread message

Adharsha sri

unread,
Oct 20, 2021, 9:36:02 AM10/20/21
to jenkins...@googlegroups.com
I am unable to run a jenkins job ( shell command : date) on zos slave . The slave is active and online but getting some gibberish values in console output. Please help.

On Wed, 20 Oct 2021, 18:53 Adharsha sri, <adharsh...@gmail.com> wrote:
Hi Team,

I am unable to run a jenkins job ( shell command : date) on zos slave . The slave is active and online but getting some gibberish values in console output. Please help.

Adharsha sri

unread,
Oct 21, 2021, 9:26:33 AM10/21/21
to jenkins...@googlegroups.com
Can you please help me for this issue

Fabian Cenedese

unread,
Oct 25, 2021, 6:26:18 AM10/25/21
to jenkins...@googlegroups.com
At 14:21 21.10.2021, you wrote:

>Can you please help me for this issue
>
>On Wed, 20 Oct 2021, 18:53 Adharsha sri, <<mailto:adharsh...@gmail.com>adharsh...@gmail.com> wrote:
>Hi Team,
>
>I am unable to run a jenkins job ( shell command : date) on zos slave . The slave is active and online but getting some gibberish values in console output. Please help.

Please post the "gibberish".

bye Fabi

Adharsha sri

unread,
Oct 25, 2021, 7:40:08 AM10/25/21
to jenkins...@googlegroups.com
+□?EA/¤
Some thing like above 

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/20211025102601.192AF48935CC%40macserver.private.
image-2019-05-08-09-49-55-527.png

Adharsha sri

unread,
Oct 25, 2021, 7:42:54 AM10/25/21
to jenkins...@googlegroups.com
We are running just date command or simple echo command  through execute shell but not getting the actual output

Adharsha sri

unread,
Oct 25, 2021, 7:49:52 AM10/25/21
to jenkins...@googlegroups.com
Can you please consider this as priority. Actually  it is critical issue for us.
Whether z/ os platform is supported for jenkins or not . If it is supported, where we are missing and why we are not getting the output. Please help on this issue. 

geoffroy...@gmail.com

unread,
Oct 25, 2021, 1:59:52 PM10/25/21
to Jenkins Users
Hi
have you checked this page (first results in google): https://gdams.medium.com/adding-zos-to-our-jenkins-build-farm-27ab5171fb35
Seems you might need to tune the JVM options, using  -Dfile.encoding=ISO8859-1

Adharsha sri

unread,
Oct 25, 2021, 10:27:21 PM10/25/21
to jenkins...@googlegroups.com
Yes , based on that page , we have configured the slave. But still facing the same issue.

geoffroy...@gmail.com

unread,
Oct 26, 2021, 1:50:36 AM10/26/21
to Jenkins Users
can you please show a screenshot of the zos agent configuration (all fields)?

Adharsha sri

unread,
Oct 26, 2021, 2:34:50 AM10/26/21
to jenkins...@googlegroups.com
Number of executors: 1
Launch method: launch agents via SSH
Host: host name
Host key verification strategy: Non verifying verification strategy 

Port : 22

Java path: /usr/lpp/java/J8.0/bin/Java

JVM Options: -Dfile.encoding=ISO8859-1 -Djava.io.tmpdir=/usr/lpp/test

Prefix start Agent command:
export JAVA_HOME =/usr/lpp/java/J8.0/ && export  IBM_JAVA_ENABLE_ASCII_FILETAG=ON && _BPXK_AUTOCVT=ON &&

Suffix start Agent command:
 -text

Connection timeout  in seconds:210


Ivan Fernandez Calvo

unread,
Oct 26, 2021, 2:21:59 PM10/26/21
to Jenkins Users
This is the output you see in the browser, isn't it? Did you try to download the "view as plain text" button output in a file and with an editor trying to find the correct encoding? the encoding you set in the Agent is only from Java process launched from the remoting thread, I mean is you launch a script in a job this script will use the encodings setting you have configured in the user you use to connect if in your .bashrc (or other shell configuration) you choose other encodings different than UTF-8 you will have issues showing the build logs. In these cases I use to try to run a job that shows me the effective environment I am running the job by using the command `export`, `set`, or both, then I check the TERM, LC_* and LANG setting in that user.

Adharsha sri

unread,
Oct 26, 2021, 10:35:02 PM10/26/21
to jenkins...@googlegroups.com
Can you please provide an example.

Adharsha sri

unread,
Oct 27, 2021, 3:13:59 AM10/27/21
to jenkins...@googlegroups.com
The Configuration  from agent is fine right, but it will be useful only when we run the jave script. So for shell commands we need to check .bashrc file in the agent server. Can you please provide the screenshot of the .bashrc file and please provide the script  you are using and examples of export and set. This will be very helpful for us.

Thanks.

Ivan Fernandez Calvo

unread,
Oct 27, 2021, 3:48:31 AM10/27/21
to Jenkins Users
This is a pretty simple pipeline to expose your environment settings

pipeline {
    agent { label 'YOUR_AGENT_LABELS' }
    stages {
        stage('test') {
            steps {
              sh 'export'
              sh 'set'

Adharsha sri

unread,
Oct 27, 2021, 5:09:10 AM10/27/21
to jenkins...@googlegroups.com
Thanks for the sample pipeline but getting error like " process apparently  never started in path
( running jenkins temporarily  with -Dorg.jenkinsci.plugins.durabletask.BourneshellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer).

Thanks.

Adharsha sri

unread,
Oct 27, 2021, 6:42:40 AM10/27/21
to jenkins...@googlegroups.com
Can anyone help on this error

Adharsha sri

unread,
Oct 27, 2021, 9:01:08 AM10/27/21
to jenkins...@googlegroups.com
Able to run the echo commands but not able to run the shell commands

Ivan Fernandez Calvo

unread,
Oct 27, 2021, 9:15:40 AM10/27/21
to Jenkins Users
the echo step is pure Groovy, however, the sh step uses bash, so probably you do not have bash in the PATH of that user, check that bash is installed and that user can use it.

Adharsha sri

unread,
Oct 27, 2021, 12:41:08 PM10/27/21
to jenkins...@googlegroups.com
Thank you , will check on that part.

Adharsha sri

unread,
Oct 28, 2021, 7:38:06 AM10/28/21
to jenkins...@googlegroups.com
Now I am able run shell commands using pipeline job but unable to run using freestyle job. Will there be any difference 

Ivan Fernandez Calvo

unread,
Oct 28, 2021, 12:20:58 PM10/28/21
to Jenkins Users
should not, the FreeStyle "Execute shell" step and the Pipeline sh step work more or less in the same way, I never see a fail one when the other works. In any case, it is difficult to help you if you do not provide more info about what you did, what does not work exactly, Why does not work, what error you see in the Jenkins logs (if any), what error you see in the build logs(if any), What did you change in the Agents, and so on. 

Adharsha sri

unread,
Oct 29, 2021, 1:21:49 AM10/29/21
to jenkins...@googlegroups.com
Hi,

In /etc/profile added the below bash environment variables
export _CEE_RUNOPTS=“FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)”
export _BPXK_AUTOCVT=ON
export _TAG_REDIR_ERR=txt
export _TAG_REDIR_IN=txt
export _TAG_REDIR_OUT=txt


And then able to run the below pipeline job 

node('hostname')
{
stage('test')
{
sh "pwd"
sh " hostname"
sh "date"
}}

But when running the below freestyle job , gettingerror

Execute shell:
date

Error:

+□?A/EA
/tmp/jenkjns123456789.sh 1: FSUM7351 not found 







kuisathaverat

unread,
Oct 29, 2021, 3:30:34 AM10/29/21
to jenkins...@googlegroups.com
Did you test other commands in the Freestyle job? try this

#!/bin/bash
pwd
echo foo
date



You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/8Vu26aozllE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJWGB6pHFzYZZSsTmCFApiP1pUD3GddiFqAy8pj6KX5cLvYS0A%40mail.gmail.com.


--

Adharsha sri

unread,
Nov 1, 2021, 12:57:33 AM11/1/21
to jenkins...@googlegroups.com
Yes, please find the below output.

FSUM7343 cannot open □?EC□?¤IA for output : no such file or directory.

Ivan Fernandez Calvo

unread,
Nov 1, 2021, 6:51:20 AM11/1/21
to Jenkins Users
This is an Error of zOS I dunno which file is trying to open, I doubt that you can even run the script in an SSH session with something like this

Try the following in a machine with access by SSH to the zOS Agent, 
create a hello.sh file locally with the script

pwd
echo foo
date

Execute an ssh command like this (you have to change the access method, user, and host)

ssh AGENT_USER@LINUX_IP 'sh -s' < hello.sh

ssh AGENT_USER@LINUX_IP 'bash -s' < hello.sh

I am not wrong you will see the same error 

this is a similar issue I have found in a IBM forum https://ibmmainframes.com/about67532.html

Adharsha sri

unread,
Nov 6, 2021, 2:05:21 AM11/6/21
to jenkins...@googlegroups.com
I am able to execute  in this method and got the correct output without issues manually on the server. But facing issues only while using freestyle job.

Reply all
Reply to author
Forward
0 new messages