You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by DD...@stl-inc.com on 2001/04/18 14:08:53 UTC

Turbine and MYSQL difficulties resubmitted

The platform : PC (Pentium class).
Environment : Linux (Storm)
Database : mysql-3.22.32-pc-linux-gnu-i686
JDK: JDK1.3

I am trying your Turbine (TDK) for development of a web store.
I have APACHE / MYSQL running on a server using Linux as the OS,
and it is specified at an IP address of 192.81.93.5 or "Linuxsvr1"
I was using Tomcat, but loaded your TDK package instead and tried to
get it off the ground....


I have Apache and MYSQL running but not Catalina and I am building
this by way of a Windows NT4 machine with an ssh connection to the
server (Linuxsvr1) machine over a network.  The build is occuring on
the Linux box.


where do you set "turbine.app.type=peer"? .... This might be the missing
piece....
my problem lies in the MYSQL parameters.... here is the error....
on the INITIALIZE build

       @ the end of the build



****************************************************************************
***********************************************************
create-database:
/usr/local/tdk/webapps/donald/WEB-INF/src/sql/create-database.sh
     [exec] mysqladmin: connect to server at '192.81.93.5:3306' failed
     [exec] error: 'Unknown MySQL Server Host '192.81.93.5:3306' (2)'
     [exec] Check that mysqld is running on 192.81.93.5:3306 and that the
port is 3306.
     [exec] You can check this by doing 'telnet 192.81.93.5:3306 3306'
     [exec] mysqladmin: connect to server at '192.81.93.5:3306' failed
     [exec] error: 'Unknown MySQL Server Host '192.81.93.5:3306' (2)'
     [exec] Check that mysqld is running on 192.81.93.5:3306 and that the
port is 3306.
     [exec] You can check this by doing 'telnet 192.81.93.5:3306 3306'
     [exec] Result: 1

insert-sql:

insert-sql-file:

BUILD FAILED

/usr/local/tdk/webapps/donald/WEB-INF/build/build-project.xml:381:
java.sql.SQLException: Invalid authorization specification: Acc
ess denied for user: 'main@Linuxsvr1' (Using password: YES)
java.sql.SQLException: Invalid authorization specification: Access denied
for user: 'main@Linuxsvr1' (Using password: YES)
        at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:330)
        at org.gjt.mm.mysql.Connection.connectionInit(Connection.java:261)
        at
org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Connection.java:89)
        at org.gjt.mm.mysql.Driver.connect(Driver.java:167)
        at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:352)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.Project.executeTargets(Project.java:510)
        at org.apache.tools.ant.Main.runBuild(Main.java:421)
        at org.apache.tools.ant.Main.main(Main.java:149)
****************************************************************************
**************************************************************


Here is some computer configuration information to help issolate the
difficulty........

