Installation broken after reboot - only acess from localhost

Trouble during PacsOne Server installations
ebw
Posts:20
Joined:Thu Feb 25, 2010 10:03 pm
Installation broken after reboot - only acess from localhost

Post by ebw » Fri Mar 12, 2010 2:49 am

PacsOne premium has been working on my iMac just fine for about a week. Then I had to reboot today. After the reboot, I can only successfully login when using a URL such as http://localhost/pacsone/home.php

Using http://127.0.0.1/pacsone/home.php shows the login page but leads to a blank page after entering credentials.

The blank page problem also happens when accessing using my computer's internet address name from other machines. I can see the login page with the anit-spam code and everything, but then I get a blank page after entering credentials.

Also, I can no longer successfully send to the dicom listener from a dicom node which previously worked just fine.

Everything was working before the reboot.

I know something is going on with the mysql connection because the phpinfo.php page only lists mysqlnd when accessing from any url that is not localhost. Only when I use http://localhost/pacsone/Hello.php do I see information for mysql, mysqli and mysqlnd.

Searches on the web related to "mysql only wrking with localhost" talk about bind-address in mysql's config file, but I am not using a my.cnf config file for mysql.

Any ideas about what the heck is going on?

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

Post by pacsone » Fri Mar 12, 2010 3:21 am

This seems like a firewall issue since web servers do not distinguish client requests sent either from localhost or external IP addresses (unless you have explicitly configured so), i.e., if the same web page works fine when you access it from localhost, but does not work from external browsers, chances are the HTTP requests sent from the external IP addresses were blocked by a firewall either external or internal.

To verify this, you can check the Apache access log (logs/access.log) under the directory where Apache is installed, and see if Apache has actually received the browser requests from the external IP addresses. If not, then you know these external browser requests were either blocked or sent somewhere else.

ebw
Posts:20
Joined:Thu Feb 25, 2010 10:03 pm

Half of the problem solved

Post by ebw » Fri Mar 12, 2010 2:30 pm

I finally solved half of the problem, and it was my own fault. In the process of getting the installation pacsone to work, I had used macports to install "universal". i.e. 32 bit, versions of Apache and PHP so that imagick.so would work. I eventually found that I could convert the 64-bit Apache and MySQL already installed on my 64-bit snow leopard OS to 32-bit using the "lipo" command.

I stopped the macports apache process and started using the original apache (32-bit converted) installation. However, I forgot to remove/uninstall the macports apache and PHP.

So basically, after the reboot, I had two apache processes and two PHP processes running. One was responding to localhost and the other was responding to 127.0.0.1 and requests from other machines. The major clue to the problem was that the versions of PHP differed slightly 5.3.0 vs 5.3.1, and I finally recognized that on the phpinfo() output. Apparently only the one listening to localhost could access MySQL.

However, I am still unable to send any dicom to pacsone. I will make a separate post about that.

ebw
Posts:20
Joined:Thu Feb 25, 2010 10:03 pm

The remaining half of the problem - can't receive DICOM

Post by ebw » Fri Mar 12, 2010 2:42 pm

So, I am able to login into the web interface of pacsone successfully and can see the images that I previously sent to pacsone. However, I cannot send any new dicom. The dicom association fails from a node which previously successfully sent dicom to pacsone.

I looked at some of the pacsone logs, and there are ERROR messages about "Maximum licensed server instances exceeded". I think this may be because I added two more AE Titles to the list of DICOM nodes to send to pacsone, but I am not sure.

At this time, the web access does work and I have a month left on the trial license (expires April 12). However, the commands

/sbin/SystemStarter stop "PacsOne Server Premium Edition"

and

/sbin/SystemStarter start "PacsOne Server Premium Edition"

seem to have no effect. When I use the stop command no process is found to stop, i.e. it says:

No PacsOne Server pid file found. Looked for /home/pacsone/pacsone.pid

When I use the start command, there are no messages.

After trying the stop again after the start repeatedly, there is still no pacsone process detected. Also, there is never anything listening on the port that I told pacsone to listen on. I checked using the command:

lsof -i -P | grep -i "listen"

Has something happened to my license? Is there a better way to start the Pacsone process?

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

Post by pacsone » Fri Mar 12, 2010 4:28 pm

Since the trial license only supports one (1) instance of PacsOne Server, you would get the error "Maximum licensed server instances exceeded" if you configure more than 1 instances of PacsOne Server. So check how many "*.ini" files are configured under the directory where PacsOne is installed (they should be named with the AE Title configured for each instance of PacsOne Server), and if there are multiple such "*.ini" files there, delete all but one so that there is only one "*.ini" file and it should be named with the correct AE Title assigned to PacsOne Server. Then restart PacsOne Server and you should no longer see such error logged by PacsOne Server.

To verify if PacsOne Serer is running correctly, check if you see both PacsOne.exe and PacsOneSrv.exe running from the process list:

Code: Select all

# ps -ef|grep PacsOne

ebw
Posts:20
Joined:Thu Feb 25, 2010 10:03 pm

Post by ebw » Fri Mar 12, 2010 8:26 pm

There is only one .ini in the pacsone installation directory. There was never more than one. When I mentioned the additional AE titles, I was referring to the additional dicom nodes that I entered through the pacsone web interface under the "DICOM AE" tab.

When I execute "ps -ef|grep PacsOne" I see no Pacsone processes.

I will try a reinstall from scratch.

ebw
Posts:20
Joined:Thu Feb 25, 2010 10:03 pm

Cannot reinstall - missing pacsone.pid

Post by ebw » Fri Mar 12, 2010 8:43 pm

I attempted a complete reinstall from scratch. I have the license.dat file backed up and copied it back into place. However, I run into trouble at near the end. It says it cannot find /home/pacsone/pacsone.pid

I am running out of ideas.


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

Press OK to confirm or CANCEL to abort.
*******************************************************************
[O]K [C]ANCEL =>O
No PacsOne Server pid file found. Looked for /home/pacsone/pacsone.pid.

Please Enter Database Password for Administrator [root]: =>
*******************************************************************
Failed to save configuration data: Can't find file: './pacsone_1/config.frm' (errno: 13)
*******************************************************************
[O]K =>O

*******************************************************************
Warning: Failed to save configuration data: Can't find file: './pacsone_1/config.frm' (errno: 13)
*******************************************************************
[O]K =>O
PacsOne Server Installation Complete.

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

Post by pacsone » Fri Mar 12, 2010 9:43 pm

ebw wrote: When I execute "ps -ef|grep PacsOne" I see no Pacsone processes.
It seems that you are running MacOS which is derived from BSD Unix, so you should run the "ps aux|grep PacsOne" instead of the "-ef" command line option which was for Linux variants. Also, you should at least see the "PacsOneSrv.exe" listed on the output of the above command if PacsOne Server is running.
Last edited by pacsone on Fri Mar 12, 2010 9:51 pm, edited 1 time in total.

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

Re: Cannot reinstall - missing pacsone.pid

Post by pacsone » Fri Mar 12, 2010 9:50 pm

ebw wrote: Failed to save configuration data: Can't find file: './pacsone_1/config.frm' (errno: 13)
The error suggests that the config table of the pacsone_1 database does not exist which does not seem to make any sense. So can you log into the pacsone_1 and check if the config table exists or not:

# mysql -u root -p pacsone_1
mysql>describe config;

BTW, there is no need to re-install PacsOne Server as what didn't work previously probably still won't work after the re-install.

ebw
Posts:20
Joined:Thu Feb 25, 2010 10:03 pm

sample outputs

Post by ebw » Fri Mar 12, 2010 9:57 pm

First, thank you for your responses. I really appreciate you taking the time to help me.

Below is the output that correspond to your suggestions.

sh-3.2# /sbin/SystemStarter start "PacsOne Server Premium Edition"
sh-3.2# ps -ef | grep PacsOne
0 1062 1053 0 0:00.00 ttys000 0:00.00 grep PacsOne
sh-3.2# ps aux|grep PacsOne
root 1068 0.0 0.0 2435032 524 s000 R+ 3:54PM 0:00.00 grep PacsOne
sh-3.2#

Next, I am past the error with the config.frm error. I tried to backup the mysql tables before the reinstall and at one point deleted all the mysql tables. I think the mysql tables are back in place after a full reinstall of mysql and pacsone.

sh-3.2# mysql -u root -p pacsone_1
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22
Server version: 5.1.44 MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> describe config;
+-----------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+------------------+------+-----+---------+----------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| aetitle | varchar(16) | NO | | NULL | |
| port | int(11) | YES | | NULL | |
| patientpage | tinyint(4) | NO | | 10 | |
| imagepage | tinyint(4) | NO | | 10 | |
| adminemail | varchar(255) | YES | | NULL | |
| phpexe | varchar(255) | YES | | NULL | |
| viewerdir | varchar(255) | YES | | NULL | |
| autologout | int(10) unsigned | YES | | 10 | |
| passwordexpire | int(10) unsigned | YES | | 60 | |
| maxupload | int(10) unsigned | YES | | 2 | |
| uploaddir | varchar(255) | YES | | NULL | |
| attachment | varchar(255) | NO | | table | |
| thumbnaildir | varchar(255) | YES | | NULL | |
| imagedir | varchar(255) | YES | | NULL | |
| skipseries | tinyint(1) | YES | | 0 | |
| maxaes | int(10) unsigned | YES | | 10 | |
| emailfailedjobs | tinyint(1) | YES | | 1 | |
| logdir | varchar(255) | YES | | NULL | |
| archivedir | varchar(255) | YES | | NULL | |
| archiveformat | tinyint(4) | NO | | 0 | |
| archiveage | int(10) unsigned | NO | | 0 | |
| longtermdir | varchar(255) | YES | | NULL | |
| worklistage | int(10) unsigned | NO | | 30 | |
| matchworklist | tinyint(1) | YES | | 0 | |
| flashdir | varchar(255) | YES | | NULL | |
| emailreport | int(10) unsigned | NO | | 65535 | |
| dateformat | varchar(64) | YES | | NULL | |
| datetimeformat | varchar(64) | YES | | NULL | |
| studyreconcil | tinyint(1) | YES | | 0 | |
| ageschedule | int(10) unsigned | YES | | 0 | |
| autoconvert | tinyint(1) | YES | | 0 | |
+-----------------+------------------+------+-----+---------+----------------+
32 rows in set (0.00 sec)

mysql>

ebw
Posts:20
Joined:Thu Feb 25, 2010 10:03 pm

sanity check

Post by ebw » Fri Mar 12, 2010 10:14 pm

Just as a sanity check, shouldn't I get something when I enter the commands

/sbin/SystemStarter start "PacsOne Server Premium Edition"

or

/sbin/SystemStarter stop "PacsOne Server Premium Edition"

because right now, I see nothing.

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

Post by pacsone » Sat Mar 13, 2010 12:16 am

1. Try "ps Aux|grep PacsOne" instead of the lower case 'a'.

2. You can also check the PacsOne Server logs under the "log/${AeTitlte}.ini" where PacsOne is installed.

ebw
Posts:20
Joined:Thu Feb 25, 2010 10:03 pm

still nothing - it just doesn't want to run PacsOneSrv.exe

Post by ebw » Sat Mar 13, 2010 2:06 am

The "ps Aux" version still doen't show anything. Also, there are no logs besides the install log.

In fact, I tried to directly use the command in the startup script. Below is the output. As you can see, the process quickly says "Done" and no logs are ever created.

Code: Select all

