B3 mac...

Tout ce qui concerne la configuration et l'administration des serveurs.
Rendez-vous dans Outils de communication & communautaires pour la conception de sites Internet.
Avatar du membre
Tiroly
Messages : 44
Enregistré le : 12 oct. 2008, 09:11

Message par Tiroly » 30 mai 2009, 13:34

Bon nouveau log...

Il ne semble pas pouvoir se connecter à sql et à rcon :/

Mon fichier xml de config :

Code : Tout sélectionner

<set name="database">mysql://4200flash2:*********@sql5.power-heberg.net/4200flash2</set>
		<set name="rcon_password">**********</set>
		<set name="rcon_ip">127.0.0.1</set>

Code : Tout sélectionner

090530 13:31:18	BOT    	Starting Iourt41Parser server for localhost:27950
090530 13:31:18	BOT    	--------------------------------------------
090530 13:31:18	BOT    	Attempting to connect to database mysql://4200flash2:******@sql5.power-heberg.net/4200flash2...
090530 13:31:18	ERROR	Database connection failed, working in remote mode: (1045, "Access denied for user '4200flash2'@'trz49-1-88-168-135-13.fbx.proxad.net' (using password: YES)") - [('/Users/Romuald/Downloads/b3-p/b3/storage.py', 190, 'connect', 'self.db = self.getConnection()'), ('/Users/Romuald/Downloads/b3-p/b3/storage.py', 149, 'getConnection', "return MySQLdb.connect(host=self.dsnDict['host'], user=self.dsnDict['user'], passwd=self.dsnDict['password'], db=self.dsnDict['path'][1:])"), ('/opt/local/lib/python2.5/site-packages/MySQLdb/__init__.py', 74, 'Connect', 'return Connection(*args, **kwargs)'), ('/opt/local/lib/python2.5/site-packages/MySQLdb/connections.py', 170, '__init__', 'super(Connection, self).__init__(*args, **kwargs2)')]
090530 13:31:18	BOT    	Game log /Users/Romuald/Library/Application Support/Quake3/q3ut4/games.log
090530 13:31:18	BOT    	Starting bot reading file /Users/Romuald/Library/Application Support/Quake3/q3ut4/games.log
090530 13:31:18	BOT    	Loading Plugin #1 censor [/Users/Romuald/Downloads/b3-p/b3/conf/plugin_censor.xml]
090530 13:31:18	BOT    	CensorPlugin: Loading config /Users/Romuald/Downloads/b3-p/b3/conf/plugin_censor.xml for CensorPlugin
090530 13:31:18	BOT    	Plugin censor (2.1.0 - ThorN) loaded
090530 13:31:18	BOT    	Loading Plugin #2 spamcontrol [/Users/Romuald/Downloads/b3-p/b3/conf/plugin_spamcontrol.xml]
090530 13:31:18	BOT    	SpamcontrolPlugin: Loading config /Users/Romuald/Downloads/b3-p/b3/conf/plugin_spamcontrol.xml for SpamcontrolPlugin
090530 13:31:18	BOT    	Plugin spamcontrol (1.1.2 - ThorN) loaded
090530 13:31:18	BOT    	Loading Plugin #3 admin [/Users/Romuald/Downloads/b3-p/b3/conf/plugin_admin.xml]
090530 13:31:18	BOT    	AdminPlugin: Loading config /Users/Romuald/Downloads/b3-p/b3/conf/plugin_admin.xml for AdminPlugin
090530 13:31:18	BOT    	Plugin admin (1.3.4b0 - ThorN) loaded
090530 13:31:18	BOT    	Loading Plugin #4 tk [/Users/Romuald/Downloads/b3-p/b3/conf/plugin_tk.xml]
090530 13:31:18	BOT    	TkPlugin: Loading config /Users/Romuald/Downloads/b3-p/b3/conf/plugin_tk.xml for TkPlugin
090530 13:31:18	BOT    	Plugin tk (1.1.6b0 - ThorN) loaded
090530 13:31:18	BOT    	Loading Plugin #5 stats [/Users/Romuald/Downloads/b3-p/b3/conf/plugin_stats.xml]
090530 13:31:18	BOT    	StatsPlugin: Loading config /Users/Romuald/Downloads/b3-p/b3/conf/plugin_stats.xml for StatsPlugin
090530 13:31:18	BOT    	Plugin stats (1.2.3 - ThorN) loaded
090530 13:31:18	BOT    	Loading Plugin #6 pingwatch [/Users/Romuald/Downloads/b3-p/b3/conf/plugin_pingwatch.xml]
090530 13:31:18	BOT    	PingwatchPlugin: Loading config /Users/Romuald/Downloads/b3-p/b3/conf/plugin_pingwatch.xml for PingwatchPlugin
090530 13:31:18	BOT    	Plugin pingwatch (1.1.4 - ThorN) loaded
090530 13:31:18	BOT    	Loading Plugin #7 adv [/Users/Romuald/Downloads/b3-p/b3/conf/plugin_adv.xml]
090530 13:31:18	BOT    	AdvPlugin: Loading config /Users/Romuald/Downloads/b3-p/b3/conf/plugin_adv.xml for AdvPlugin
090530 13:31:18	BOT    	Plugin adv (1.1.2 - ThorN) loaded
090530 13:31:18	BOT    	Loading Plugin #8 status [/Users/Romuald/Downloads/b3-p/b3/conf/plugin_status.xml]
090530 13:31:18	BOT    	StatusPlugin: Loading config /Users/Romuald/Downloads/b3-p/b3/conf/plugin_status.xml for StatusPlugin
090530 13:31:18	BOT    	Plugin status (1.2.5 - ThorN) loaded
090530 13:31:18	BOT    	Loading Plugin #9 welcome [/Users/Romuald/Downloads/b3-p/b3/conf/plugin_welcome.xml]
090530 13:31:18	BOT    	WelcomePlugin: Loading config /Users/Romuald/Downloads/b3-p/b3/conf/plugin_welcome.xml for WelcomePlugin
090530 13:31:18	BOT    	Plugin welcome (1.0.2 - ThorN) loaded
090530 13:31:18	BOT    	Attempting to connect to database mysql://4200flash2:******@sql5.power-heberg.net/4200flash2...
090530 13:31:18	BOT    	Client not found in the storage WORLD, create new
090530 13:31:18	BOT    	Attempting to connect to database mysql://4200flash2:******@sql5.power-heberg.net/4200flash2...
090530 13:31:18	ERROR	RCON: ERROR reading: timed out
090530 13:31:18	ERROR	RCON: ERROR sending: (61, 'Connection refused')
090530 13:31:19	ERROR	RCON: ERROR reading: timed out
090530 13:31:19	ERROR	RCON: ERROR sending: (61, 'Connection refused')
090530 13:31:19	ERROR	RCON: ERROR reading: timed out
090530 13:31:19	ERROR	RCON: ERROR sending: (61, 'Connection refused')
090530 13:31:19	BOT    	Shutting down...
090530 13:31:19	BOT    	Shutting down database connections...
Modifié en dernier par Tiroly le 30 mai 2009, 13:35, modifié 1 fois.
The answer to life, the universe and everything is ... 42
http://tiroly.free.fr

