Start a new topic

running CrushFTP in Docker ?

pducharme @ Mon Jul 14 19:24:10 EEST 2014
Hi, before I buy a licence, I want to know if there is a plan to create a Dockerfile for CrushFTP ? In case Docker is new for you, it's a revolutionnary of running Services Virtually, it's pretty good! (docker.io). They are "Dockerfiles" which are like "receipes" to run specific services.


spinkb @ Wed Jul 16 16:00:06 EEST 2014
I'll look at it, I have not used docker before. First glance it doesn't look like a good fit... But I'll try more.

CrushFTP is already running as a java process. Therefore its OS independent, and mainly just a zip you expand. No real dependancies. I understand the need for what they are doing for some other larger projects that are just a mess of open source tools and such...but CrushFTP isn't that complex in how you set it up and run it. You could literally just have a zip you expand and double click on if you like...

I'll report back here on what I decide.

--Ben
pducharme @ Wed Jul 16 21:06:52 EEST 2014
My real need is to run CrushFTP on my Unraid Server. Unraid is supporting XEN or KVM or Docker. I can't run it directly on Unraid thought because they have a built-in FTP server (that sucks! no config except a "username"...).

My idea was to run CrushFTP inside a Docker on a alternate Port and use the WebUI to configure it.

I already run several Docker on my Unraid (Plex Media Server, NZBGet, NZBDrone, PlexWatchWeb, etc.), having a new Docker for CrushFTP would be a good addition. I know I could run it inside a VM in Xen or KVM, but I want to simplify my setup; having Dockers does that!

If you want to see what they did on Unraid...
http://lime-technology.com/forum/index.php?board=56.0

I request there if someone can help, but there is no interest because it's a Paid app. I would pay it, so there is the interest :) Also, with docker, you could literally have 1 docker run command to offer to your client and say that they can run CrushFTP just like that on any linux distro (most support docker) -- I think it's a great way to simplify thing, and it's easy to move from a server to another too, just pull the docker image to the new host, copy the config and it's done!
spinkb @ Fri Jul 25 17:06:42 EEST 2014
OK, here is what you need to do.

Download CrushFTP, unzip it. Note where you have this folder at since we will use this when we launch docker. For this example, I am assuming /home/CrushFTP7_PC


[code]
docker run -d -P -v /home/CrushFTP7_PC:/var/opt/CrushFTP7_PC -v /home/userdata:/var/opt/data -w /var/opt/CrushFTP7_PC crushftp/centos java -Xmx512m -jar CrushFTP.jar -d
[/code]

So...the whole idea of docker is interesting, but rather pointless in many ways in my opinion. You don't want CrushFTP in your image, or else your data just goes 'poof' when the vm stops...unless you commit it afterwords. So your mounting a local folder into the vm always, and forwarding ports too, always.

In effect, all this docker has that I install is "java". You have CrushFTP, and you just execute java inside the docker. Probably other dockers you could use for this too...

To make your first default admin user....

[code]
docker run -d -P -v /home/CrushFTP7_PC:/var/opt/CrushFTP7_PC -v /home/userdata:/var/opt/data -w /var/opt/CrushFTP7_PC crushftp/centos java -Xmx512m -jar CrushFTP.jar -a crushadmin password
[/code]

So you can now use CrushFTP in a docker, but I don't really see the benefit, might as well run java locally, and run CrushFTP natively. If you can run docker, you can likely run java anyway.

Thanks,
Ben
pducharme @ Fri Jul 25 18:47:34 EEST 2014
Hi,

Thanks for the efforts.

I run the commands, but the docker exists almost right away.

What ports the Web Interface + FTP are defaults?

spinkb @ Fri Jul 25 18:50:26 EEST 2014
The command runs docker in the background, the -d command. So it will return instantly.

8080 is the default http port. The "-P" param should be allowing you access to that port...but check the "docker ps" to see if the port is being remapped for you by docker, if so, you need to do the custom docker -p 127.0.0.1:5000::5000 mapping style syntax to remap the port.

Did you do the volume mapping correctly? Does your folder now have a CrushFTP.log with messages in it?

Thanks,
Ben
pducharme @ Fri Jul 25 19:08:56 EEST 2014
Yes, i have the LOG.

But, i think i'll try using the phusion/baseimage. It is specifically tweaked for Docker. Also, if you look at this docker:

https://github.com/needo37/plex

You see that it make use of scripts, it's like a standard that the guys at Lime-Tech does for any dockers for Unraid. I want to try have a CrushFTP based on one of those docker. It would be really easier to maintain this way, with a default config (default User/Pass).

Those dockers stay "running" and we can Start and Stop them inside the Unraid Docker Manager.

