File Integration Troubleshooting¶
This guide helps diagnose and resolve common issues with file integration in WSO2 Integrator: BI, covering local directory monitoring, FTP, FTPS, and SFTP connections.
FTP connection issues¶
1. FTP server not available¶
Symptoms
- Connection failures when starting the integration
- Timeout errors during connection attempts
Error message
error: Failed to initialize File server connector. Could not connect to FTP server on "localhost".
Possible causes
- FTP server is not running
- FTP server is not reachable from the application host
- Network firewall blocking FTP ports
Resolution
- Start the FTP server if it's not running
- Check network connectivity and firewall rules
- Verify the
ftpHostandftpPortconfiguration values
2. Invalid FTP credentials¶
Symptoms
- Authentication failures during connection
- Access denied messages
Error message
error: Failed to initialize File server connector. Could not connect to FTP server on "localhost".
Possible causes
- Incorrect FTP username
- Incorrect FTP password
- User account locked or disabled
Resolution
- Verify
ftpUserandftpPasswordvalues inConfig.toml - Ensure the FTP user account is active and has proper permissions
- Test credentials manually using an FTP client
3. Invalid or nonexistent directory path¶
Symptoms
- Integration fails to start
- Directory access errors
Error message
error: Failed to initialize File server connector. Could not determine the type of file "ftp://ftpuser:***@localhost/sales/new"
Possible causes
- The configured
pathdoes not exist on the FTP server - Insufficient permissions to access the directory
- Path syntax is incorrect (missing leading
/)
Resolution
- Create the required directories on the FTP server
- Ensure the path in the listener configuration matches the actual FTP directory structure:
path = "/sales/new" // Must match FTP directory - Verify directory permissions and user access rights
File detection issues¶
1. Wrong file name pattern¶
Symptoms
- Application starts successfully without errors
- Files in the monitored directory are not being processed
- No log messages indicating file detection
- Console shows "Running executable" with no further output
Possible causes
fileNamePatterndoes not match the actual file names- Pattern syntax is incorrect
- Case sensitivity issues
Diagnosis steps
- Check the configured pattern in your integration:
fileNamePattern = ".*.json" // Matches any .json file - Verify file names in the target directory:
Common pattern examples:
| Pattern | Matches | Does NOT Match |
|---|---|---|
.*.json |
file.json, test.json |
file.xml, data.txt |
.*.xml |
file.xml, data.xml |
file.json |
sales_.*.json |
sales_2024.json |
report_2024.json |
Resolution
- Update the
fileNamePatternto match your file naming convention - Remember that pattern uses regex syntax (
.matches any character,*means zero or more) - Test pattern matching with sample files