Total time: 47 seconds
admindude@Linuxsvr1:/usr/local/tdk/webapps/donald/WEB-INF/build$ ps aux
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.7  1020  464 ?        S    16:32   0:06 init [2]
root         2  0.0  0.0     0    0 ?        SW   16:32   0:00 [kflushd]
root         3  0.0  0.0     0    0 ?        SW   16:32   0:04 [kupdate]
root         4  0.0  0.0     0    0 ?        SW   16:32   0:00 [kpiod]
root         5  0.0  0.0     0    0 ?        SW   16:32   0:00 [kswapd]
root         6  0.0  0.0     0    0 ?        SW   16:32   0:00 [khubd]
root         7  0.0  0.0     0    0 ?        SW<  16:32   0:00 [mdrecoveryd]
daemon      87  0.0  0.4  1128  312 ?        S    16:32   0:00 /sbin/portmap
root       146  0.0  0.9  1352  596 ?        S    16:32   0:00 /sbin/syslogd
root       148  0.0  1.0  1312  644 ?        S    16:32   0:00 /sbin/klogd
bind       168  0.0  1.4  2292  936 ?        S    16:32   0:00
/usr/sbin/named -u bind -g bind
root       172  0.0  0.8  1056  508 ?        S    16:32   0:00
/sbin/rpc.statd
root       175  0.0  0.0     0    0 ?        SW   16:32   0:00 [lockd]
root       176  0.0  0.0     0    0 ?        SW   16:32   0:00 [rpciod]
root       186  0.0  0.4  1048  304 ?        S    16:32   0:00
/usr/sbin/gpm -m /dev/psaux -t ps2 -Rms3
root       191  0.0  0.8  1300  508 ?        S    16:32   0:00
/usr/sbin/inetd
root       197  0.0  0.8  1352  516 ?        S    16:32   0:00 /usr/sbin/lpd
root       203  0.0  0.4  1388  300 ?        S    16:32   0:00 /usr/sbin/mid
nobody     209  0.0  0.6  1436  384 ?        S    16:32   0:00
/usr/sbin/oidentd -s -m -W -N -u nobody -g nogroup
root       221  0.0  1.1  2240  724 ?        S    16:32   0:00
/usr/sbin/sshd
nobody     224  0.0  3.7  3672 2352 ?        S    16:32   0:00
/usr/bin/X11/xfs-xtt -user nobody
root       230  0.0  0.7  2092  496 ?        S    16:32   0:00 proftpd
(accepting connections)
daemon     233  0.0  0.5  1140  328 ?        S    16:32   0:00 /usr/sbin/atd
root       236  0.0  0.9  1168  572 ?        S    16:32   0:00
/usr/sbin/cron
root       240  0.0  0.7  1004  444 tty2     S    16:32   0:00 /sbin/getty
38400 tty2
root       241  0.0  0.7  1004  444 tty3     S    16:32   0:00 /sbin/getty
38400 tty3
root       242  0.0  0.7  1004  444 tty4     S    16:32   0:00 /sbin/getty
38400 tty4
root       243  0.0  0.7  1004  444 tty5     S    16:32   0:00 /sbin/getty
38400 tty5
root       244  0.0  0.7  1004  444 tty6     S    16:32   0:00 /sbin/getty
38400 tty6
root       245  0.0  1.8  2220 1200 ?        S    16:32   0:00 nmbd -a
root       257  0.0  1.2  2060  784 ?        S    16:33   0:00
/usr/local/apache/sbin/httpd
nobody     258  0.0  1.2  2084  816 ?        S    16:33   0:00
/usr/local/apache/sbin/httpd
nobody     259  0.0  0.8  2060  532 ?        S    16:33   0:00
/usr/local/apache/sbin/httpd
nobody     260  0.0  0.8  2060  532 ?        S    16:33   0:00
/usr/local/apache/sbin/httpd
nobody     261  0.0  1.2  2084  816 ?        S    16:33   0:00
/usr/local/apache/sbin/httpd
nobody     262  0.0  0.8  2060  532 ?        S    16:33   0:00
/usr/local/apache/sbin/httpd
root       272  0.0  0.7  1004  444 tty1     S    16:34   0:00 /sbin/getty
38400 tty1
root       273  0.0  2.1  2936 1332 ?        S    16:34   0:03
/usr/sbin/sshd
admindud   277  0.0  1.9  1992 1212 pts/0    S    16:35   0:00 -bash
root       380  0.0  1.3  1748  848 pts/0    S    16:45   0:00 sh
./bin/safe_mysqld --log
root       387  0.0  2.3 11256 1484 pts/0    SN   16:45   0:00
/usr/local/mysql-3.22.32-pc-linux-gnu-i686/bin/mysqld --basedir=/us
root       389  0.0  2.3 11256 1484 pts/0    SN   16:45   0:00
/usr/local/mysql-3.22.32-pc-linux-gnu-i686/bin/mysqld --basedir=/us
root       390  0.0  2.3 11256 1484 pts/0    SN   16:45   0:00
/usr/local/mysql-3.22.32-pc-linux-gnu-i686/bin/mysqld --basedir=/us
nobody     667  0.0  1.3  2060  852 ?        S    17:50   0:00
/usr/local/apache/sbin/httpd
nobody     668  0.0  1.3  2060  852 ?        S    17:50   0:00
/usr/local/apache/sbin/httpd
admindud  1132  0.0  1.5  2676 1008 pts/0    R    18:58   0:00 ps aux




