Frequently Asked Question
How to configure the FTP Export in Need4Viz solution
Last Updated 2 years ago
Symptom
- Configure Need4Viz services to enable FTP Export
- Configure a Need4Viz component to be exported in FTP destination
- FTP export is only possible in a PASSIVE mode
Environment
- Windows Server
- Need4Viz : all versions
Resolution
To configure Need4Viz services to enable FTP Export :
- Open the file ~Need4Viz_folder_installation/nodejs/node_modules/custom_element/ce_libs/config.js (make a backup copy before any update of this file)
- Set the export_FTP parameter to true (to enable the export FTP menu in the charts settings)
- Go to the //FTP Config section of this file
- Fill the FTPMode parameter : FTP or SFTP
- Fill the FTPHost parameter : the FTP server name
- Fill the FTPPort parameter : the FTP port, by default, set to 21
- Fill the FTPUser parameter : the user authorized to access the FTP destination
- Fill the FTPPass parameter : the password of the user authorized to access the FTP destination
- Fill the FTPBaseDir parameter : the root path set on the FTP server for the user. This parameter have to end with a '/'. If there is no specific root path defined, set '/'.
- Save the config.js file
- Restart the Need4Viz services
To configure a Need4Viz component to be exported in FTP destination (FTP Export is configured for Need4Viz services):
- In a Webi report, configure a new Need4Viz chart
- Validate the chart
- Open the Format Custom Element window of the chart and go to the Export FTP section
- Tick the Automatically export the chart (to enable the export for this chart)
- Fill the Path destination : path of the folder, under the FTPBaseDir folder on the FTP server. If the folder does not exist, it is created. Do not start with a '/' (for example : folder1/folder2)
- Fill the Name of the generated target HTML file : name of the exported html file in the destination folder (for example : myfile.html)
- Validate the settings
- Check in the FTP folder, the file is created
Possible issue
In case of file not created in the destination folder, check :
- FTP server is set as Passive mode
- The Need4Viz server can access to the FTP server (on the port specified)
- The FTPUser/FTPPass are set correctly and the user has the right to create a folder/file in the FTPBaseDir folder on the FTP server.
- If Need4Viz is installed in a root folder containing a space character (ex. "Program files"), you need to create a specific working directory without space or special char (Ex. C:/Need4Viz/data/ce_works) then in the config.js file, replace the line var WorkingPath = LocalCEPath+'/'+WorkingFolder+'/'; with var WorkingPath ='C:/Need4viz/data/'+WorkingFolder+'/'; and restart N4V services ("pm2 start all" in a PowerShell window).
- In the config.js file of N4V, check the LocalCEPath contains uniquely '/' directory separator (and no '\\') because WorkingPath variable mustn't mix '/' and '\\' characters.
To get more informations about the issue :
- Enable Debug mode in Need4Viz config.js file (set LogDebug parameter to true)
- Restart Need4Viz services
- Test again an FTP Export of your chart
- Open the~Need4Viz_folder_installation/log
- check the n4v_xxx_out.log and n4v_xxx_err.log file (where xxx is the service that should render the charts)