[code]07/26/2014 12:40:27 AM|Prefs.XML was corrupt. Looking for automatic backup...
07/26/2014 12:40:27 AM|main
07/26/2014 12:40:27 AM|java.lang.NullPointerException
07/26/2014 12:40:27 AM|crushftp.server.ServerStatus.SG:4601
07/26/2014 12:40:27 AM|crushftp.handlers.PreferencesProvider.check_code:104
07/26/2014 12:40:27 AM|crushftp.server.ServerStatus.init_setup:312
07/26/2014 12:40:27 AM|crushftp.server.ServerStatus.:138
07/26/2014 12:40:27 AM|CrushFTPD.:17
07/26/2014 12:40:27 AM|CrushFTPLauncher.:87
07/26/2014 12:40:27 AM|sun.reflect.NativeConstructorAccessorImpl.newInstance0:-2
07/26/2014 12:40:27 AM|sun.reflect.NativeConstructorAccessorImpl.newInstance:57
07/26/2014 12:40:27 AM|sun.reflect.DelegatingConstructorAccessorImpl.newInstance:45
07/26/2014 12:40:27 AM|java.lang.reflect.Constructor.newInstance:526
07/26/2014 12:40:27 AM|CrushFTP.main:54
07/26/2014 12:40:27 AM|prefs.XML backup files were missing or corrupt. Using defaults instead...
07/26/2014 12:40:27 AM|Creating statsDB...
07/26/2014 12:40:37 AM|Creation complete.
07/26/2014 12:40:37 AM|********CrushFTP Run******** Version 7.1.0_35 Java:1.7.0_65 from:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65-2.5.1.2.el7_0.x86_64/jre 64 bit OS:Linux
07/26/2014 12:40:37 AM|---Server Started--- LAN IP=172.17.0.3 WAN IP=67.55.24.177 PORT=9090
07/26/2014 12:40:37 AM|---Server Started--- LAN IP=172.17.0.3 WAN IP=67.55.24.177 PORT=21
07/26/2014 12:40:37 AM|---Server Started--- LAN IP=172.17.0.3 WAN IP=67.55.24.177 PORT=2222
07/26/2014 12:40:37 AM|---Server Started--- LAN IP=172.17.0.3 WAN IP=67.55.24.177 PORT=8080
07/26/2014 12:40:37 AM|Java version is 1.7.0_65
07/26/2014 12:40:37 AM|OS is Linux
07/26/2014 12:40:37 AM|Configuring SSHD
07/26/2014 12:40:37 AM|Initializing SSH1 server->client ciphers
07/26/2014 12:40:37 AM|Initializing SSH2 server->client ciphers
07/26/2014 12:40:37 AM| 3des-ctr will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes128-ctr will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes192-ctr will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes256-ctr will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| 3des-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| blowfish-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes128-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes192-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes256-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| arcfour will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| arcfour128 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| arcfour256 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM|Initializing SSH2 client->server ciphers
07/26/2014 12:40:37 AM| 3des-ctr will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes128-ctr will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes192-ctr will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes256-ctr will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| 3des-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| blowfish-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes128-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes192-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes256-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| arcfour will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| arcfour128 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| arcfour256 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM|Initializing SSH2 server->client HMACs
07/26/2014 12:40:37 AM| hmac-md5 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| hmac-sha1 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| hmac-md5-96 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| hmac-sha1-96 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| hmac-sha256 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM|Initializing SSH2 client->server HMACs
07/26/2014 12:40:37 AM| hmac-md5 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| hmac-sha1 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| hmac-md5-96 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| hmac-sha1-96 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| hmac-sha256 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM|Initializing public keys
07/26/2014 12:40:37 AM|Initializing digests
07/26/2014 12:40:37 AM| MD5 will be supported using JCE Provider SUN
07/26/2014 12:40:37 AM| SHA-1 will be supported using JCE Provider SUN
07/26/2014 12:40:37 AM| SHA-256 will be supported using JCE Provider SUN
07/26/2014 12:40:37 AM| SHA1 will be supported using JCE Provider SUN
07/26/2014 12:40:37 AM|Initializing SSH2 key exchanges
07/26/2014 12:40:37 AM|---Server Started--- LAN IP=172.17.0.3 WAN IP=67.55.24.177 PORT=443
07/26/2014 12:40:37 AM| diffie-hellman-group14-sha1 will be supported using JCE Provider BC
07/26/2014 12:40:37 AM| diffie-hellman-group1-sha1 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| diffie-hellman-group-exchange-sha1 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| diffie-hellman-group-exchange-sha256 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM|Initializing Secure Random Number Generator
07/26/2014 12:40:37 AM|Creating compression factory
07/26/2014 12:40:37 AM|Adding None Compression
07/26/2014 12:40:37 AM|Adding ZLib Compression
07/26/2014 12:40:37 AM|Adding None Compression
07/26/2014 12:40:37 AM|Adding ZLib Compression
07/26/2014 12:40:37 AM|Initializing SSH1 server->client ciphers
07/26/2014 12:40:37 AM| ssh1-des will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM|Initializing SSH1 client-server ciphers
07/26/2014 12:40:37 AM| ssh1-des will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM|Initializing SSH2 server->client ciphers
07/26/2014 12:40:37 AM| 3des-ctr will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes128-ctr will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes192-ctr will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes256-ctr will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| 3des-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| blowfish-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes128-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes192-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes256-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| arcfour will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| arcfour128 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| arcfour256 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM|Initializing SSH2 client->server ciphers
07/26/2014 12:40:37 AM| 3des-ctr will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes128-ctr will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes192-ctr will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes256-ctr will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| 3des-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| blowfish-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes128-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes192-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| aes256-cbc will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| arcfour will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| arcfour128 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| arcfour256 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM|Initializing SSH2 server->client HMACs
07/26/2014 12:40:37 AM| hmac-md5 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| hmac-sha1 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| hmac-md5-96 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| hmac-sha1-96 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| hmac-sha256 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM|Initializing SSH2 client->server HMACs
07/26/2014 12:40:37 AM| hmac-md5 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| hmac-sha1 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| hmac-md5-96 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| hmac-sha1-96 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM| hmac-sha256 will be supported using JCE Provider SunJCE
07/26/2014 12:40:37 AM|Initializing public keys
07/26/2014 12:40:37 AM|Initializing digests
07/26/2014 12:40:37 AM| MD5 will be supported using JCE Provider SUN
07/26/2014 12:40:37 AM| SHA-1 will be supported using JCE Provider SUN
07/26/2014 12:40:37 AM| SHA1 will be supported using JCE Provider SUN
07/26/2014 12:40:37 AM| SHA-256 will be supported using JCE Provider SUN
07/26/2014 12:40:37 AM|Initializing SSH2 key exchanges
07/26/2014 12:40:37 AM|SQL:Connecting to db, executing sql:CREATE TABLE FILE_JOURNAL(RID DOUBLE NOT NULL PRIMARY KEY,SYNC_ID VARCHAR(255) NOT NULL,ITEM_PATH VARCHAR(2000) NOT NULL, EVENT_TYPE VARCHAR(20) NOT NULL,EVENT_TIME TIMESTAMP NOT NULL,CLIENTID VARCHAR(20) NOT NULL, PRIOR_MD5 VARCHAR(50) NOT NULL)
07/26/2014 12:40:37 AM| diffie-hellman-group14-sha1 will be supported using JCEProvider BC
07/26/2014 12:40:37 AM| diffie-hellman-group1-sha1 will be supported using JCEProvider SunJCE
07/26/2014 12:40:37 AM| diffie-hellman-group-exchange-sha1 will be supported using JCEProvider SunJCE
07/26/2014 12:40:37 AM| diffie-hellman-group-exchange-sha256 will be supported using JCEProvider SunJCE
07/26/2014 12:40:37 AM|Initializing Secure Random Number Generator
07/26/2014 12:40:37 AM|Configuration complete.
07/26/2014 12:40:37 AM|Binding server to /127.0.0.1:56556
07/26/2014 12:40:47 AM|Server Memory Stats: Max=455.0 MB, Free=379.16 MB
07/26/2014 12:50:57 AM|Server Memory Stats: Max=455.0 MB, Free=418.39 MB
07/26/2014 01:01:07 AM|Server Memory Stats: Max=455.0 MB, Free=375.17 MB[/code]
pducharme @ Fri Jul 25 19:10:43 EEST 2014
I can see multiple Ports :

