I am trying to configure Apache Camel's FTP to print more information as it work:
"Connecting to FTP" when trying to connect to FTP server
Should log "Starting the process of downloading from FTP " if can successfully connect and download process starts
Should print progress every 5 seconds "Downloading in progress...". Ideally should print the downloaded size if possible
Should print "File downloaded successfully" when FTP download is done
But the problem is I could not find any "hooks" to do so. Is it even possible?
Related
I need to setup a scheduled task to flush my Redis DB daily. In order to do this I was planning to create a batch file with commands to connect to my remote Redis Server and flush my specific DB, and then setup the Batch file in a scheduled task.
Currently I have
"%REDIS_PATH%\redis-cli" -h "serverName.somelocation.windows.net" -p 6380 -a SOMEPASSWORD ping
I was expecting this to return PONG, and then continue on from there to add the specific commands for flushing my DB. However, the ping command spins for a few seconds then returns nothing. No error or message or anything. Any help would be greatly appreciated!
UPDATE: I have found a solution to my original problem. I have switched over to using a powershell script instead of a batch file. Someone from Microsoft published the script to flush remotely here: https://aaronsaikovski.wordpress.com/2015/05/18/how-to-flush-the-azure-redis-cache-with-powershell/
Are you running this command locally?
If so, it sounds like port 6380 on your remote machine isn't open to the public. This is probably a good thing.
You should run this command on the command line of the remote machine. You might be able to leave off the host entirely.
https://wiki.eclipse.org/OM2M/one/Advanced_DB
I am developing an IoT project based on Eclipse OM2M project. I've been trying to do the same thing as the tutorial above did in the "Run H2 in another mode" part. In the tutorial, it said that the default database(h2) was running in embedded mode. My goal was to run the h2 database in server mode as the tutorial above did.
In h2 database part:
I started a TCP server using command
java -jar h2-1.4.196.jar -webAllowOthers -tcpAllowOthers
and it showed that the TCP server is running at tcp://127.0.1.1:41903
(The port may change every time I started a new TCP server). After I successfully started the server, I tested the connection using the web console of h2 so I think my h2 server was started correctly.
In OM2M part:
I modified some configurations in the config.ini file as below:
org.eclipse.om2m.dbUrl=jdbc:h2:tcp://127.0.1.1:41903/~/indb (set
database url) org.eclipse.om2m.dbUser=sa (set database user)
org.eclipse.om2m.dbPassword= (no database password)
However, when I ran sh start.sh in cmd to start the CSE, there were always errors shown in the picture below:
Since there's only a few information in the tutorial, I don't really know if I configure the file wrong. It seems like OM2M was not able to find my h2 database.
Can anyone tell me where I did it wrong?
I have a machine that I connect to it remotely by Remote Desktop connection and I map it's IP and can connect to it's hard drives.
Every morning I run 3 batch files that pull text data from the machine.
Is there a way through Batch commands to automatically run those 3 files as a schedule task every morning at 7:00AM from example?
I searched answers for this issue and most of them answered to do that through Windows schedule task, but it is not working for me due to the Remote connection. Thanks!
I have a simple batch file which needs to be run weekly to upload some files via Core FTP.
I'm using the free version of Core FTP LE.
MySavedProfile is the Site Name of the saved profile I created using Core FTP's site Manager. The profile contains the URL / credentials / etc of the site to connect to.
Here are the contents of the batch file:
SET logf=confirm.log
echo test-start >> %logf%
"C:\Progra~1\CoreFTP\coreftp.exe" -B -s -pasv -O -site MySavedProfile -u "C:\Progra~2\PathToFiles\FileToUpload.txt"
echo test-finish >> %logf%
For the Windows Server 2012 r2 Task Scheduler, I have created a basic, weekly scheduled task on the Task Scheduler Library root which runs the batch file. For this scheduled task I have:
(Under the General tab)
"Run whether user is logged on or not" is selected
"Run with highest privileges" is checked
Configure for = Windows Server 2012 R2
(Under Actions)
Action = Start a program
Program / Script = "C:\Progra~2\PathToFiles\batch.bat"
Start in = C:\Progra~2\PathToFiles\
Here is the weird behavior I am getting:
If I double click on the batch file directly, it works fine and uploads the text file via Core FTP just fine.
However, if I try to let the Windows Task Scheduler run it, it runs everything except the Core FTP line. That is, I get the usual:
test-start
test-finish
in the confirm.log file, but the FileToUpload.txt has not been uploaded to the remote server, and there are no errors from CoreFTP that I can detect.
I have tried this with a service account that has permissions to run batch files, as well as my own account for this scheduled task. I get the same result: it doesn't seem to run that CoreFTP line. At least not via Task Scheduler. I need this upload to be automated.
I've searched Core FTP's documentation, Google, etc. No one seems to have run into this exact issue. I've applied recommendations from distantly related issues, but none of them have worked.
Any help would be greatly appreciated. Thank you.
The only way to do this is to use the full version of Core FTP (that is Core FTP Pro). If you use the LE version you have to check the "Run only when user is logged on" option.
This happens because of the splash screen at the beginning.
If you can't be logged on forever you could create a user that will always be logged on just for these tasks.
Remember to use the -Log option on CoreFTP to check if it is actually doing something.
I've got this script in a batch file:
cmdkey /generic:"servername" /user:"user id" /pass:"password"
mstsc /v:"servername"
...which logs me into a remote server (remote desktop session). It works great, but doesn't actually log me in all of the way because this server is configured with an interactive logon, meaning there is a message that comes up that I have to click OK to when I first connect before it actually signs in all of the way.
We have a problem with our admins shutting down this server at night to apply updates and thus logging us out - causing our scheduled tasks to not refresh. I want to assign this batch file to a scheduled task on my local PC to ensure that every morning, before my scripts run, I'm logged back into the server.
Is there a way to get this batch file to bypass/acknoweldge this message so it finishes signing me in?