sh-3.2# cd /home/pacsone/log
sh-3.2# ls -l
total 120
-rwxr-xr-x  1 root  daemon  57788 Mar 12 15:21 dbinstall.pacsone_1.log
drwxr-xr-x@ 2 root  daemon     68 Aug 16  2005 journal
drwxr-xr-x@ 2 root  daemon     68 Aug 16  2005 report
sh-3.2# /home/pacsone/PacsOneSrv.exe --pidfile=/home/pacsone/pacsone.pid >/dev/null 2>&1 &
[1] 1460
sh-3.2# ps Aux | grep PacsOne
root      1468   0.0  0.0  2435032    420 s000  R+    8:01PM   0:00.00 grep PacsOne
[1]+  Done(255)               /home/pacsone/PacsOneSrv.exe --pidfile=/home/pacsone/pacsone.pid > /dev/null 2>&1
sh-3.2# ls -l
total 120
-rwxr-xr-x  1 root  daemon  57788 Mar 12 15:21 dbinstall.pacsone_1.log
drwxr-xr-x@ 2 root  daemon     68 Aug 16  2005 journal
drwxr-xr-x@ 2 root  daemon     68 Aug 16  2005 report
sh-3.2# ps Aux | grep PacsOne
root      1481   0.0  0.0  2435032    540 s000  R+    8:01PM   0:00.00 grep PacsOne
sh-3.2# 

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

Post by pacsone » Sat Mar 13, 2010 4:42 pm

1. Can you check if the trial license (license.dat) is present under the directory where PacsOne is installed?

2. Try running the PacsOne Server daemon directly from the command line but do not redirect the output anywhere, which should reveal where the problem was:

Code: Select all

sh-3.2# cd /home/pacsone/
sh-3.2# PacsOneSrv.exe --pidfile=/home/pacsone/pacsone.pid

ebw
Posts:20
Joined:Thu Feb 25, 2010 10:03 pm

Post by ebw » Sat Mar 13, 2010 8:13 pm

The license.dat file is there. Via the web interface, it reports an expiration date of April 12.

I tried the PacsOneSrv.exe command without redirecting output, but nothing seems to happen. No errors, no output, no process running, no pid file. Below is the output.

Are there any switches I can pass to PacsOneSrv.exe to make it more verbose?

Code: Select all

