Hybris hotfolder import by FTP does not create cronjob - spring

When I send file by FTP to hotfolder path directly, import cronjob cannot be created. It moves to the file to archive folder as it is successfully imported.
I can see it triggered CleanupTask without creating impex import cronjob.
Setting tenant <<master>> on the current thread Thread[task-scheduler-7,5,main]
Processed CustomHeaderInitTask.execute [header=de.hybris.platform.acceleratorservices.dataimport.batch.BatchHeader#306f39fd[file=/app/hybris_commerce/hybris/data/acceleratorservices/import/master/apparel/product/processing/hotfolderFileName-jp-en-202212150552.csv,catalog=catalogName,language=ja_JP,net=false]] in 4ms
Setting tenant <<master>> on the current thread Thread[task-scheduler-7,5,main]
Processed ImpexTransformerTask.execute [header=de.hybris.platform.acceleratorservices.dataimport.batch.BatchHeader#306f39fd[file=/app/hybris_commerce/hybris/data/acceleratorservices/import/master/apparel/product/processing/hotfolderFileName-jp-en-202212150552.csv,catalog=catalogName,language=en,net=false]] in 4ms
Setting tenant <<master>> on the current thread Thread[task-scheduler-7,5,main]
Processed HotFolderImpexRunnerTask$$EnhancerBySpringCGLIB$$af2492be.execute [header=de.hybris.platform.acceleratorservices.dataimport.batch.BatchHeader#306f39fd[file=/app/hybris_commerce/hybris/data/acceleratorservices/import/master/apparel/product/processing/hotfolderFileName-jp-en-202212150552.csv,catalog=catalogName,language=en,net=false]] in 0ms
Setting tenant <<master>> on the current thread Thread[task-scheduler-7,5,main]
Processed CleanupTask.execute [header=de.hybris.platform.acceleratorservices.dataimport.batch.BatchHeader#306f39fd[file=/app/hybris_commerce/hybris/data/acceleratorservices/import/master/apparel/product/processing/hotfolderFileName-jp-en-202212150552.csv,catalog=catalogName,language=en,net=false]] in 1ms
But if I send file to FTP user's home folder and copy it via cp command to the hotfolder path, it imports successfully. It creates cronjob, I can see changes on backoffice.
What is difference between sending files directly to hotfolder path and copying them in the server by command? Also, I tried another environment, it works as expected even if I send it directly to the hotfolder path by FTP.

Related

Windows Task Scheduler wont run ren command, but cmd.exe will

I am creating a task that executes a batch file for ftp uploads.
The batch script just renames any file in a certain folder to an appropriate name, then uploads that folder.
I have set the task to run under a service account, when I log in with the service account and run the .bat file it works perfectly. When I run the task scheduler it runs the .bat file but the log shows that the ren command doesn't work.
Here is the output from the log after being invoked via task scheduler:
c:\TEMP\Bulletin>rename "R:\x\x\x\*.pdf" Bulletin.pdf
c:\TEMP\Bulletin>chdir c:\Program Files (x86)\WinSCP
c:\Program Files (x86)\WinSCP>WinSCP.com /ini=nul /script=c:\TEMP\Bulletin\bulletin.tmp
Searching for host...
Connecting to host...
Authenticating...
Using username "svc-bulletin".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Session started.
Active session: [1] svc-bulletin#x.x.x
File or folder 'C:\FileShares\Drive-R\x\x\x\Bulletin.pdf' does not exist.
System Error. Code: 2.
The system cannot find the file specified
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort
c:\Program Files (x86)\WinSCP>exit
Here is the output from just manually invoking the .bat file:
C:\TEMP\Bulletin>rename "R:\x\x\x\*.pdf" Bulletin.pdf
C:\TEMP\Bulletin>chdir c:\Program Files (x86)\WinSCP
c:\Program Files (x86)\WinSCP>WinSCP.com /ini=nul /script=c:\TEMP\Bulletin\bulletin.tmp
Searching for host...
Connecting to host...
Authenticating...
Using username "svc-bulletin".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Session started.
Active session: [1] svc-bulletin#x.x.x
C:\FileShares\Drive-R\x\x\x\Bulletin.pdf | 957 KB | 1390.5 KB/s | binary | 100%
c:\Program Files (x86)\WinSCP>exit
I am running the task with full permissions and have also tried starting it in the same directory as the .bat and without, neither works. Appreciate any pointers/ideas.
I'm, assuming R: is a mapped drive. Mapped drives are established when a user logs on as they are only mapped for the user that did the mapping. The service account doesn't know anything about mapped drives that are mapped under your account. To complicate the issue the task may be running under S4U authentication depending on your task settings so you won't have access to network resources. That also eliminates using a UNC rather than a mapped drive. See technet.microsoft.com/en-us/library/cc722152(v=ws.11).aspx

BEA-141297 - Could not get the server file lock

Following error is encountered when trying to start Oracle Weblogic Server:
<Info> <Management> <BEA-141297> <Could not get the server file lock. Ensure that another server is not running in the same directory. Retrying for another 60 seconds.>
How do I overcome this error and start the server?
The error means that there is a file lock that could not be released, as the server was previously not shut down correctly.
In this case you must follow the next steps:
Navigate to tmp folder in your $DOMAIN_HOME directory. (for example: C:\Oracle\Middleware\Oracle_Home\user_projects\domains\mydomain\servers\AdminServer\tmp)
Delete the lock file for the server instance, AdminServer.lok
Check if there are any java.exe processes are running, which should not be there. If there are any, they would have to be killed.
Restart your server

Laravel Beanstalkd job cannot connect to remote server via ssh

I've got a workflow in my web application that looks like this (Built in Laravel 4):
1) User uploads a file (up to 50mb or so)
2) File is moved to temp directory
3) Queued job created that does the following:
- Uploads file to amazon s3
- SSH into another file processing server and transfers the file to a folder there.
- Delete the temporary file
To connect to the remote server and upload the file within the queued job, I'm using:
SSH::into('processing')->put($localPath, $remotePath);
Everything works fine when I queue this job using the 'sync' driver, so I know the environment and permissions are correct. The problem is, when I switch over to beanstalkd as my queue driver, the job fails with the following:
[2015-01-09 14:15:40] production.ERROR: exception 'RuntimeException' with message 'Unable to connect to remote server.'
Beanstalkd jobs run fine elsewhere in the application (none of the others have ssh commands).
I'm using a username and password for the connection, so it's not a key permissions or passphrase issue. Any ideas?
If you know the file has uploaded OK to S3, why not generate a new job, that will then be run on the other file processing server (step 3b), to have it download the file from S3, if it needs it?
Other than that - you would need more debugging on the SSH upload.

PostgreSQL 9.2 streaming replication recovery.conf

I am working on Postgresql 9.2 streaming replication and I have finished setting up on the master and on the standby I want to set up the parameters in recovery.conf file.
But I can not get the file so I have created a new file 'named recovery.conf' and copied all the contents of recovery.conf.sample file and edited the parameters.
I saved it and when I start the postgresql service, it gives error
"service on local computer started and stopped....."
But when I remove recovery.conf file the service starts.
I need help.

Send a file to Windows server directory in Oracle Data Integrator

I have a interface which is a database to file Interface.
After processing the records, I put the generated file on a Unix directory path. My requirement is to send the output file to a Windows Server directory instead of Unix in Oracle Data Integrator.
How can I achieve this?
Here are (2) options:
After generating the file on the ODI/Unix server, use an [OdiFtpPut] step to FTP the file to the Windows server
Write a Java app that will reside on the ODI/Unix server, after generating the file, use a an OS Command step to invoke the Java app (using parameters) to perform the file move or FTP

Resources