Install Error - Access denied for user ....

Trouble during PacsOne Server installations
Post Reply
eldonkijote
Posts:2
Joined:Mon Aug 07, 2006 9:23 pm
Install Error - Access denied for user ....

Post by eldonkijote » Mon Aug 07, 2006 9:45 pm

i'm installing pacsone on GNU/Linux Debian Etch with:
apache2 2.0.55-4
MySql 5.0.22

but in the install, have this error "could not connect to [datapacs] as [new]: Access denied for user 'new'@'localhost' (using password: YES)"

this is the instalation log
Will This Be a [N]ew Installation or pgrade?
Please Enter [N] or => N

Please Enter Application Entity Title for PacsOne Server Premium Edition: =>aepacs

Please Enter Server Port Number for PacsOne Server Premium Edition: =>6666

Use Default MySQL Client Connection Settings Below ?
(TCP Port = [3306], Socket = [/var/lib/mysql/mysql.sock])
Please Type [Y]es, [N]o or ENTER to Use Default => n

Please Enter MySQL Client TCP Port Number [3306]: =>3306

Please Enter MySQL Client Socket [/var/lib/mysql/mysql.sock]: =>/var/run/mysqld/mysqld.sock

Please Enter MySQL Database Name for PacsOne Server Premium Edition: =>datapacs

Please Enter MySQL Username for PacsOne Server Premium Edition: =>new

Please Enter MySQL User Password for PacsOne Server Premium Edition: (Not Echoed for Security) =>

Please Enter Logfile Directory for PacsOne Server Premium Edition: [/home/pacsone/log/]
Press ENTER if default value is OK =>

Please Enter Default Archive Directory for PacsOne Server Premium Edition: [/var/pacsone/]
Press ENTER if default value is OK =>

Please Enter Storage Format: Dicom Part 10[X] or [N]ative
Please Enter [X] or [N] => X

Enable HL-7 Message Listner Option?
Please Enter [Y] or [N] => N

*******************************************************************
Setup will delete any existing tables in database 'datapacs'
before creating new tables

Press OK to confirm or CANCEL to abort.
*******************************************************************
[O]K [C]ANCEL =>O

*******************************************************************
Database 'datapacs' and/or Username 'new' does not appear to be valid

Would you like to set it up?
*******************************************************************
[Y]ES [N]O =>Y

Please Enter MySQL Password for Administrator [root]: =>
*******************************************************************
Config: could not connect to [datapacs] as [new]: Access denied for user 'new'@'localhost' (using password: YES)
*******************************************************************
[O]K => [O]K =>O

*******************************************************************
Warning: Config: could not connect to [datapacs] as [new]: Access denied for user 'new'@'localhost' (using password: YES)
*******************************************************************
[O]K =>O
PacsOne Server Installation Complete.


Last, when i login on http://localhost/pacsone/login.php
and go to any link ex. "Browse" i get User [new] has been logged out automatically due to inactivity.


what is the problem??

INFORMATION DATA

Code: Select all

************ dbinstall.log FILE ******
abomaso:/home/pacsone/log# tail dbinstall.log
--------------
create table hl7segzds (
    uid VARCHAR(64) NOT NULL,
    studyuid VARCHAR(64) NOT NULL,
    PRIMARY KEY (uid, studyuid))
--------------

Query OK, 0 rows affected

Bye
***************

**** ldd ***
abomaso:/home/pacsone# ldd Setup.exe
        linux-gate.so.1 =>  (0xffffe000)
        libmysqlpp.so.1 => /usr/local/lib/libmysqlpp.so.1 (0xb7dbc000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7cdb000)
        libm.so.6 => /lib/tls/libm.so.6 (0xb7cb5000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7caa000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7b72000)
        /lib/ld-linux.so.2 (0xb7f05000)
******************
thanks
Emanuel

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Tue Aug 08, 2006 12:16 am

These errors were all resulted from the non-default MySQL socket name you're using:

Code: Select all

/var/run/mysqld/mysqld.sock
While we are looking into this issue, you can try the following workaround:

1. Stop MySQL daemon.

2. Create a symbolic link named with the default MySQL socket:

# ln -s /var/lib/mysql/mysql.sock /var/run/mysqld/mysqld.sock

3. Start MySQL daemon.

4. Run the Setup.exe again and see if it gives you the same error or not.

altie
Posts:26
Joined:Sat Sep 24, 2005 3:47 am
Location:Australia

Post by altie » Tue Apr 15, 2008 8:30 am

What was the resolution for this issue?

I'm running into a similar problem installing PacsOne Premium 5.1.4 on CentOS 5 with MySQL 5.0.22.

In our case, the default socket path is correct but we're still getting access denied errors on the installer.

Have tried logging in using the mysql command-line client which works and even queried the PacsOne database created by the installer.

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Tue Apr 15, 2008 4:09 pm

It seems strange that the PacsOne Server database was still created despite of such login error.

What is the exact error message you got when running the Installer (Setup.exe)?

altie
Posts:26
Joined:Sat Sep 24, 2005 3:47 am
Location:Australia

Post by altie » Thu Apr 24, 2008 2:39 am

OK, tried again with a fresh install of CentOS 5.1 and PacsOne 5.1.4.