sh-3.2# pwd
/home/pacsone
sh-3.2# ls -l
total 39920
drwxr-xr-x@   8 welcheb  daemon       272 Jan 24 14:33 ImageMagick
drwxr-xr-x@   3 welcheb  daemon       102 Jun 11  2008 OpenJPEG
-rwxr-xr-x@   1 welcheb  daemon   4694412 Jan 24 16:27 PacsOne.exe
-rwxr-xr-x@   1 welcheb  daemon   2146880 Jan 24 16:27 PacsOneHL7.exe.disabled
-rwxr-xr-x@   1 welcheb  daemon   1569432 Jan 24 16:27 PacsOneSrv.exe
-rwxr-xr-x@   1 welcheb  daemon   1638036 Jan 24 16:27 Setup.exe
-rwxr-xr-x@   1 welcheb  daemon       274 Mar 18  2007 StartupParameters.plist
-rwxr-xr-x    1 welcheb  admin       1248 Mar 12 15:21 appa_pacsone_1.ini
drwxr-xr-x@   2 welcheb  daemon        68 Dec 27  2004 cd
-rwxr-xr-x@   1 welcheb  daemon     46855 Mar 11  2005 conformance.txt
-rwxr-xr-x@   1 welcheb  daemon     55277 Jan 24 14:23 db_schema.sql
drwxr-xr-x@   2 welcheb  daemon        68 Dec 27  2004 dvd
drwxr-xr-x@   2 welcheb  daemon        68 May 10  2006 export
drwxr-xr-x@   3 welcheb  daemon       102 Sep 10  2008 ffmpeg
drwxr-xr-x@   2 welcheb  daemon        68 May 10  2006 import
-rwxr-xr-x@   1 welcheb  daemon      6400 Feb  3  2009 install.sh
-rwxr-xr-x@   1 welcheb  admin        256 Mar 12 15:19 license.dat
-rwxr-xr-x@   1 welcheb  daemon      1400 Jan 10  2008 license.txt
drwxr-xr-x@   5 welcheb  daemon       170 Mar 12 15:20 log
drwxr-xr-x@   4 welcheb  daemon       136 Apr 20  2008 mysql
-rwxr-xr-x    1 welcheb  admin       2330 Mar 12 15:19 pacsone
-rwxr-xr-x@   1 welcheb  admin   10139809 Mar 12 15:19 pacsone-6.2.2-Darwin-i386.tar.gz
-rwxr-xr-x@   1 welcheb  daemon      2290 Mar 10  2008 pacsone.base
-rwxr-xr-x@   1 welcheb  daemon      1562 Apr 11  2007 pacsone.macos
drwxr-xr-x@ 177 welcheb  daemon      6018 Mar 12 15:19 php
-rwxr-xr-x@   1 welcheb  daemon     17832 Jan 10  2008 readme.txt
-rwxr-xr-x@   1 welcheb  daemon      1236 Feb  1  2009 uninstall.sh
-rwxr-xr-x@   1 welcheb  daemon     69086 Jan 24 14:23 upgrade_schema.sql
sh-3.2# ./PacsOneSrv.exe --pidfile=/home/pacsone/pacsone.pid 
sh-3.2# ps Aux | grep PacsOne
root     35178   0.0  0.0  2435032    532 s000  R+    2:09PM   0:00.00 grep PacsOne
sh-3.2# ls -l
total 39920
drwxr-xr-x@   8 welcheb  daemon       272 Jan 24 14:33 ImageMagick
drwxr-xr-x@   3 welcheb  daemon       102 Jun 11  2008 OpenJPEG
-rwxr-xr-x@   1 welcheb  daemon   4694412 Jan 24 16:27 PacsOne.exe
-rwxr-xr-x@   1 welcheb  daemon   2146880 Jan 24 16:27 PacsOneHL7.exe.disabled
-rwxr-xr-x@   1 welcheb  daemon   1569432 Jan 24 16:27 PacsOneSrv.exe
-rwxr-xr-x@   1 welcheb  daemon   1638036 Jan 24 16:27 Setup.exe
-rwxr-xr-x@   1 welcheb  daemon       274 Mar 18  2007 StartupParameters.plist
-rwxr-xr-x    1 welcheb  admin       1248 Mar 12 15:21 appa_pacsone_1.ini
drwxr-xr-x@   2 welcheb  daemon        68 Dec 27  2004 cd
-rwxr-xr-x@   1 welcheb  daemon     46855 Mar 11  2005 conformance.txt
-rwxr-xr-x@   1 welcheb  daemon     55277 Jan 24 14:23 db_schema.sql
drwxr-xr-x@   2 welcheb  daemon        68 Dec 27  2004 dvd
drwxr-xr-x@   2 welcheb  daemon        68 May 10  2006 export
drwxr-xr-x@   3 welcheb  daemon       102 Sep 10  2008 ffmpeg
drwxr-xr-x@   2 welcheb  daemon        68 May 10  2006 import
-rwxr-xr-x@   1 welcheb  daemon      6400 Feb  3  2009 install.sh
-rwxr-xr-x@   1 welcheb  admin        256 Mar 12 15:19 license.dat
-rwxr-xr-x@   1 welcheb  daemon      1400 Jan 10  2008 license.txt
drwxr-xr-x@   5 welcheb  daemon       170 Mar 12 15:20 log
drwxr-xr-x@   4 welcheb  daemon       136 Apr 20  2008 mysql
-rwxr-xr-x    1 welcheb  admin       2330 Mar 12 15:19 pacsone
-rwxr-xr-x@   1 welcheb  admin   10139809 Mar 12 15:19 pacsone-6.2.2-Darwin-i386.tar.gz
-rwxr-xr-x@   1 welcheb  daemon      2290 Mar 10  2008 pacsone.base
-rwxr-xr-x@   1 welcheb  daemon      1562 Apr 11  2007 pacsone.macos
drwxr-xr-x@ 177 welcheb  daemon      6018 Mar 12 15:19 php
-rwxr-xr-x@   1 welcheb  daemon     17832 Jan 10  2008 readme.txt
-rwxr-xr-x@   1 welcheb  daemon      1236 Feb  1  2009 uninstall.sh
-rwxr-xr-x@   1 welcheb  daemon     69086 Jan 24 14:23 upgrade_schema.sql
sh-3.2# 

Post Reply