Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Hugo_vd_Kooij
Advisor
Jump to solution

R81.20 Jumbo Hotfix Take and cp_log_export

Did anyone else notice that after installing Jumbo Hotfix Take 99 on the Management server that the cp_log_export command no longer works?

When comparing with another management system we found out that before Take 99 the file is a bash script. But after that just a text file with uncode characters and very long lines.

Before:

/opt/CPrt-R81.20/bin/cp_log_export: Bourne-Again shell script text executable

After:

/opt/CPrt-R81.20/bin/cp_log_export: UTF-8 Unicode English text, with very long lines

TAC is looking into it (6-0004261935)

 

<< We make miracles happen while you wait. The impossible jobs take just a wee bit longer. >>
2 Solutions

Accepted Solutions
Meital_Natanson
Employee
Employee

Hi,

We've identified the issue - it's a cosmetic issue.
As a temporary workaround, you can run the following command:
dos2unix /opt/CPrt-R81.20/bin/cp_log_export
A fix will be included in a future Jumbo Hotfix release.

Thanks,
Meital

View solution in original post

Hugo_vd_Kooij
Advisor

# file /opt/CPrt-R81.20/bin/cp_log_export
/opt/CPrt-R81.20/bin/cp_log_export: UTF-8 Unicode English text, with very long lines


# dos2unix /opt/CPrt-R81.20/bin/cp_log_expor
dos2unix: converting file /opt/CPrt-R81.20/bin/cp_log_export to Unix format ...


# file /opt/CPrt-R81.20/bin/cp_log_export
/opt/CPrt-R81.20/bin/cp_log_export: Bourne-Again shell script text executable

<< We make miracles happen while you wait. The impossible jobs take just a wee bit longer. >>

View solution in original post

0 Kudos
16 Replies
Henrik_Noerr1
Advisor

Thanks for the info. We see the same behaviour with 'file'.

The command throws an error in the first line, but seem to work though.

[Expert@test-mds-01:0]# cp_log_export show
/opt/CPrt-R81.20/bin/cp_log_export: line 1: #!/bin/bash: No such file or directory
 

 

 

0 Kudos
Amir_Senn
Employee
Employee

Interesting, It doesn't recognize a very common first line.

If you're willing to try something it's worth a shot:

1) Create a copy of the original: cp -v /opt/CPrt-R81.20/bin/cp_log_export /opt/CPrt-R81.20/bin/cp_log_export.ORIG

2) Run dos2unix: dos2unix /opt/CPrt-R81.20/bin/cp_log_export

If this works, great. If not, return to original file.

Kind regards, Amir Senn
0 Kudos
Bob_Zimmerman
Authority
Authority

This is likely the immediate problem, yes. Windows (and DOS) uses two characters to end a line in a text file: Carriage Return, and Line Feed. UNIX (and Linux) uses only Line Feed. If the file actually has Windows line endings, the shebang would tell the system to interpret the script using not '/bin/bash', but '/bin/bash[CR]', which definitely doesn't exist.

0 Kudos
Patrick_Jung
Contributor

Yes, Amir.

I used the dos2unix method you provided and was able to eliminate the #!/bin/bash: No such file or directory message.

When I run the command dos2unix /opt/CPrt-R81.20/bin/cp_log_export, I get the following message:

dos2unix: converting file /opt/CPrt-R81.20/bin/cp_log_export to Unix format...
After that, the error message no longer appears.

 

Regards,
Patrick Jung.

0 Kudos
the_rock
Legend
Legend

From my lab...do you see similar permissions? If not, maybe do chmod 777 on it.

Andy

[Expert@CP-MANAGEMENT:0]# cd $RTDIR/bin
[Expert@CP-MANAGEMENT:0]# ls -lh cp_log_export
-rwxr-x--- 1 admin root 57K Apr 20 09:20 cp_log_export
[Expert@CP-MANAGEMENT:0]#

0 Kudos
Patrick_Jung
Contributor

Hi everyone,

I also recently encountered the message /opt/CPrt-R81.20/bin/cp_log_export: line 1: #!/bin/bash: No such file or directory after installing R81.20 T99.

At first, I opened an SR, then thought I had resolved the issue by copying the cp_log_export file from another SMS running R81.20. However, the same message appeared again on a different SMS.

The important point is that I believe this is a cosmetic issue, since the message appears on both servers where the log exporter is working correctly and those where it is not.

0 Kudos
Amir_Senn
Employee
Employee

Have you tried the WA offered here in this thread? (dos2unix)

Kind regards, Amir Senn
0 Kudos
Patrick_Jung
Contributor

Yes, when I used dos2unix, it showed a conversion message, and the #!/bin/bash: No such file or directory message no longer appeared.
I was able to eliminate the message using the solution you provided.

Thank you, Amir.

0 Kudos
the_rock
Legend
Legend

MDS or regular mgmt? 

Andy

0 Kudos
Patrick_Jung
Contributor

I experienced this on two regular management servers running R81.20 T99.

0 Kudos
Henrik_Noerr1
Advisor
 

Also this..

cplog.png

0 Kudos
Meital_Natanson
Employee
Employee

Hi,

We've identified the issue - it's a cosmetic issue.
As a temporary workaround, you can run the following command:
dos2unix /opt/CPrt-R81.20/bin/cp_log_export
A fix will be included in a future Jumbo Hotfix release.

Thanks,
Meital

Hugo_vd_Kooij
Advisor

# file /opt/CPrt-R81.20/bin/cp_log_export
/opt/CPrt-R81.20/bin/cp_log_export: UTF-8 Unicode English text, with very long lines


# dos2unix /opt/CPrt-R81.20/bin/cp_log_expor
dos2unix: converting file /opt/CPrt-R81.20/bin/cp_log_export to Unix format ...


# file /opt/CPrt-R81.20/bin/cp_log_export
/opt/CPrt-R81.20/bin/cp_log_export: Bourne-Again shell script text executable

<< We make miracles happen while you wait. The impossible jobs take just a wee bit longer. >>
0 Kudos
the_rock
Legend
Legend

Good to know @Meital_Natanson 

0 Kudos
Hugo_vd_Kooij
Advisor

Expect sk183429 to document this behaviour.

<< We make miracles happen while you wait. The impossible jobs take just a wee bit longer. >>
the_rock
Legend
Legend

I guess it will be new sk, since it does not show up if I search it in KB.

Andy

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events