admindude@Linuxsvr1:/usr/local/tdk$ env
PWD=/usr/local/tdk
CATALINA_HOME=/usr/local/tdk
HOSTNAME=Linuxsvr1
CLASSPATH=:/usr/local/jdk1.3/lib/mysql_comp.jar:/usr/local/jdk1.3/lib/mysql_
uncomp.jar
PS1=\u@\h:\w\$
USER=admindude
MACHTYPE=i386-pc-linux-gnu
MAIL=/var/spool/mail/admindude
LANG=C
TOMCAT_HOME=/usr/local/jakarta-tomcat
JAVA_HOME=/usr/local/jdk1.3
SSH_CLIENT=192.81.93.27 2226 22
LOGNAME=admindude
SHLVL=1
SHELL=/bin/bash
HOSTTYPE=i386
OSTYPE=linux-gnu
HOME=/home/admindude
TERM=vt320
PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/jdk1.3/
bin:/usr/local/mysql-3.22.32-pc-linux-gnu-i686/bin:/
usr/local/jdk1.3/bin:/usr/local/jakarta-tomcat/bin:/usr/local/tdk/bin
SSH_TTY=/dev/pts/0
_=/usr/bin/env
OLDPWD=/usr/local/tdk/webapps





admindude@Linuxsvr1:/usr/local/tdk/webapps/donald/WEB-INF/build$
netstat -vat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 *:mysql                 *:*                     LISTEN
tcp        0     20 Linuxsvr1:ssh           192.81.93.27:2226
ESTABLISHED
tcp        0      0 *:www                   *:*                     LISTEN
tcp        0      0 *:ftp                   *:*                     LISTEN
tcp        0      0 *:ssh                   *:*                     LISTEN
tcp        0      0 *:auth                  *:*                     LISTEN
tcp        0      0 localhost.localdom:5477 *:*                     LISTEN
tcp        0      0 *:printer               *:*                     LISTEN
tcp        0      0 *:netbios-ssn           *:*                     LISTEN
tcp        0      0 *:smtp                  *:*                     LISTEN
tcp        0      0 *:time                  *:*                     LISTEN
tcp        0      0 *:daytime               *:*                     LISTEN
tcp        0      0 *:discard               *:*                     LISTEN
tcp        0      0 *:moira_db              *:*                     LISTEN
tcp        0      0 Linuxsvr1:domain        *:*                     LISTEN
tcp        0      0 localhost.locald:domain *:*                     LISTEN
tcp        0      0 *:sunrpc                *:*                     LISTEN
admindude@Linuxsvr1:/usr/local/tdk/webapps/donald/WEB-INF/build$



here is the account setup for the MYSQL database....

-------------------------set permissions for the other users on the
database ----------------------
./bin/mysql --user=root --database=mysql -p  *** (start client) root &
"mysql" database
mysql> show tables;
mysql> select * from user;
 *------- this is the main (SU) entity for the database with all
