These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

TEA (v1.2.1) - Member Management Mod for SMF 2, TeamSpeak 3 and Jabber

First post
Author
Ash Darkvold
Corsair Navy
#501 - 2013-08-12 22:09:01 UTC
Shin Chogan wrote:

Silly question but you have added in the parameter to openfire that says which IP addresses are allowed to use the User service ? I seem to remember adding both the real IP of the server and 127.0.0.1.


Yeah, unfortunately I've tried that already. I can't see anything in the logs for SMF or MySQL that looks out of place so it's difficult to troubleshoot. Everything seems to be running fine but the users just never show up in Openfire.

Reading back through old posts in this thread it seems to be a fairly common problem across all versions of TEA. I just can't help but feel like I'm missing something really simple.
Shin Chogan
Federal Navy Academy
Gallente Federation
#502 - 2013-08-13 15:51:33 UTC
Ash Darkvold wrote:
Shin Chogan wrote:

Silly question but you have added in the parameter to openfire that says which IP addresses are allowed to use the User service ? I seem to remember adding both the real IP of the server and 127.0.0.1.


Yeah, unfortunately I've tried that already. I can't see anything in the logs for SMF or MySQL that looks out of place so it's difficult to troubleshoot. Everything seems to be running fine but the users just never show up in Openfire.

Reading back through old posts in this thread it seems to be a fairly common problem across all versions of TEA. I just can't help but feel like I'm missing something really simple.


I'm going to assume your mysql,forums, and openfire are on the same server and start with the basic config forgive me if you've done all this :

In openfire create at least one group that your users will be added to for example "Corp Members"

On the tea jabber settings page you should have
localhost
"db username for access to your openfire db"
"password for user"
"openfires db name"

then for username format and name format make sure you have at least #name#

The URL should be http://localhost:9090 if you are using defaults for the User service and you will obviously need the secret you set in Openfire for the User Service.

Make sure this is saved at this point.

Then you MUST add at least one rule pick an smf group and the openfire group you want them to belong to from the dropdowns you should be able to leave the name format blank but I always manually set it :)

One thing to remember at this point is that users have to set a password and pick their username in their forum profile it is not automatically picked up. The TEA_Jabber cron job will add people to openfire groups as their forum groups change if you have more than one group set up, and it will remove openfire accounts of people that no longer match any of the rules you've defined for Jabber.
Ash Darkvold
Corsair Navy
#503 - 2013-08-14 01:15:31 UTC
Shin Chogan wrote:

I'm going to assume your mysql,forums, and openfire are on the same server and start with the basic config forgive me if you've done all this :

In openfire create at least one group that your users will be added to for example "Corp Members"

On the tea jabber settings page you should have
localhost
"db username for access to your openfire db"
"password for user"
"openfires db name"

then for username format and name format make sure you have at least #name#

The URL should be http://localhost:9090 if you are using defaults for the User service and you will obviously need the secret you set in Openfire for the User Service.

Make sure this is saved at this point.

Then you MUST add at least one rule pick an smf group and the openfire group you want them to belong to from the dropdowns you should be able to leave the name format blank but I always manually set it :)

One thing to remember at this point is that users have to set a password and pick their username in their forum profile it is not automatically picked up. The TEA_Jabber cron job will add people to openfire groups as their forum groups change if you have more than one group set up, and it will remove openfire accounts of people that no longer match any of the rules you've defined for Jabber.


All that checks out.

Do I understand it correctly that the Openfire accounts are created by the cron job and not by SMF? If that's the case then I may have gotten a little close to an answer.

I had the permissions for the TEA folder all screwed up and none of the jobs have been running. After I got that sorted out the jobs started running but all of them are throwing this error:

*edited out*/foums/TEA/TEA_Cron.php: line 1: ?php: No such file or directory
*edited out*/foums/TEA/TEA_Cron.php: line 3: syntax error near unexpected token `'../SSI.php''
*edited out*/foums/TEA/TEA_Cron.php: line 3: 'if (file_exists('../SSI.php;) && !defined('SMF'))'

If that's irrelevant then I'm basically back to square one again.

Thanks for all your help so far.
Shin Chogan
Federal Navy Academy
Gallente Federation
#504 - 2013-08-14 01:30:14 UTC
Ash Darkvold wrote:
Shin Chogan wrote:

I'm going to assume your mysql,forums, and openfire are on the same server and start with the basic config forgive me if you've done all this :

In openfire create at least one group that your users will be added to for example "Corp Members"

On the tea jabber settings page you should have
localhost
"db username for access to your openfire db"
"password for user"
"openfires db name"

then for username format and name format make sure you have at least #name#

The URL should be http://localhost:9090 if you are using defaults for the User service and you will obviously need the secret you set in Openfire for the User Service.

Make sure this is saved at this point.

Then you MUST add at least one rule pick an smf group and the openfire group you want them to belong to from the dropdowns you should be able to leave the name format blank but I always manually set it :)

One thing to remember at this point is that users have to set a password and pick their username in their forum profile it is not automatically picked up. The TEA_Jabber cron job will add people to openfire groups as their forum groups change if you have more than one group set up, and it will remove openfire accounts of people that no longer match any of the rules you've defined for Jabber.


All that checks out.

Do I understand it correctly that the Openfire accounts are created by the cron job and not by SMF? If that's the case then I may have gotten a little close to an answer.

I had the permissions for the TEA folder all screwed up and none of the jobs have been running. After I got that sorted out the jobs started running but all of them are throwing this error:

*edited out*/foums/TEA/TEA_Cron.php: line 1: ?php: No such file or directory
*edited out*/foums/TEA/TEA_Cron.php: line 3: syntax error near unexpected token `'../SSI.php''
*edited out*/foums/TEA/TEA_Cron.php: line 3: 'if (file_exists('../SSI.php;) && !defined('SMF'))'

If that's irrelevant then I'm basically back to square one again.

Thanks for all your help so far.


Not quite ... The accounts in openfire are created when the person modifies their profile to set their openfire password ... the cron job only modifies their groups or removes the account from openfire.

The users themselves HAVE to go to *domain*/index.php?action=profile;area=tea;sa=jabber and pick a username and enter a password there is nothing to do this bit automatically.

That said you do have a problem. Your Cron job isn't right you are thinking the script is executable ... it isn't you have to run php with the script as a parameter ... if you create a script in /etc/cron.d you need to add something like :

0 */1 * * * XXXXX /usr/bin/php5 /home/sites/lawnalliance.org/forum/TEA/TEA_Jabber_Cron_Access.php

where XXXXX is the user that your forum folder is owned by.
redlinedracer
ASMODEUS INFINITE
#505 - 2013-08-14 01:51:04 UTC
Im trying to setup the teamspeak part of the mod, and i think i might be in over my head but i REALLY want this to work.


Ill put my questions in a very easy to answer fashion hopefully :P

1: The address of the host is just the teamspeak server address correct?

2: Where would i find the server query port? I think the default is 10011 (which i have enterd)

3: Where do i find the Query username and password? Is that just the Admin login info?

4: What the heck is the "Teamspeak Info"? Didnt i already put in the info with the address and port?

5: How do i setup a database for teamspeak? I have up to 10 databases on godaddy.

6: Database host im assuming is just "localhost" since the database i create will be the same as my host database?

7: Username / Password is whatever i setup im assuming for the created database

8: What is the "Database and table names"? and where do i get them?

9: What is "Online Method"? And do i want it to run?

10: What is "TS UniqueID Method"? and do i want it to run?

11: Do i want incorrect name warnings?
Ash Darkvold
Corsair Navy
#506 - 2013-08-14 02:05:49 UTC
Shin Chogan wrote:


Not quite ... The accounts in openfire are created when the person modifies their profile to set their openfire password ... the cron job only modifies their groups or removes the account from openfire.

The users themselves HAVE to go to *domain*/index.php?action=profile;area=tea;sa=jabber and pick a username and enter a password there is nothing to do this bit automatically.

