DevOps Assembly Info task Issues in build pipeline with .Net 6 Solution - azure-devops

All,
I am attempting to add an assembly info taskto a build pipeline for all projects in a .Net 6 solution.
The task is failing for some projects and succeeding with others and terminating with an error the logging for which is as follows
Setting .Net Core / .Net Standard assembly info...
Processing: D:\A\F5\_work\15\s\MyCompany.Core.Domain.Context\MyCompany.Core.Domain.Context.csproj
Detected file encoding: utf-8
##[error]Error reading file: null
Processing: D:\A\F5\_work\15\s\MyCompany.Identity.Api\MyCompany.Identity.Api.csproj
Detected file encoding: utf-8
Verify file encoding: iso-8859-2
Processing: D:\A\F5\_work\15\s\MyCompany.IdentityServer.Services\MyCompany.Identity.Services.IS4.csproj
Detected file encoding: iso-8859-1
Verify file encoding: iso-8859-1
ApplicationInsights:CorrelationIdManager [ { Error: connect ETIMEDOUT 52.138.227.130:443
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1099:14)
code: 'ETIMEDOUT',
errno: 'ETIMEDOUT',
syscall: 'connect',
address: '52.138.227.130',
port: 443 } ]
Issue 1: ##[error]Error reading file: null
Based on the fact that
successful processing of a .csproj file is accompanied by a 'Detected file encoding' a 'Verify file encoding'
failed processing of a .csproj file is accompanied by a 'Detected file encoding' only
I'm thinking this could be due to the encoding of the files?
If I inspect each of the processed project files in my solution on my laptop using Notepad++ I can see that MyCompany.Identity.Services.IS4.csproj, which appears to be processed successfully, is UTF-8 but the other two are UTF-8-BOM so there's not consistency there.
However if I look at the corresponding files copied to the build server, the encoding has changed.
The two that succeed are UTF-8 but the one that has the error ##[error]Error reading file: null is UTF-8-BOM.
Firstly, why is the encoding changing between being on my laptop, pushed to Azure Repos Git and then copied to the build server by the pipeline?
Secondly, why doe a file get detected with one encoding but verified as another, as is the case with MyCompany.Identity.Api.csproj
Finally, why is the UTF-8-BOMfile failing and how can I prevent this?
Issue 2: Error: connect ETIMEDOUT
I've no idea where to start with that one so any pointers would be gratefully received.
Thanks in advance

Related

Unable to view the contents of file in ansible managed nodes