privilages -------------*
mysql> insert into user
values('192.81.93.%','main',password('powerhouse'),'Y','Y','Y','Y','Y','Y','
Y','Y','Y','Y','Y','Y','Y','Y');
mysql> select * from user;
ctrl D
./bin/mysqladmin -uroot -p reload





and the file that configures your
build........................................


# -------------------------------------------------------------------
#
# P R O J E C T  P R O P E R T I E S
#
# -------------------------------------------------------------------
# These are the properties for your Turbine project. The properties
# in this file will override properties set anywhere else.
# -------------------------------------------------------------------

project=donald

# -------------------------------------------------------------------
#
#  T A R G E T  D A T A B A S E
#
# -------------------------------------------------------------------
# This is the target database, only considered when generating
# the SQL for your Turbine project. Your possible choices are
#
# db2
# hypersonic
# mysql
# oracle,
# postgresql
#
# Default: none
# -------------------------------------------------------------------

database=mysql

# -------------------------------------------------------------------
#
#  T A R G E T  P L A T F O R M
#
# -------------------------------------------------------------------
# Your options for targetPlatform are: unix | windows
# Your options for targetPlatformExt are: sh | bat
# -------------------------------------------------------------------

targetPlatform = unix
targetPlatformExt = sh

# -------------------------------------------------------------------
#
#  O B J E C T  M O D E L  I N F O R M A T I O N
#
# -------------------------------------------------------------------
# These settings will allow you to customize the way your
# Peer-based object model is created.
# -------------------------------------------------------------------

extend=TurbineMapBuilder
mapname=TurbineMap
suffix=MapBuilder
targetPackage=org.mycompany.newapp.om
addSaveMethod=true
addGetByNameMethod=false
complexObjectModel=true
basePrefix=Base

# -------------------------------------------------------------------
#
#  D A T A B A S E  S E T T I N G S
#
# -------------------------------------------------------------------
# JDBC connection settings. This is used by the JDBCToXML task that
# will create an XML database schema from JDBC metadata. These
# settings are also used by the SQL Ant task to initialize your
# Turbine system with the generated SQL.
# -------------------------------------------------------------------

#--------------------------------------------------------------------
# HSQL use
# FULLPATH = full path to where you want the database
# Note: either torque or HSQL is really touchy about extra spaces
# or other stuff after each line below.
#--------------------------------------------------------------------
#databaseUrl=jdbc:HypersonicSQL:FULLPATH/donald
#databaseDriver=org.hsql.jdbcDriver
#databaseUser=sa
#databasePassword=

databaseUrl = jdbc:mysql://192.81.93.5:3306/donald
databaseDriver = org.gjt.mm.mysql.Driver
databaseUser = main
databasePassword = powerhouse
databaseHost = 192.81.93.5:3306

# -------------------------------------------------------------------
# You should NOT have to edit anything below here.
# -------------------------------------------------------------------

# -------------------------------------------------------------------
#
#  C O N F I G U R A T I O N  D I R E C T O R Y
#
# -------------------------------------------------------------------
# This is the directory that Torque looks in the find
# its torque.props file.
#
# Default: none
# -------------------------------------------------------------------

configDir=./config

# -------------------------------------------------------------------
#
#  T E M P L A T E  P A T H
#
# -------------------------------------------------------------------

templatePath = bin/torque/templates

# -------------------------------------------------------------------
#
#  C O N T R O L  T E M P L A T E S
#
# -------------------------------------------------------------------

SQLControlTemplate = sql/base/Control.vm
OMControlTemplate = om/Control.vm
idTableControlTemplate = sql/id-table/Control.vm
securityControlTemplate = sql/security/Control.vm
# -------------------------------------------------------------------
#
#  O U T P U T  D I R E C T O R Y
#
# -------------------------------------------------------------------

outputDirectory = ../src

# -------------------------------------------------------------------
#
#  S C H E M A  D I R E C T O R Y
#
# -------------------------------------------------------------------

schemaDirectory = project






****************************************************************************
***********************
Any information you can give to assist in making a connection between
Turbine and MYSQL would
be appreciated

If I start Catalina and go to the URL
http://Linuxsvr1:8080/donald/servlet/donald
  I get a
   TURBINE DATA MANAGER page

   insert entry
   Flux

   users
   groups
   roles
   permissions

   Services
      etc.........


where do you set "turbine.app.type=peer" .... This might be the missing
piece....

Thx
Donald Duquaine
mailto:dduquaine@stl-inc.com

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org