That said you do have a problem. Your Cron job isn't right you are thinking the script is executable ... it isn't you have to run php with the script as a parameter ... if you create a script in /etc/cron.d you need to add something like :

0 */1 * * * XXXXX /usr/bin/php5 /home/sites/lawnalliance.org/forum/TEA/TEA_Jabber_Cron_Access.php

where XXXXX is the user that your forum folder is owned by.



That's unfortunate then since I don't have much else left to try.

I wish i knew where to look for any sort of error log that would at least point me in the right direction. As it stands I simply don't know enough to troubleshoot blindly.

I would say that it's pretty apparent that TEA/SMF is able to read the Openfire database but is unable to write to it. Is it a possible firewall issue? Some outdated php extension?

I wonder if I don't need to just try a different Linux distro and hope for the best.
Amallya Trueshot
Aliastra
Gallente Federation
#507 - 2013-08-14 02:16:41 UTC
Have smf 2.0.4 with tea .r175 running.

Openfire Jabber Server working 100% without errors.
Grab me on evecloud ingame channel, and i'll help you.

cheers
Shin Chogan
Federal Navy Academy
Gallente Federation
#508 - 2013-08-14 02:42:58 UTC  |  Edited by: Shin Chogan
Ash Darkvold wrote:
Shin Chogan wrote:


Not quite ... The accounts in openfire are created when the person modifies their profile to set their openfire password ... the cron job only modifies their groups or removes the account from openfire.

The users themselves HAVE to go to *domain*/index.php?action=profile;area=tea;sa=jabber and pick a username and enter a password there is nothing to do this bit automatically.

That said you do have a problem. Your Cron job isn't right you are thinking the script is executable ... it isn't you have to run php with the script as a parameter ... if you create a script in /etc/cron.d you need to add something like :

0 */1 * * * XXXXX /usr/bin/php5 /home/sites/lawnalliance.org/forum/TEA/TEA_Jabber_Cron_Access.php

where XXXXX is the user that your forum folder is owned by.



That's unfortunate then since I don't have much else left to try.

I wish i knew where to look for any sort of error log that would at least point me in the right direction. As it stands I simply don't know enough to troubleshoot blindly.

I would say that it's pretty apparent that TEA/SMF is able to read the Openfire database but is unable to write to it. Is it a possible firewall issue? Some outdated php extension?

I wonder if I don't need to just try a different Linux distro and hope for the best.


Just to correct something ... TEA/SMF doesn't write to the Openfire DB ... it hits the http address you set with a list of parameters.

Try hitting *domain*/plugins/userService/userservice?type=add&secret=XXXX&username=XXXX&password=XXXX&name=XXXX&email=XXXX&groups=XXXX

replace XXXX with appropriate values.
secret is the User Service secret set in your openfire config (and should be set in the SMF config page)

If that doesn't add a user then you have a config problem with openfire.

Packet traces may be your friend here
Ash Darkvold
Corsair Navy
#509 - 2013-08-14 03:34:07 UTC
Shin Chogan wrote:

Just to correct something ... TEA/SMF doesn't write to the Openfire DB ... it hits the http address you set with a list of parameters.

Try hitting *domain*/plugins/userService/userservice?type=add&secret=XXXX&username=XXXX&password=XXXX&name=XXXX&email=XXXX&groups=XXXX

replace XXXX with appropriate values.
secret is the User Service secret set in your openfire config (and should be set in the SMF config page)

If that doesn't add a user then you have a config problem with openfire.

Packet traces may be your friend here


Yeah, worked like a charm. Added the user to the Openfire group I had created for TEA and everything.

Oddly enough it only worked once I removed the IP addresses from the User Service whitelist. Unfortunately that did not have any effect on the forum functionality.

I'll do some research on packet traces tomorrow at work
Shin Chogan
Federal Navy Academy
Gallente Federation
#510 - 2013-08-14 03:50:27 UTC
reaaaaalllly stupid question but you do have "Enable Jabber for TEA Mod" ticked ? Lol
Ash Darkvold
Corsair Navy
#511 - 2013-08-14 14:57:20 UTC
Shin Chogan wrote:
reaaaaalllly stupid question but you do have "Enable Jabber for TEA Mod" ticked ? Lol

