How to connect

General news about the Linux Version of TeamDrive (Gerne auch auf Deutsch)

How to connect

Postby blacksqd » 21 Sep 2015, 12:03

Hello,

I want to use the TeamDriveApi.py in my program. But I'm blocked at the beginning.
I take an example. I create an account "myUser" with a password "myPwd". When
I'm in the GUI Interface, I check the ID Server and it's "12345". So i thought that I had
everything to start with Python.

So here is my code :

from TeamDriveApi import *
connection = TeamDriveApi("[::1]:12345")
connection.login("myUser", "myPwd")

But I have a connection error.

Thank you for your help.
blacksqd
 
Posts: 15
Joined: 21 Sep 2015, 11:55

Re: How to connect

Postby Sebastian Philipp » 21 Sep 2015, 12:18

Hi blacksqd,

Did you enable the API as described here?

http://docs.teamdrive.net/Agent/4.1/html/TeamDrive_Http_Api.html#overview

Sebastian
Sebastian Philipp
TeamDrive Team Member
 
Posts: 139
Joined: 23 Apr 2009, 11:08

Re: How to connect

Postby blacksqd » 21 Sep 2015, 12:50

Hi,

Yes I enabled the API by adding http-api-port=12345 after Settings
blacksqd
 
Posts: 15
Joined: 21 Sep 2015, 11:55

Re: How to connect

Postby Sebastian Philipp » 21 Sep 2015, 13:13

Hi blacksqd,

if you're using the desktop client, the API will not be available until the Client successfully made a successful log in. This is a technical limitation of the Gui client and only available to Agents.

Sebastian
Sebastian Philipp
TeamDrive Team Member
 
Posts: 139
Joined: 23 Apr 2009, 11:08

Re: How to connect

Postby blacksqd » 21 Sep 2015, 13:42

I'm not sure ton understand everything.

So, I downloaded the Team Drive Agent and nothing else.
I created my program. When I ran it, I have a Connection Error.
When you asked me if I enabled the API, I search for the teamdrive.settings but I
didn't found it. I supposed I have to install the TeamDrive Client so I did it.
And when I dit it, I found the teamdrive.settings et added the line.

I only want to use the TeamDrive.py which is in the Team Drive Agent and use it in my script.
blacksqd
 
Posts: 15
Joined: 21 Sep 2015, 11:55

Re: How to connect

Postby Sebastian Philipp » 21 Sep 2015, 14:53

I'l try to clarify a bit:

  • Please don't install the TeamDrive Client and the TeamDrive Agent at the same time on the same machine, as this unnecessary increases the complexity.
  • The teamdrive.settings file should be automatically created by the agent. There is typically no need to also install the GUI-client.
  • You can run netstat to check that the TeamDrive Agent has successfully opened the port. If the port is not open, please double check that the setting is correct. If it is open, then please check the TeamDriveApi parameters.

Which Linux distribution + Version do you use?

Sebastian
Sebastian Philipp
TeamDrive Team Member
 
Posts: 139
Joined: 23 Apr 2009, 11:08

Re: How to connect

Postby blacksqd » 21 Sep 2015, 15:31

I use Ubuntu 14.04

The teamdrive.settings isn't there without Team Drive Client. So I suppose I didn't install TeamDrive Agent
in the right way.
In http://docs.teamdrive.net/Agent/4.1/html/Agent.html#linux
In the installation, I executed the TeamDriveAgent et I have the GUI.
But after that, I have to open http://localhost:45454. But in this moment, I have
"unreachable web page". I suppose the problem comme from this ?
blacksqd
 
Posts: 15
Joined: 21 Sep 2015, 11:55

Re: How to connect

Postby Sebastian Philipp » 21 Sep 2015, 16:28

If you run

Code: Select all
./teamdrived --http-api-port=45454


the you should definitely not have a user interface. If you have a user interface, you have started the wrong executable. The port number that you added to the command list must match the URL that you open in your browser. Can you please check that the TeamDrive Agent has opened the correct port?

Sebastian
Sebastian Philipp
TeamDrive Team Member
 
Posts: 139
Joined: 23 Apr 2009, 11:08

Re: How to connect

Postby blacksqd » 21 Sep 2015, 16:54

After running (the correct) teamdrived, it seems that the port isn't open.
blacksqd
 
Posts: 15
Joined: 21 Sep 2015, 11:55

Re: How to connect

Postby Sebastian Philipp » 21 Sep 2015, 17:05

do you have any hints regarding the API in the log files? You can find the logs in ~/.teamdrive/logs
Sebastian Philipp
TeamDrive Team Member
 
Posts: 139
Joined: 23 Apr 2009, 11:08

Next

Return to Linux

Who is online

Users browsing this forum: No registered users and 2 guests

cron