Avatar du membre
sta0
Messages : 1444
Enregistré le : 04 mars 2008, 19:25
Localisation : Derrière le bar

Message par sta0 » 30 mai 2009, 13:40

d'après moi tu n'as pas besoin de mettre /flash4200 dans ton adresse mysql
Ceci est un petit texte qui sera ajouté en bas de tous les messages que vous rédigez. Il est limité à 256 caractères.

Mael
Ancien responsable UTF
Messages : 1223
Enregistré le : 30 juin 2008, 19:10
Localisation : un peu plus a droite

Message par Mael » 30 mai 2009, 13:50

Si car c'est l'emplacement de la base de donnée
#mG`M@3l
Tousse pour un, rhume pour tous

Avatar du membre
Tiroly
Messages : 44
Enregistré le : 12 oct. 2008, 09:11

Message par Tiroly » 30 mai 2009, 13:56

J'ai quand même essayer sans, mais le problème ne vient pas de la ( même problème )
The answer to life, the universe and everything is ... 42
http://tiroly.free.fr

Avatar du membre
Courgette
Messages : 850
Enregistré le : 22 déc. 2007, 02:05
Localisation : Rennes

Message par Courgette » 31 mai 2009, 00:18

Code : Tout sélectionner

ERROR    Database connection failed, working in remote mode: (1045, "Access denied for user '4200flash2'@'trz49-1-88-168-135-13.fbx.proxad.net' (using password: YES)")
Ca veut dire que (attention ça défouraille) :
l'utilisateur 4200flash2 n'est pas autorisé à utiliser
la base de donnée 4200flash2 qui est hébergée sur
la machine trz49-1-88-168-135-13.fbx.proxad.net à partir de
la machine qui execute B3