I really wish it were that simple. Big smile

So far from all the testing I'd say that we can establish the following:

-SMF/TEA is able to connect to the Openfire database and read the ofGroup table
-SMF/TEA is then able to use that data to populate the Tea for Jabber groups
-The User Service plugin is able to add new users to the Openfire DB through HTTP

So to me this means that something is getting bound up in the way that TEA is trying to use the User Service plugin. It also seems like nothing matters (in the user creation portion) aside from the URL to Admin Page and the Secret Passcode since User Service does not seem to need the DB username/password and just uses the secret word for account creation.

The more I learn about this the more inclined I am to believe that it's just a compatibility issue with some piece of software I'm using. None of it seems very complicated to get running and most of the plugins don't need much in the way of configuration.

Is it possible that my version of php is just outdated? I tried to look for other SMF plugins that use the User Service plugin in order to test that theory but it seems like TEA is the only one out there.

If you'd like I can make you a temp Admin account so you can see if there's anything I'm missing.
ShadowandLight
Trigger Happy Capsuleers
#512 - 2013-08-14 15:35:23 UTC
Can someone tell me the recommended cronjob intervals?

and do i run only tea_cron.php or do I run all 4?

tea_cron.php
TEA_TS_Cron_Names.php
TEA_Jabber_Cron_Access.php
TEA_TS_Cron_Access.php
Ash Darkvold
Corsair Navy
#513 - 2013-08-14 16:02:40 UTC
ShadowandLight wrote:
Can someone tell me the recommended cronjob intervals?

and do i run only tea_cron.php or do I run all 4?

tea_cron.php
TEA_TS_Cron_Names.php
TEA_Jabber_Cron_Access.php
TEA_TS_Cron_Access.php

I run mine every minute but you can probably back that down to once every five minutes I'd imagine. Like Shin said, it all depends on how long you're ok with people retaining access to the IT services after they leave.

As far as which ones to run it all comes down to whether you're using the TS3 and Jabber parts of TEA or not. If you are then running the additional cron jobs is probably a good idea.
redlinedracer
ASMODEUS INFINITE
#514 - 2013-08-14 20:31:38 UTC
Sorry to spam questions but i really want to know how to set this up:


Im trying to setup the teamspeak part of the mod, and i think i might be in over my head but i REALLY want this to work.


Ill put my questions in a very easy to answer fashion hopefully :P

1: The address of the host is just the teamspeak server address correct?

2: Where would i find the server query port? I think the default is 10011 (which i have enterd)

3: Where do i find the Query username and password? Is that just the Admin login info?

4: What the heck is the "Teamspeak Info"? Didnt i already put in the info with the address and port?

5: How do i setup a database for teamspeak? I have up to 10 databases on godaddy.

6: Database host im assuming is just "localhost" since the database i create will be the same as my host database?

7: Username / Password is whatever i setup im assuming for the created database

8: What is the "Database and table names"? and where do i get them?

9: What is "Online Method"? And do i want it to run?

10: What is "TS UniqueID Method"? and do i want it to run?

11: Do i want incorrect name warnings?
Ash Darkvold
Corsair Navy
#515 - 2013-08-15 01:53:15 UTC
Fixed it! Big smile

Going back to my guess that something might be wrong with PHP I decided to enable error logging in an attempt to see where the process was breaking. While editing the php.ini file (located in /etc/php.ini) I noticed that the short_open_tag option was turned off. Having spent a number of hours staring at the PHP scripts I thought I recognized the tags that the description was referring to. The combination of that and the fact that the default value was supposed to be On led me to make the switch.

Once I made that change everything started working just like it was supposed to all along. I have no idea how that got turned off in the first place but I sure am glad that it's fixed.

Now I can work on getting TS3 and/or Mumble working!

Thanks for all the help!
Bnizzle
Goosefleet
Gooseflock Featheration
#516 - 2013-08-17 02:40:21 UTC
Having an issue where we cann get the Teamspeak admin section to load.

