Camel FTP: directory name with umlaut - encoding

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

Related

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

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

Why can't i create a GPO to install a .msi to clients?

(I am using a german Windows Server 2019, so bear with me. I try to translate everything to recognizable english ui equivalents)
The goal is to create a GPO to install a .msi file to client computers. Everytime I try to create the GPO, it says
Add operation failed. Unable to extract deployment information from the package. Run validation on the package to ensure that the package is correct.
The Windows Event Log outputs a warning and then an error(translated by me).
Warning:
Warning: Event 119, Software Installation
While reading the msi file \\dc1\gpo\Install\AnyDesk_Client_v2.msi, an unexpected error occured. The error is not severe enough to cancel the operation. The following error occured: The operation was completed successfully
Original german text:
Beim Lesen der MSI-Datei \\dc1\gpo\Install\AnyDesk_Client_v2.msi ist ein unerwarteter Fehler aufgetreten. Der Fehler ist nicht schwerwiegend genug, um den Vorgang abzubrechen. Folgender Fehler ist aufgetreten: Der Vorgang wurde erfolgreich beendet.
Error:
Error: Event 103, Software Installation
The Software Installation could not deliver/prepare the package AnyDesk_Client_v2.msi. The following error occured: The directory name is invalid
Original german text:
Die Softwareinstallation konnte das Paket AnyDesk_Client_v2.msi nicht bereitstellen. Folgender Fehler ist aufgetreten: Der Verzeichnisname ist ungültig.
What I tried:
Using another msi. Used the standard Anydesk.msi (so no "_" in the filename). I tried the Teams x64 .msi from MS Teams MSI Download. I tried a Futuremark_SystemInfo.msi I had
lying around.
I put all the files in \dc1\NETLOGON and tried again. I put all the files in \dc1\SYSVOL and tried again. I checked that authenticated users had access to the share. I logged on directly on the Domain Controller as Domain Admin via RDP. I logged directly on the Domain Controller via VMRC (it's a virtual environment). I checked if I can access the shares I put the .msi's in (I can). I got a tip that says
Go to Default Domain Controllers Policy
Expand Computer Configuration\Windows Settings\Administrative Templates\System\Netlogon
Change the Netlogon and Sysvol Compatibility to enabled (2 seperate settings)
This does not work because there is no Computer Configuration\Windows Settings\Administrative Templates - it is Computer Configuration\Administrative Templates. But there is no setting to enable NETLOGON/SYSVOL Compatibility underComputer Configuration\Administrative Templates. I assume this is a tip relating to an older Windows Server version.

setting dropbox as custom backp on whm/cpanel error

I am trying to set dropbox as custom backup destination following below cpanel blog. The connection is working, but the backup files are not being transferred to DropBox. And when I press validate to custom backup destination it gives following error .
https://blog.cpanel.com/cpanel-whm-custom-backup-transport-example-dropbox/
Error: Validation for transport “dropbox” failed: Could not list files in
destination: Executed /usr/local/bin/backup_transport_dropbox.pl ls /
remotehost remoteuser : 2018-08-26T15:54:21 [WebService::Dropbox] [ERROR]
https://api.dropboxapi.com/2/files/list_folder {"path":"/"} -> [400] Error in
call to API function "files/list_folder": request body: path: Specify the root
folder as an empty string rather than as "/". at
/usr/local/share/perl5/WebService/Dropbox.pm line 184.
I am new to dropbox api and have no idea of perl so could not figure out what is discusses on below links.
https://github.com/silexlabs/unifile/issues/77
The error message is correctly indicating that the Dropbox API expects the value "" when referring to the root alone. The code is instead sending the value "/". This looks like a bug in the code.
It looks like you've already opened an issue with the developer for this:
https://github.com/CpanelInc/backup-transport-dropbox/issues/3
They should update the code to use "" when referring to the root folder on Dropbox.

error while reading mails in camel

<camel:from uri="pop3://125.55.100.14?username=test#mydomain.com&consumer.delay=30000&mapMailMessage=false&delete=true&unseen=true&password=test"/>
I am using this route to read mail from my mailbox
However i m getting following error,
*javax.mail.AuthenticationFailedException*: The system was unable to log test#mydomain.com in. Maildrop (file ) can not be located or opened. Please contact your POP3 administrator.
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:208)[84:javax.mail:1.4.5]
at javax.mail.Service.connect(Service.java:317)[84:javax.mail:1.4.5]
at org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:376)[218:org.apache.camel.camel-mail:2.10.0.fuse-71-047]
at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:82)[218:org.apache.camel.camel-mail:2.10.0.fuse-71-047]
at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:142)[129:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)[129:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_21]
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)[:1.7.0_21]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)[:1.7.0_21]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)[:1.7.0_21]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_21]
at java.lang.Thread.run(Thread.java:722)[:1.7.0_21]
please help me
It's strange that it says Maildrop (file ) without naming the file. It should be Maildrop (file mail\xxxx) or something similar. So, my first guess is that this error hasn't to do anything with the Camel configuration.

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>