il faut que tu contactes l'admin de la BDD trz49-1-88-168-135-13.fbx.proxad.net pour lui demander qu'il autorise les connections de l'utilisateur 4200flash2 à partir de l'ip de la machine qui execute B3


Pour les problèmes RCON, vérifie bien que

Code : Tout sélectionner

<set name="port">28960</set>
correspond bien au port utilisé par le serveur UrT.

Avatar du membre
Tiroly
Messages : 44
Enregistré le : 12 oct. 2008, 09:11

Message par Tiroly » 04 juin 2009, 18:23

Hum je pense qu'il doit avoir une érreu de configuration de ma part mais la machine 88.168.135.13 ... c'est la mienne :/

Ce que je veux au final c'est récupérer les infos de mysql en php pour le site de team...

Peut être vaut-il mieu que j'utilise le mysql de mon ordi et que je me connecte en php sur mon ordi?

Mon site est hébergé sur power heberg ( pour les noms )

Pour rcon je vérif sa tout à l'heure suis sur mon tel la...
The answer to life, the universe and everything is ... 42
http://tiroly.free.fr

Avatar du membre
Tiroly
Messages : 44
Enregistré le : 12 oct. 2008, 09:11

Message par Tiroly » 04 juin 2009, 18:37

à euh nouvelles érreurs :

Code : Tout sélectionner

090604 18:34:03	BOT    	Starting Iourt41Parser server for 127.0.0.1:28960
090604 18:34:03	BOT    	--------------------------------------------
090604 18:34:03	BOT    	Attempting to connect to database mysql://4200flash2:******@sql5.power-heberg.net...
090604 18:34:03	ERROR	Database connection failed, working in remote mode: No module named MySQLdb - [('/Users/Romuald/Downloads/b3-p/b3/storage.py', 190, 'connect', 'self.db = self.getConnection()'), ('/Users/Romuald/Downloads/b3-p/b3/storage.py', 148, 'getConnection', 'import MySQLdb')]
090604 18:34:03	BOT    	Game log /Users/Romuald/Library/Application Support/Quake3/q3ut4/games.log
090604 18:34:03	BOT    	Starting bot reading file /Users/Romuald/Library/Application Support/Quake3/q3ut4/games.log
090604 18:34:03	BOT    	Loading Plugin #1 censor [/Users/Romuald/Downloads/b3-p/b3/conf/plugin_censor.xml]
090604 18:34:03	BOT    	CensorPlugin: Loading config /Users/Romuald/Downloads/b3-p/b3/conf/plugin_censor.xml for CensorPlugin
090604 18:34:03	CRITICAL	Error loading plugin: 'generator' object is unsubscriptable
Traceback (most recent call last):
  File "/Users/Romuald/Downloads/b3-p/b3/parser.py", line 331, in loadPlugins
    self._plugins[p] = getattr(pluginModule, '%sPlugin' % p.title())(self, conf)
  File "/Users/Romuald/Downloads/b3-p/b3/plugin.py", line 41, in __init__
    self.loadConfig(config)
  File "/Users/Romuald/Downloads/b3-p/b3/plugin.py", line 85, in loadConfig
    return self.onLoadConfig()
  File "/Users/Romuald/Downloads/b3-p/b3/plugins/censor.py", line 72, in onLoadConfig
    penalty = self.config.get('badwords/penalty')[0]
