I'm trying to insert records from local directory path in SSH but it shows "file not found" because it does not recognize the path. But if I give sft directory then it recognise the path.
This is the code:
Local directory path:
./putmsgE1E2.ksh LPDWA123 ABC.GD.SENDCORRESPONDENCE.BATCH.INPUT XPRESSION.TEST /Users/admin/Desktop/important.txt;
and I tried using c:/Users/admin/Desktop/important.txt
SFT Directory:
./putmsgE1E2.ksh LPDWA123 ABC.GD.SENDCORRESPONDENCE.BATCH.INPUT XPRESSION.TEST /abchome/abc123/1.txt;
I have inputs in the txt file in my local directory; I want to poll that files to the server. Hope someone finds a solution. Thanks.
Use the below command on Linux systems:
scp /path/to/your/local/file remoteUser#some_address:/home/remoteUser/Documents
Related
So I was trying to make a 1.17.1 minecraft server on my mac. I couldn't open my 1.17.1_server.jar with Java 8 so I download Java 16.0.2.
Unfortunately, everytime I was opening the 1.17.1_server.jar file, I got
"The Java JAR file "1.17._server.jar" could not be launched." .
I first thought that it was because the file was launch by Java 8 instead of 16.
So I went into the terminal and run :<path to java> -jar 1.17.1_server.jar
I then got this : Error: Unable to access jarfile 1.17.1_server.jar
Finally i tried to put the path of the jar file in the command...
So I've run : path to java -jar path to server
and got this :
[main/ERROR]: Failed to load properties from file: server.properties
[15:57:35] [main/WARN]: Failed to load eula.txt
[15:57:35] [main/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.
So why I have to agreed Eula if i've never launched it ? Does it think that he already been launched ?
As stated in the error message
[15:57:35] [main/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.
You have to open the file and check yes
Okay find the solution: my eula and server properties file were in my user folder dk why (never moved them so...)
I am going to transfer files to remote sftp by Java sftpchannel. Everything are going to be as expected. It was well tested on STS (Spring Tool Suite 4.7.1). But it failed when it was deployed to tomcat server.
// Logs
File path: S:/System/AutoSend/Data.json
Remote path: Data.json
Before sftp put
Sftp error: 4: java.io.FileNotFoundException: S:\System\AutoSend\Data.json (The system cannot find the path specified)
(Unix-formated path has been transformed to windows format automatically?)
What can I do to fix the issue? Thanks a lot.
Have you tried making the File Path a String? Like this: "S:/System/AutoSend/Data.json"
and
is the "S" Drive on your Tomcat-Server? If not, try using the IP-address instead.
I have two machines named: ubuntu1 and ubuntu2.
In ubuntu1, I started the master node in Spark Standalone Cluster and ubuntu2 I started with a worker (slave).
I am trying to execute the example workCount available on github.
When I submit the application, the worker send an error message
java.io.FileNotFoundException: File file:/home/ubuntu1/demo/test.txt does not exist.
My command line is
./spark-submit --master spark://ubuntu1-VirtualBox:7077 --deploy-mode cluster --clas br.com.wordCount.App -v --name"Word Count" /home/ubuntu1/demo/wordCount.jar /home/ubuntu1/demo/test.txt
The file test.txt has only to stay in one machine ?
Note: The master and the worker are in different machine.
Thank you
I got the same problem while loading the JSON file. I recognized by default windows storing file format as Textfile regardless of the name. identify the file format then you can load easily.
example: think you saved the file as test.JSON. but by default windows adding .txt to it.
check that and try to run again.
I hope your problem will get resolved with this idea.
Thank you.
You should put your file on hdfs by going to the folder and typing :
hdfs dfs -put <file>
Otherwise each node has to have access to it by having the same path folder existing on each machine.
Don't forget to change file:/ to hdfs:/ after you do that
I'm creating .csv file and placing it in one location.
String location = "/APPL_TOP2/IMDD/apps/apps_st/appl/xxfin/12.0.0/bin/xe.csv";
Using exact path working fine on Windows but I need it to work on Linux client too.
String location = "$XXFIN_TOP\\12.0.0\\bin\\xe.csv";
If I'm using relevant path on Linux it is not working, showing Error
SQL*Loader-500: Unable to open file(/APPL_TOP2/IMDD/apps/apps_st/appl/xxfin/12.0.0/bin/xe.csv)
SQL*Loader-553: file not found
SQL*Loader-509: System error: No such file or directory
" Client is asking any option to pass relevant path client machine is Linux"
Paths in Linux have slashes which go the other way. So it should be this:
$XXFIN_TOP/12.0.0/bin/xe.csv
I'm creating a task plugin for Atlassian Bamboo. At some moment of task executing, I would like to create a temporary file:
File temp = File.createTempFile(fileName.toString(), null, dir);
temp.deleteOnExit();
, where:
fileName.toString() = e.g. "C:\Atlassian\bamboo-home\xml-data\build-dir\CMPT-CMPTP-JOB1\test.java"
dir = new File("temp");
When testing this locally, everything works fine - the file is created properly. However, after I deploy plugin on server and try to execute above code, I've got an IOException:
java.io.IOException: The filename, directory name, or volume label syntax is incorrect
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createTempFile(File.java:1879)
What could be the reason?
Additional info: I'm pretty sure that dir.exists() .
A file name of
"C:\Atlassian\bamboo-home\xml-data\build-dir\CMPT-CMPTP-JOB1\test.java"
is valid on Windows but is invalid on Unix operating systems. You won't be able to create a (temp) file like that, either as specified as the absolute name/path or the file nor just relative to another folder.
If your OS is Windows, you still can't use a full path (starting with drive specification like "C:") to be created as a child of another folder.
You could have spaces in the beginning or the ending of your path, print your file.getAbsolutePath() in order to see the current path where java is reading.
The dir variable must be set with the full (or relative) path to the directory temp. The first arg of File.createTempFile should be the prefix of the temp file (at least three letter long. for exeample "test"). This will create a "test.tmp" in the given directory (specified by the variable dir).
Check the javadoc
You can check existence of the directory dir with dir.exists()