[
https://issues.apache.org/jira/browse/CAMEL-27078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-27078 started by Federico Mariani.
------------------------------------------------
> camel-smb - a starting directory that cannot be created is logged as a
> failure to connect, or not at all
> --------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27078
> URL: https://issues.apache.org/jira/browse/CAMEL-27078
> Project: Camel
> Issue Type: Bug
> Components: camel-smb
> Reporter: Federico Mariani
> Assignee: Federico Mariani
> Priority: Minor
> Fix For: 4.24.0
>
>
> When the smb consumer connects but cannot create its starting directory
> ({{autoCreate=true}}, the default), the poll logs {{Cannot connect/login to:
> smb://user@host:445. Will skip this poll.}}, as if the server could not be
> reached. When that WARN was already logged by an earlier poll that could not
> connect, nothing is logged at all. The reason (such as
> {{STATUS_ACCESS_DENIED}}) is only logged at DEBUG.
> {{SmbConsumer.prePollCheck}} has a WARN for this case, {{Cannot auto-create
> starting directory at: ...}}, but it is never logged: the catch block sets
> {{loggedIn = false}}, so the {{loggedIn && !autoCreatedDone}} check after it
> is always false. CAMEL-27019 fixed the same code in {{RemoteFileConsumer}}
> (ftp, ftps, sftp, mina-sftp).
> {code:java}
> // the server cannot be reached when the route starts; later it can,
> // but the user is not allowed to create the directory inbox in the share
> from("smb:host/share/inbox?username=camel&password=secret")
> .to("log:in");
> // WARN Error auto creating directory: inbox due Cannot connect to: host:445
> due to: Connection refused. This exception is ignored.
> // WARN Cannot connect/login to: smb://camel@host:445. Will skip this poll.
> // then nothing, while every poll is skipped
> {code}
> Expected, as the ftp consumers do since CAMEL-27019: {{Cannot auto-create
> starting directory inbox at: smb://camel@host:445 due to:
> STATUS_ACCESS_DENIED (0xc0000022): Create failed for \\host\share\inbox. Will
> skip this poll.}}, logged once, and the {{Cannot connect/login to: ...}} WARN
> gives the reason too.
> _Claude Code on behalf of Federico Mariani_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)