From Admin -> Configuration -> Temar's Eve Api -> Teamspeak only returns a internal server error.

From the logs i can see
Quote:
[Wed Aug 14 17:38:14 2013] [error] [client 139.168.197.61] PHP Fatal error: Class 'TeamSpeak3_Helper_Profiler' not found in /var/www/xxx/Sources/TS3_Class/TeamSpeak3.php on line 516, referer: http://xxxt/index.php?action=admin;area=tea;sa=ts


We have changed the permissions on that section and deleted it and readded the files. I have also noticed that the smf_tea_ts_* tables are completely empty.

Any help would be amazing!

Space 'strayan

Zenith Gravit
LionGate Enterprises
#517 - 2013-08-17 22:14:16 UTC
I'm not sure if this is an error or not, but our corp has some friends in NPC corps who are Blue to us. They're Blue by corp contact, but TEA won't add them to the Blues group. There's another person who is in a player corp, that isn't in our alliance, his corp is blue to us and he's fine.

Do corp standings for individuals not count?
Shin Chogan
Federal Navy Academy
Gallente Federation
#518 - 2013-08-18 07:38:41 UTC
Bnizzle wrote:
Having an issue where we cann get the Teamspeak admin section to load.

From Admin -> Configuration -> Temar's Eve Api -> Teamspeak only returns a internal server error.

From the logs i can see
Quote:
[Wed Aug 14 17:38:14 2013] [error] [client 139.168.197.61] PHP Fatal error: Class 'TeamSpeak3_Helper_Profiler' not found in /var/www/xxx/Sources/TS3_Class/TeamSpeak3.php on line 516, referer: http://xxxt/index.php?action=admin;area=tea;sa=ts


We have changed the permissions on that section and deleted it and readded the files. I have also noticed that the smf_tea_ts_* tables are completely empty.

Any help would be amazing!


Is there anything extra in your apache logs when you try and access the page ?

The code looks like it uses autoload to load in the appropriate class from the /var/www/xxx/Sources/TS3_Class/Helper Sub directory. Is there something about your php.ini that would stop that from working ?
Bnizzle
Goosefleet
Gooseflock Featheration
#519 - 2013-08-18 08:38:33 UTC
Shin Chogan wrote:


Is there anything extra in your apache logs when you try and access the page ?

The code looks like it uses autoload to load in the appropriate class from the /var/www/xxx/Sources/TS3_Class/Helper Sub directory. Is there something about your php.ini that would stop that from working ?


We haven't change the php.ini file so as far as I am aware it should still be at default. I will keep looking through it though.

I am seeing this error now when trying to access the TS admin area

Quote:
[Sun Aug 18 18:33:49 2013] [error] [client 123.3.246.7] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 523800 bytes) in /var/www/xxx/Sources/TS3_Class/Transport/TCP.php on line 148,$e 148, referer: http://xxx/index.php?action=admin

Space 'strayan

Shin Chogan
Federal Navy Academy
Gallente Federation
#520 - 2013-08-18 09:13:12 UTC  |  Edited by: Shin Chogan
Bnizzle wrote:
Shin Chogan wrote:


Is there anything extra in your apache logs when you try and access the page ?

The code looks like it uses autoload to load in the appropriate class from the /var/www/xxx/Sources/TS3_Class/Helper Sub directory. Is there something about your php.ini that would stop that from working ?


We haven't change the php.ini file so as far as I am aware it should still be at default. I will keep looking through it though.

I am seeing this error now when trying to access the TS admin area

Quote:
[Sun Aug 18 18:33:49 2013] [error] [client 123.3.246.7] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 523800 bytes) in /var/www/xxx/Sources/TS3_Class/Transport/TCP.php on line 148,$e 148, referer: http://xxx/index.php?action=admin



Bingo ... we have a winner ... at least sort of ... it is running out of memory ... though you have 128MB allocated which is the default and the same as I have but my page TS page loads just fine ... Ant WTF is it doing using more than 128MB of Memory

Can you look in your xxx_settings table and look for any settings that start with tea_ts ?