TypeError: 'generator' object is unsubscriptable
The answer to life, the universe and everything is ... 42
http://tiroly.free.fr

Avatar du membre
Foxyfox
Responsable de branche
Responsable de branche
Messages : 1933
Enregistré le : 13 févr. 2008, 00:30
Localisation : Reims

Message par Foxyfox » 04 juin 2009, 19:25

Power Heberg n'autorise pas les connexions externes SQL si je me souviens bien.
Ce qui ne me tue pas me rend plus fort

Avatar du membre
Tiroly
Messages : 44
Enregistré le : 12 oct. 2008, 09:11

Message par Tiroly » 06 juin 2009, 15:29

sa avance !!
le rcon s'est mit à fonctionner tout seul... pourvu que sa dure
Pour power-heberg j'ai du payer un peu mais c'est réparer :)

Code : Tout sélectionner

090606 15:29:59	BOT    	Plugin welcome (1.0.2 - ThorN) loaded
090606 15:29:59	BOT    	Client not found in the storage WORLD, create new
090606 15:30:06	ERROR	getPlayerList() = Line did not match :map: ut4_boxtrot_v1
090606 15:30:06	ERROR	getPlayerList() = Line did not match :num score ping name            lastmsg address               qport rate
090606 15:30:06	ERROR	getPlayerList() = Line did not match :--- ----- ---- --------------- ------- --------------------- ----- -----
090606 15:30:07	BOT    	Starting Plugin censor
090606 15:30:07	BOT    	Starting Plugin spamcontrol
090606 15:30:07	BOT    	Starting Plugin admin
090606 15:30:08	BOT    	Starting Plugin tk
090606 15:30:08	BOT    	Starting Plugin stats
090606 15:30:08	BOT    	Starting Plugin pingwatch
090606 15:30:08	BOT    	Starting Plugin adv
090606 15:30:08	BOT    	Starting Plugin status
090606 15:30:08	BOT    	Starting Plugin welcome
090606 15:30:08	BOT    	Start reading...
voila j'ai mi que la fin
Modifié en dernier par Tiroly le 06 juin 2009, 15:30, modifié 1 fois.
The answer to life, the universe and everything is ... 42
http://tiroly.free.fr

Avatar du membre
Tiroly
Messages : 44
Enregistré le : 12 oct. 2008, 09:11

Message par Tiroly » 06 juin 2009, 15:31

en faite sa à l'air de marcher,
Merci à tous ;) Sa marche bien sous mac donc ;)
The answer to life, the universe and everything is ... 42
http://tiroly.free.fr

Avatar du membre
Courgette
Messages : 850
Enregistré le : 22 déc. 2007, 02:05
Localisation : Rennes

Message par Courgette » 06 juin 2009, 22:17

:)

Peux-tu faire un petit résumé de comment faire pour installer python, python-mysqldb et python-elementtree sous mac ?

Avatar du membre
Tiroly
Messages : 44
Enregistré le : 12 oct. 2008, 09:11

Message par Tiroly » 06 juin 2009, 22:55

Ok Donc pour pour installer b3 il faut bien python, python-mysqldb et python-elementtree.