PORT=9090
PORT=21
PORT=2222
PORT=8080
PORT=443

Are all those ports required ?
pducharme @ Fri Jul 25 19:18:57 EEST 2014
I also see that in a different docker container (it create 2?) :

java.lang.NullPointerException
at crushftp.server.ServerStatus.SG(ServerStatus.java:4601)
at crushftp.handlers.PreferencesProvider.check_code(PreferencesProvider.java:104)
at crushftp.server.ServerStatus.init_setup(ServerStatus.java:312)
at crushftp.server.ServerStatus.(ServerStatus.java:138)
at CrushFTPD.(CrushFTPD.java:17)
at CrushFTPLauncher.(CrushFTPLauncher.java:87)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at CrushFTP.main(CrushFTP.java:54)
pducharme @ Fri Jul 25 20:21:39 EEST 2014
I created a GitHub + Docker repo.

https://registry.hub.docker.com/u/pducharme/docker-crushftp/

It's not yet tested or working. Will have to play with it.

Still not working. I'll have to work on the logic...
spinkb @ Sat Jul 26 03:42:04 EEST 2014
This just means its your first ever launch and it found no prefs anywhere to load...

[quote=pducharme]I also see that in a different docker container (it create 2?) :

java.lang.NullPointerException
at crushftp.server.ServerStatus.SG(ServerStatus.java:4601)
at crushftp.handlers.PreferencesProvider.check_code(PreferencesProvider.java:104)
at crushftp.server.ServerStatus.init_setup(ServerStatus.java:312)
at crushftp.server.ServerStatus.(ServerStatus.java:138)
at CrushFTPD.(CrushFTPD.java:17)
at CrushFTPLauncher.(CrushFTPLauncher.java:87)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at CrushFTP.main(CrushFTP.java:54)[/quote]
spinkb @ Sat Jul 26 03:43:22 EEST 2014
You decide what ports you care about. These are the defaults. I would say most people do:

21,80,443, and 22/2222 depending if opens is using port 22.


[quote=pducharme]I can see multiple Ports :

PORT=9090
PORT=21
PORT=2222
PORT=8080
PORT=443

Are all those ports required ?[/quote]
Login to post a comment