I'm trying to view the contents of a file from managed node and control node, here I see the syntax works fine for localhost (172.17.254.200) but not for the remote hosts. Below is the task I have written using lookup / query plugin, can you please suggest the fix:
---
- name: Report Test
hosts: all
roles:
- patching
tasks:
- name: Display the Pre and Post check Differences
debug:
msg: "{{ query('file', '/tmp/check/{{ inventory_hostname }}_Comparison') }}"
Below is the output
TASK [patching : Display the Pre and Post check Differences] ***********************************************************************************************************
ok: [172.17.254.200] =>
msg:
- |-
free_m - YES
sysctl_all - YES
uptime - YES
[WARNING]: Unable to find '/tmp/check/172.17.254.207_Comparison' in expected paths (use -vvvvv to see paths)
fatal: [172.17.254.207]: FAILED! =>
msg: 'An unhandled exception occurred while running the lookup plugin ''file''. Error was a <class ''ansible.errors.AnsibleError''>, original message: could not locate file in lookup: /tmp/check/172.17.254.207_Comparison'
[WARNING]: Unable to find '/tmp/check/172.17.254.208_Comparison' in expected paths (use -vvvvv to see paths)
fatal: [172.17.254.208]: FAILED! =>
msg: 'An unhandled exception occurred while running the lookup plugin ''file''. Error was a <class ''ansible.errors.AnsibleError''>, original message: could not locate file in lookup: /tmp/check/172.17.254.208_Comparison'
Lookups are executed on Ansible controller (as pointed out by #Vladimir Botka). If you just want to view the contents of a file on remote hosts, you can cat the file through ansible and debug the stdout_lines.
- command: "cat /tmp/check/{{ inventory_hostname }}_Comparison"
register: file_cat
changed_when: false
- debug:
var: file_cat.stdout_lines
lookup and query "execute and are evaluated on the Ansible control machine."
Use slurp. Quoting:
This module returns an ‘in memory’ base64 encoded version of the file, take into account that this will require at least twice the RAM as the original file size.
For larger files use fetch. Quoting:
It is used for fetching files from remote machines and storing them locally in a file tree, organized by hostname.

OCI runtime exec failed: exec failed: container_linux.go:348 : starting container process caused "no such file or directory": unknown

I am trying to bringup my fabric network.
I got my orderers organization started.
I got my peer organizations started.
I got my cli started.
after that request is failing with
OCI runtime exec failed:
exec failed: container_linux.go:348 : starting container process caused "no such file or directory": unknown
The error means that either working_dir is undefined, or it does not exist.
Czeck the cli section in your docker-compose file for the above setting.
If you are working on Windows OS, a possible cause is the file encoding (should be in Unix format).
You could open this page:
https://hyperledger-fabric.readthedocs.io/en/latest/build_network.html
And search "No such file or directory". There is some related trouble shooting.
Just a short description:
Ensure that the file in question is encoded in the Unix format. This was most likely caused by not setting core.autocrlf to false in your Git configuration. There are several ways of fixing this. If you have access to the vim editor for instance, open the file:
vim ./path/to/the/related-file
Then change its format by executing the following vim command:
:set ff=unix

Camel FTP: directory name with umlaut

I'm working with camel-ftp and I have problems with German umlauts (e.g. Ö) in the directory name to connect to the FTP-Server. I can't rename this directory because it's a working directory of the company.
I use camel.version: 2.18.1 and camel-ftp.version: 2.18.1.
I configured following route (in the route I defined the directory which contains the umlaut with the unicode character \u00d6 for Ö):
from(ftp://user#hostname:21/etc/\u00d6ffentlicherOrdner/test?password=pwd).routeId("kurse").to(...)
Error message:
Consumer FtpConsumer[ftp://user#hostname:21/etc//0�ffentlicherOrdner/test?password=xxxxxx]
failed polling endpoint: ftp://ftp://user#hostname:21/etc/0�ffentlicherOrdner/test?password=xxxxxx.
Will try again at next poll.
Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException -
File operation failed: 550 �ffentlicherOrdner: Das System kann die angegebene Datei nicht finden.
When I extend the route with the following parameters:
&ftpClient.controlEncoding=ISO-8859-15
&charset=ISO-8859-15
&consumer.bridgeErrorHandler=true
Then I get the output that everything seems fine, because I didn't get any error message:
Route: kurse started and consuming from: ftp://user#hostname:21/etc/ÖffentlicherOrdner/test?charset=ISO-8859-1&consumer.bridgeErrorHandler=true&ftpClient.controlEncoding=ISO-8859-1&password=xxxxxx
But now no files are polled. I have some files in test directory but when i start the process it isn't pushing the files to the endpoint.
I don't understand why it is not consuming the files? Maybe the encoding is still wrong?
EDIT:
I was so fixed concerning the encoding that I missed to check the FTP properties.
The solution of my problem was to set the passiveMode:
&passiveMode=true

Crowdin error when I tried to upload translations

I've an issue (I'm still blocked), I've created my configuration file like :
project_identifier: test
api_key: KeepTheAPIkeySecret
base_url: https://api.crowdin.com
base_path: /path/to/your/project
files:
-
source: /locale/en/LC_MESSAGES/messages.po
translation: /locale/%two_letters_code%/LC_MESSAGES/%original_file_name%
See : https://github.com/crowdin/crowdin-cli
However, I received an error message when I execute my command line to upload translation in Crowdin :
error: Seems Crowdin server API URL is not valid.
Please check the `base_url` parameter in the configuration file.
I don't know why it's not working!Thanks for any help !
Crowdin sent me another JAR,
The last one was not good for windows path.

FATAL org.apache.hadoop.conf.Configuration - error parsing conf file: org.xml.sax.SAXParseException

I'm trying to run pig locally, installed using homebrew, to test a script. However, I get the following error when I attempt to run a simple dump from the interactive prompt pig -x local:
2012-07-16 23:20:40,447 [Thread-7] INFO org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths (combined) to process : 1
[Fatal Error] :63:85: Character reference "&#2" is an invalid XML character.
2012-07-16 23:20:40,688 [Thread-7] FATAL org.apache.hadoop.conf.Configuration - error parsing conf file: org.xml.sax.SAXParseException: Character reference "&#2" is an invalid XML character.
The same load/dump works fine on Elastic MapReduce.
I can't find any XML config files, and I've tried with both version 0.9.2 and 0.10.0
What am I missing?
Edit: Just checked a direct download (vs. homebrew) and it doesn't seem to work either
You should check that your Hadoop configuration files have correct configuration data.
Have a look in your hadoop/conf directory.
Have a look inside:
hdfs-site.xml
mapred-site.xml
core-site.xml
Finally worked out what the problem was. I ended up having to use dtruss -p on the pig/java process. This revealed a temporary directory and dynamically generated xml files. Once the temporary directory was discovered, it all fell quickly into place.
It was picking up the proxy excludes from my network connections, which had, as far as I can tell, &#2 (http://www.fileformat.info/info/unicode/char/02/index.htm) embedded in it. How this invalid value came to be in my network preferences in the first place, I haven't the faintest clue.
The value was then being pulled into dynamically generated files, for example /tmp/hadoop-vertis/mapred/staging/vertis-1005847898/.staging/job_local_0001/job.xml.
The offending lines:
<property><name>ftp.nonProxyHosts</name><value>localhost|*.localhost|127.0.0.1|h|*.h</value></property>
<property><name>socksNonProxyHosts</name><value>localhost|*.localhost|127.0.0.1|h|*.h</value></property>
<property><name>http.nonProxyHosts</name><value>localhost|*.localhost|127.0.0.1|h|*.h</value></property>