Results 1 to 7 of 7

Thread: Any way to run only ZD back end (jetty webserver) without GUI

  1. #1
    Join Date
    Aug 2010
    Posts
    8
    Rep Power
    5

    Default Any way to run only ZD back end (jetty webserver) without GUI

    I use Zimbra Desktop on several machines in the same LAN.
    That needs every single machine to do the sync work and the initial download of >1G of data parallel.

    Much better were if I had one ZD-Server in the LAN, where only the jetty webserver runs. This server would do all the sync stuff with the ZCS in the internet and provide the account data for all other clients in the LAN.

    The clients I would connect via browser to the LAN-ZD-Server.

    Any chance that this could work?
    Any ideas how to realize that?

    My server would be a linux vm without X, only OpenSSH and ZD.
    The clients run Windows or Linux.

  2. #2
    Join Date
    Jun 2011
    Posts
    28
    Rep Power
    4

    Default Perhaps

    I assume you are the only user that would want to use the server for this functionality. With that assumption, have you thought of just leaving ZD running on the server all the time? I don't think it would consume much more resources and all the other machines could connect to it from a web browser. I think you can even kill the zdclient.exe process in Task Manager and the backend zdesktop.exe would keep running without the GUI. However, I'm pretty sure it would close zdesktop.exe if you then logged off the server.

    To really have it just launch the backend as a service with no no one logged in may require some scripting. If you are up to the challenge you can look at "C:\Program Files\Zimbra\Zimbra Desktop\win32\zdrun.vbs". That's the script that launches everything when you run the Zimbra Desktop shortcut. It looks intimidating, but it really just sets a lot of variables and then runs zdclient.exe. It seems that zdclient.exe then launches zdesktop.exe. So, you would need to figure out how to launch zdesktop by itself. That may take some time.

  3. #3
    Join Date
    Aug 2010
    Posts
    8
    Rep Power
    5

    Default

    Thanks for the reply.

    1st thing: I use the Linux version for the server, not Windows.
    Yes, ZD-Server service would/should/could run permanently on the linux server and all clients would connect to it whenever they want. That was my intension.

    To the kill-in-taskmanager-thing:
    In Linux version, when you close ZD, it won't hide itself in SysTray. It will close regularly and also will shut down the ZD service. So I assume just killing the frontend would kill also the backend, because thats the normal way of ending ZD.

    I already managed to tweak some js files so I could connect via browser on localhost on always the same port and not randomly choosed. But that don't work in the network. I always end up in some kind of "restricted to localhost" error.

    I hoped not to need to reengineer the startup process and its many script files, so I asked here if anyone else maybe already solved this issue.
    Can't really believe that I'm the first one with this idea!

  4. #4
    Join Date
    Jun 2011
    Posts
    28
    Rep Power
    4

    Default

    Sorry, I missed the part about it being a Linux server without X. In that case, my suggestion wouldn't work because I don't think zdclient can launch without X. So, reengineering the startup is the only way I can think of to get it to run without even trying to open a GUI.

    If you do have X available in the VM then it makes more sense just to leave ZD always running minimized. Also, you could try using the kill command just on the client process. (ps ax | grep zdclient to see what pid to kill) I don't have my Linux laptop in front of me to test it, but my thinking is that killing the client wouldn't kill the jetty process along with it.

    However, it sounds like your other issue is that even with ZD open on the server in X you can't connect to it from a browser on another computer. Is that correct? You sound like you know your way around Linux so I assume you opened the appropriate port in the Linux Firewall. Also, SELinux could be getting in the way somehow. I've never tried accessing it from another computer, but I thought I read on the forum that you can do that. When I get some more time I'll do a little digging for you on that point.

    And you're not the only one who thought of this. I actually did think it would be cool to access my email over the internet with a browser to my home computer running ZD, but I never spent the time to look into doing it securely. I was thinking it could be my own personal WebMail with all my accounts in one browser window. I think that would be cool, but I'm not sure it would be secure. On a LAN I would expect that security is not as much of an issue, but you still don't want co-workers to be able to read all your email with no login prompt.

  5. #5
    Join Date
    Nov 2010
    Posts
    54
    Rep Power
    4

    Wink A part of the solution and some questions

    Quote Originally Posted by Tommez View Post
    I use Zimbra Desktop on several machines in the same LAN.
    That needs every single machine to do the sync work and the initial download of >1G of data parallel.
    First idea is to think about setting up a local ZCS.

    Quote Originally Posted by Tommez View Post
    Much better were if I had one ZD-Server in the LAN, where only the jetty webserver runs. This server would do all the sync stuff with the ZCS in the internet and provide the account data for all other clients in the LAN.

    The clients I would connect via browser to the LAN-ZD-Server.

    Any chance that this could work?
    Any ideas how to realize that?

    My server would be a linux vm without X, only OpenSSH and ZD.
    The clients run Windows or Linux.
    About running zdesktop (the ZD server) only and ignoring the zdclient part just check the Open Zimbra Desktop in Google Chrome thread.

    We have managed to make it work in Gnu/Linux, Mac and finally Windows. You just have to ignore the launch of the Zimbra Desktop client.

    Here are there some aloud thoughts about your idea.
    • Local ZCS installation might be a better solution in some cases.
    • ZD does not have an authentication system as far as I know. You would have to deal with that somehow.
    • As ZD is based on jetty. I suppose you need to check jetty documentation on how to accept not only local connections but also external connections so that it works in your setup. Unless you try to redirect the connections somehow with iptables so that ZD itself thinks they come from localhost.
    • It's a good idea to make the ZD port a fixed one (as you say in another post).
    • It could be great to use this setup in low-RAM machines where ZD client might work but definitively not both ZD server and ZD client. Just pust the ZD server in a more powerful machine.
    • ZD Server is not multiuser as far as I know. This means you would have a zdesktop process for each one of the ZD server user. Taking a read at your post one would suspect that you think that ZD could deal with several users with only a process.
    • If it happens to work it would be nice to have a kind of centralised backup server. Compare that to some isolated outlooks.


    Although I am not very sure about a ZD Server being possible we want to do some test about this.

    How have you managed to make the ZD port to be always the same?
    Adrian Gibanel, IT Manager

    "be free, be innovative, bTactic"

    Av. Balmes, 34 4rt 1a B | Lleida, Spain 25006

    www.btactic.com

  6. #6
    Join Date
    Nov 2010
    Posts
    54
    Rep Power
    4

    Smile To connect from the network

    Quote Originally Posted by adrian.gibanel.btactic View Post
    Here are there some aloud thoughts about your idea.
    • As ZD is based on jetty. I suppose you need to check jetty documentation on how to accept not only local connections but also external connections so that it works in your setup. Unless you try to redirect the connections somehow with iptables so that ZD itself thinks they come from localhost.
    I have found it.

    Edit:
    Code:
    $HOME/zdesktop/jetty/etc/jetty.xml
    file and search for:
    Code:
    <Set name="host">127.0.0.1</Set>
    and comment it so that it reads:
    Code:
    <!-- <Set name="host">127.0.0.1</Set> -->
    .

    That's it. No longer needed to be at your localhost to access your Zimbra Desktop.
    You either need to read the webapp.ini file to guess the url to access (or tweak it to an standard url as you do) but it works.

    If you improve this way of using Zimbra Desktop, or you happen to finally use it, or find any other unexpected benefits from it please let us know.

    By the way if you need to replicate this into other users try to edit the same file but the one you found at:
    Code:
    /opt/zdesktop
    so that it servers as a template for new user installations.
    Adrian Gibanel, IT Manager

    "be free, be innovative, bTactic"

    Av. Balmes, 34 4rt 1a B | Lleida, Spain 25006

    www.btactic.com

  7. #7
    Join Date
    Jun 2011
    Location
    Caracas Venezuela
    Posts
    476
    Rep Power
    4

    Default

    adrian.gibanel.btactic you are good!

    Just "convert" the local to a webserver!

    Regards!
    Last edited by ccelis5215; 03-05-2012 at 04:43 PM. Reason: Think about tweaks...

Similar Threads

  1. Replies: 39
    Last Post: 09-04-2012, 11:18 PM
  2. z-push 1.5.5 + zimbrabackend 51
    By vukomir in forum Mobility
    Replies: 10
    Last Post: 10-18-2011, 10:27 AM
  3. Port conflict between Asterisk GUI and Zimbra
    By unluckyprince in forum Administrators
    Replies: 1
    Last Post: 08-26-2011, 09:20 AM
  4. loops back to myself
    By cubitus91 in forum Installation
    Replies: 16
    Last Post: 05-12-2008, 12:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •