This week I am exploring command line mode of Globus online. Web-based Globus online is very easy to use and there are enough features for normal use. However, there are some limitations, for example you cannot change file names when you transfer. Command line mode enables more fine tuning of transfer and allows to modify details. Another example is you can specify name for each transfer, so you can keep track of each task more easily.
I am going to do this using Linux terminal but If you are window environment, one way to do it in command line is to install Cygwin. This software provides Unix/Linux like environment, so that you can run similar commands to Unix/Linux. Those who are already using Linux environment, it is not necessary to do anything. You can go to linux terminal and start there.
After installing Cygwin on windows machine, you go to Cygwin directory (usually C:\cygwin) and edit
@echo off C: chdir C:\cygwin\bin set CYGWIN=binmode ntsec bash --login -i
After editing, save and double click Cygwin.bat file to run the program. It will open a command line terminal you see below. Then type
If Cygwin is successfully installed, you will see options for cygrunsrv command.
CONNECTING USING SSH
OK, from here I will be doing everything in Linux terminal. A lot of details are provided here (intro) , here (getting started) and here (beyond basics). So please refer these sites if you need more information. I am also assuming you already have user ID and several endopoints activated for Globus online. For the first time, you need to generate SSH Keys.
>ssh-keygen -t rsa -b 2048
It will generate a key in the file name called id_rsa.
It will also ask you to enter passphrase. Please remember what you type in.
Generating public/private rsa key pair. Enter file in which to save the key (/home/user_name/.ssh/id_rsa): Enter passphrase (empty for no passphrase):
Open id_rsa.pub file and copy the entire content. Then go to Manage Identifies.Click “Add SSH Public Key box”. Enter alias (name) and paste the key in SSH Public Key. Click “Add SSH Key”.
Now, go back to Linux terminal, then try connecting your Linux to globus online. The format for connecting to globus online is
You may see an error message
Permission denied (publickey,gssapi-keyex,gssapi-with-mic )."
This error is fixed by changing permission of this file to “read only”.
chmod 400 /path/id_rsa.pub
Try ssh command again, this time hopefully you will see well come message after ask you enter passphrase that you specified above.
Welcome to globusonline.org, user_name. Type 'help' for help' $
Now your machine is connected to globus online. Note that you see a ‘$’ on command line prompt.
Let’s try transferring some file using command line. The basic format for transfer is
transfer -- user_name#endpoint1/path/to/source/file user_name#endpoint2/path/to/destination/dir
Once the command is executed you will see a message.
Task ID: 26116978-2703-11e3-99f8-12313d2005b7 Created transfer task with 1 file(s)
There are a number of options you can use. To see all option, go here or type transfer -help.
If you want to change file name after transfer, you can put the file name in the destination directory.
You cannot transfer files if your credentials for the endopoint is expired. You need to renew credential if it is the case, type
This will prompt to enter username and password for each endpoint you have an access to.
If you want to activate specific endopoint, type
endopoint -m myproxy_server
It will prompt to ask you to enter username and password for this proxy server.
There are a number of commands you can use in command line. mkdir can create a new directory. rename command can change the name of file or directory. ls is to show the content of remote server. Please refer here for more details.
If you want to quit command line mode of globus online, simply type,
I have been benefited from Globus online a lot as I have many files to search for mass spec everyday on computer cluster in my institution. In this post, I want to explore how to set up own server to send files back and forth from your desktop PC. This will be useful in general sending relatively large files from one place to the other.
First I am assuming you have a server computer you have full access to. In my case, I have a server at home running ubuntu 10.04.02. You need to discover the right distribution of globus-connect-multiuser program. You can see the list from here. The instruction for installation of globus connect multiuser is written here and please use it as guidance.
In my case, I couldn’t see the one for ubuntu, so I asked Globus team. They told me I should use “globus-repository-5.2-stable-lucid_0.0.3_all.deb”. Here is the steps to configure server for globus online multiuser.
1) Download package
>sudo curl -LOs http://www.globus.org/ftppub/gt5/5.2/stable/installers/repoglobus-repository-5.2-stable-lucid_0.0.3_all.deb
2) Intall Debian-based distribution>sudo dpkg -i globus-repository-5.2-stable-lucid_0.0.3_all.deb
3) Get update
>sudo aptitude update
4) Install globus-connct-multiuser> sudo aptitude-y install globus-connect-multiuser
5) Update configuration file. This file is present in /etc/ directory. To modify you need to have permission
>sudo vim /etc/globus-connect-multiuser.conf
There are quite few things you need to change in order to get it work. What I am going to show here is a minimum setting. For more detailed setting, please consult Globus online customer service.
First, you need to change following lines. Note: you need to remove % and s and semi colon (;) for the lines you need to configure.
L11 User = user_name_you_use_to_log_in_globus_online
L16 Password = your_password_for_globus_online
L22 Endpoint = same_as_User
L29 Name = server (whatever you want to call your server)
L103 Server = XXX.XXX.XXX.XXX (the server’s IP address)
L112 ServerBehindNAT = True
L193 server = XXX.XXX.XXX.XXX (the server’s IP address)
6) Run the installed program. This will take a few moments to be in effect
7) Check if essential ports are open (LISTEN). Type sudo lsof -i
Pay attention to the far right column. These are the status of ports currently used in your server. You can see port 7512 is open (LISTEN) for Myproxy, and gsiftp is also open (LISTEN). If you want to know the port number for gsiftp, you can look up in the configuration file.
This shows only the part of the file, but you can see port 2811 is used for gsiftp. Now ports are open for globus connect multiuser. But you need to make sure the ports are accessible (open) from remote computer. This site is easy to test whether certain ports on your server is actually open or not. You can simply type the IP address and port number (7512 and 2811). If it says ports are closed, you should check if portforwarding is correctly set on your router.
7) Go to globus online website. Log-in and go to Manage Data, and click manage endopoints. Here you are going to add your server.
Enter Endopoint Name : username#server
Choose Myproxy for Idneify Providers. Hostname should be the same IP addresses used above.
Leave Server DN empty.
Server Domain should be the same IP address used above.
Keep the default server port: 2811
Hit the Create Endpoint button. Then click the activate tag and hit activate now button. Now it will ask you to enter User name, Passphrase, Server DN and Credential Lifetime. Enter username and passphrase used to log-in your linux server. You can leave the Server DN empty and put some numbers (e.g. 24) for crediential lifetime. Then you will see an error message. Copy the text after MYPROXY_SERVER_DN=, go to Server and paste into the Server DN (no double quotations). Hit Save.
Try entering the linux user ID and passphrase, then activate again. This time it should be activated.
Now your server is activated and ready to transfer files. Go to Manage Data and click start transfer. Then enter your Endopoint for your server and click Go. Now you need to enter again your user ID and passphrase for linux server and credential time.
Once everything is successfully configured, you should see directory in the window. Now you can start transfer your files. Essentially this is to set up FTP server but you can transfer files with much faster speed.
Initially I had a problem transferring files. I saw directory structures on both sides, but when I initiated transfer, the transferred files had no contents. I could create and delete files & directories, but transferring files were unsuccessful. If you encounter a similar problem think about these possibility.
1) Linux firewall and/or your router firewall is blocking
2) Port forwarding is not set up correctly on your router
If firewall is blocking certain port, it may cause trouble sending files. Remember, globus-connect-multiuser uses port 50000-51000 by default. In my case, 2) was the problem. My router has port forwarding setting, but it separates specific port forwarding and port range forwarding. Once I fixed it, it works flawlessly.
If activation of server, connection to the server and port setting are done correctly, globus connect allows transferring files between your PC and server. If you look at port usage, you will see a new connection is established.
One of the major problems in dealing with large data is to transfer files via network. Mass spec files files are fairly large, often exceeds gigabytes. Computation of mass spec results may take some time, but file transfer can take longer than computation in some cases. If a mass spec file is transferred simultaneously, or as soon as mass spec run is over, total amount of transfer time is similar to the mass spec run time (I am assuming that your network connection is faster than generating mass spec raw data). For a few file transfers, SCP/FTP is ok, but large file transfer is better with Globus online.
What this site does is to transfer files (especially large ones) across the internet fast, and reliably. You can also share files with multiple users. Operation is as simple as Dropbox.
First, you create an account for yourself at Globus online by clicking “sign up now”. After verifying your account with email, you can immediately start using their service. There are things you can do it for free such as:
1) File transfer and synchronization to/from servers
2) Create private and public endpoints
3) Access to shared endpoints created by others
Things that are NOT free ($7/mo or $70/yr):
1) Peer-to-peer transfer and share files
2) Create and manage shared endpoints
As far as I understand, if you have university server which has already signed up for Globus, you can create an endpoint on your computer and start transferring files between the registered server and your PC without any charge.
These are the steps to use Globus online for file transfer.
1) Sign up for a new account
2) Log on to Globus online, and go to “Manage Data” on the top of the page, and select “manage endpoints”.
3) Click “add Globus Connect”.
4) Type endpoint name (e.g. myPC) and click “generate setup key”.
5) Select the operating system you are using (Mac, Linux or Windows).
6) Install globus online on your computer (automatic).
7) Open Globus Connect application.
8) Copy the setup key and paste into the box in Globus Connect app. Hit OK.
9) Click “start transfer” under “Manage Data” tab on the top.
10) Type your endopoint name (account_name#computer_name) in the Endopoint box (either left or right). Then click “Go”.
11) Type the server endopoint name in the other Endopoint box. Then click “Go”.
Once you see file structures for both sides, you can start transferring files. Select multiple files by pressing CTRL key, then hit the arrow head to send the files.
Once you started, you can see the job in the transfer activity page. Real advantage of transferring files using Globus online is
Not only you have faster transfer over the internet, you don’t have to log in to the computer you want to transfer files from. This means, you have three computers (A, B & C), and you can direct transferring files from A to B or vice versa using Computer C.
You can also quickly synchronize the directory by clicking an option and check “only transfer new or changed files”. You can further select an option how you want to define new or changed files.
I also put a link to Globus online manual here.
Note: I had a trouble with sending files from my computer initially and found that my computer was in the part of University Hospital network which restricts ports used by Globus online. Since it was not possible to ask network admin to open a port for Globus online, I had to use VPN to mitigate the issue.
Overall, I am pretty satisfied with the speed of transfer. Globus online is ~5x faster than SCP.