FTP Configuration
This document will use the actual root cause analysis information to make a generic view that can be used if you run into the same or similar problem. Finally, the document will describe the situation, the problem, the analysis, and the result.
Should you have any questions, please get in touch with academy@emagiz.com.
1. Situation
The user was confronted with a seemingly broken connection between an FTP and eMagiz. This was indicated by a need for more messages retrieved from the FTP without explicit errors in eMagiz.
2. Problem
In this instance, no files were picked up from an FTP and processed by eMagiz. This warranted more investigation.
3. Analysis
3.1 Reproduction
To reproduce the issue, we looked at the configuration of the FTP component on the flow level responsible for setting up the connection between the FTP and eMagiz in the " broken " flow. In this flow, we noticed a filter when retrieving files from the FTP and placing them in the local directory. However, there was no filter for retrieving data from the local directory. This means that messages can get stuck in this local directory if they pass the first filter but not the default filter (accept only once) on the local folder.
This is a problem because when one message is halted, and you only retrieve one message at a time, eMagiz will continuously try to process that file and see it fail, which will stop the process, which happened in this instance.
3.2 Analysis
Apart from the reason mentioned above, with the filters not matching, it can also be that the FTP connection is not working due to an incorrect configuration of the connection settings to the FTP. Always check the following settings when dealing with an FTP:
- Value for the host
- Value for the port
- Value for the username
- Value for the password
- Ensure that passive mode is activated (current-generation architecture on docker)
4. Result
After fixing the filter mismatch between points A and B in the flow, the message came in again. In other cases, we needed to change the configuration to passive mode after migrating to the current-generation architecture (G3).