python:
pas de problème la version 2.5 est installée par défault, avec la 3 sa ne semble en revanche pas marcher. ( Si snow léopard l'intègre j'èspère que sa fonctionnera bien ( je le signale dès que c'est sortit )

python-mysqldb
C'est pas le plus simple...
- Il faut avoir mac port http://www.macports.org/install.php, C'est un installateur d'application par le terminal. ( équivalent de atp-get sous linux )
Ouvrir le terminal ( /applications/utilitaires )
tapez pour instaler mysql:

Code : Tout sélectionner

sudo port install mysql5
which mysql5
/opt/local/bin/mysql5
Ou télécharger la dernière version sur le site officiel...
http://dev.mysql.com/downloads/mysql/5.1.html
Pour information x86 signifie mac intel.

Pour python-mysqldb en lui même...

Code : Tout sélectionner

wget http://internap.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python-1.2.2.tar.gz
tar xzvf MySQL-python-1.2.2.tar.gz
cd MySQL-python-1.2.2

vi edit _mysql.c

    - #ifndef uint
    - #define uint unsigned int
    - #endif

    - uint port = MYSQL_PORT;
    - uint client_flag = 0;
    + unsigned int port = MYSQL_PORT;
    + unsigned int client_flag = 0;



vi setup_posix.py

    - mysql_config.path = "mysql_config"
    + mysql_config.path = "/opt/local/bin/mysql_config5"

sudo ln -s /opt/local/lib/mysql5/mysql/ /usr/local/mysql/lib/mysql

python setup.py build
python setup.py install

python

    >>> import MySQLdb
tout sa dans le terminal et sa doit marcher sans soucis, sinon je peu préciser la manière manuel sur demande ;)


python-elementtree

Code : Tout sélectionner

 
sudo port install py25-elementtree
NB :
Python ne gère pas les chemin de fichiers comme le terminal ainsi le nom

Code : Tout sélectionner

.../Application Support/...
devient :

Code : Tout sélectionner

.../Application Support/...
Voili voilou si d'autre mac users ont des probleme n'hésitez pas à poster !



Perso je dois juste trouver comment faire marcher le compteur de HS et apprendre à manier B3.
Les stats s'affichent sur notre site de team ( un peu buggé ) http://4200flash.com/AandS/
The answer to life, the universe and everything is ... 42
http://tiroly.free.fr

Avatar du membre
Courgette
Messages : 850
Enregistré le : 22 déc. 2007, 02:05
Localisation : Rennes

Message par Courgette » 07 juin 2009, 03:16

pfiou, c'est pas simple. Merci pour ces précieuses indications.

Sinon, c'est normal que ça ne marche pas avec python 3. En effet cette version du language n'est pas "backward compatible". Toutefois il existe un outil pour porter du code python 2.x vers 3.x mais j'ai peur que pour un gros projet comme B3, ce soit la croix et la bannière.

Avatar du membre
MathX
Messages : 216
Enregistré le : 05 sept. 2008, 23:18

Message par MathX » 07 juin 2009, 10:32

Le projet qui transforme le code de Python 2.x vers Python 3.0.x marche assez bien au niveau syntaxique mais il reste encore le problème des libraires qui ne sont pas compatibles (je pense à mysql-python par exemple).

Avatar du membre
Tiroly
Messages : 44
Enregistré le : 12 oct. 2008, 09:11

Mise à jour

Message par Tiroly » 05 sept. 2009, 19:23

Bonjour !

Quelques mises à jour concernant mes informations :

Pour commencer il est compatible sur snow léopard et la technique ne change pas.

Pour installer "mysqldb" on peu plus simplement passer par le terminal :

Code : Tout sélectionner

sudo port install py25-mysql
ou 
sudo port install py26-mysql
( si vous n'avez pas la version 2.6 je déconseille ... ( installation supplémentaire )
Il sera également compilé.

Python ne gère pas les chemin de fichiers comme le terminal ainsi le nom
Code:
.../Application\ Support/...

devient :
Code:
.../Application Support/...

exemple :

Code : Tout sélectionner

		<set name="game_log">/Users/Romuald/Library/Application Support/Quake3/q3ut4/games.log</set>

L'installation des dépendances donne donc simplement au final (avec mac port installé ) :

Code : Tout sélectionner

sudo port install mysql5
port install py26-mysql
port install py26-elementtree
port py26-setuptools
C'est ti pas beau ? :D

Je reste évidement si quelqu'un veut des infos supplémentaires sur mac
The answer to life, the universe and everything is ... 42
http://tiroly.free.fr

Répondre