Installed Apache, PHP and MySQL with the OS. Installed libtool and gcc packages after OS has been installed.

Running install.sh is fine up to the point where the installer offers to create the PacsOne user profile and then this happens:
*******************************************************************
Database 'pacsone' and/or Username 'pacsone' does not appear to be valid

Would you like to set it up?
*******************************************************************
[Y]ES [N]O =>y

Please Enter MySQL Password for Administrator [root]: =>
*******************************************************************
Config: could not connect to [pacsone] as [root]: Access denied for user 'root'@'localhost' (using password: YES)
*******************************************************************
[O]K => [O]K =>o

*******************************************************************
Warning: Config: could not connect to [pacsone] as [root]: Access denied for user 'root'@'localhost' (using password: YES)
*******************************************************************
[O]K =>o
I'm using the default socket/port settings.

The database tables appear to have been created successfully, but are empty.

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Thu Apr 24, 2008 4:35 am

Can you run the following from a command shell to find out what is the MySQL socket name being used from the mysqld command line?

Code: Select all

$ ps -ef|grep mysqld

altie
Posts:26
Joined:Sat Sep 24, 2005 3:47 am
Location:Australia

Post by altie » Thu Apr 24, 2008 5:29 am

Results of command as follows:
[root@localhost pacsone]# ps -ef | grep mysqld
root 3118 1 0 15:20 pts/0 00:00:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pid --log-error=/var/log/mysqld.log
mysql 3154 3118 0 15:20 pts/0 00:00:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --socket=/var/lib/mysql/mysql.sock
What's also odd is when I query the MySQL User table the PacsOne user (which I've specified as 'pacsone'@'localhost') is created with what appears to be the correct password.

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Thu Apr 24, 2008 6:36 am

The error occurred when the Installer was trying to login to the configured database ("pacsone" in this case) as "root" to save the configuration data, what's weird is that the very same username ("root") and password did seem to work at the first time when the Installer was creating the assigned MySQL username for PacsOne.

Can you try logging into MySQL and check the port variable from the output of the following command?

Code: Select all

mysql>show variables;
In the meanwhile, the workaround is to save the configured AE Title and TCP port manually by logging into the PacsOne Server database, and run the following query from the MySQL shell:

Code: Select all

mysql>insert into config set aetitle='$aetitle',port=$port;
where $aetitle/$port is the AE Title/TCP port you've assigned to PacsOne Server.

altie
Posts:26
Joined:Sat Sep 24, 2005 3:47 am
Location:Australia

Post by altie » Thu Apr 24, 2008 2:32 pm

OK, here's the port variable from MySQL:
| port | 3306 |
I've applied the workaround and restarted PacsOne and here's the log:
Fri Apr 25 00:27:41 2008 INFO - Server Process [6800] Initialized as AE Title: [fzpacs02]
Fri Apr 25 00:27:41 2008 INFO - Server Socket: 4 created successfully
Fri Apr 25 00:27:41 2008 INFO - Socket: 4 bind to Port: 104
Fri Apr 25 00:27:41 2008 INFO - Worker Thread: 34749328 running
Fri Apr 25 00:27:41 2008 INFO - Worker Thread: 123763600 running
Fri Apr 25 00:27:46 2008 ERROR - MySQL: Couldn't connect to: pacsone, error = Access denied for user 'pacsone'@'localhost'
(using password: YES), user = pacsone
Fri Apr 25 00:27:46 2008 INFO - MySQL: Connected to database [pacsone]
Fri Apr 25 00:27:46 2008 INFO - REPORT: Running statistics report script: [/home/pacsone/php/dailyreport.php]...
Fri Apr 25 00:27:46 2008 INFO - WORKLIST-PURGE: Started purging aged worklist records...
Fri Apr 25 00:27:46 2008 INFO - WORKLIST-PURGE: Finished purging aged worklist records...
Note that the logs indicate that PacsOne couldn't connect to MySQL and then in the very next entry states that it has connected.

PacsOne still appears to be operating normally despite the above error in the log.

I also had to set the log directory in the config table otherwise the web interface isn't able to find the log file. The INSERT command had to be modified like so:

Code: Select all

mysql>insert into config set aetitle='$aetitle',port=$port,logdir=$log_directory;

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Thu Apr 24, 2008 3:36 pm

The MySQL connection on this server seems to be flaky as indicated by the 2 separate login errors using the very same username/password information.

What is the version of MySQL installed on this server?

altie
Posts:26
Joined:Sat Sep 24, 2005 3:47 am
Location:Australia

Post by altie » Thu Apr 24, 2008 11:18 pm

Here's the output from 'mysql --version':
mysql Ver 14.12 Distrib 5.0.22, for redhat-linux-gnu (i686) using readline 5.0

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Fri Apr 25, 2008 12:25 am

We'll try to reproduce the error using that particular MySQL release. In the meanwhile, please keep an eye on any MySQL error logged in the PacsOne Server log files.

altie
Posts:26
Joined:Sat Sep 24, 2005 3:47 am
Location:Australia

Post by altie » Fri Apr 25, 2008 12:40 am

I should also mention that this server is running on a VMware VM. I'll try to reproduce the problem installing onto bare metal and see how it goes.

I can also try updating the OS and see if I can bring the MySQL version up to 5.1.

Post Reply