| 1 |
TROUBLESHOOTING |
| 2 |
=============== |
| 3 |
|
| 4 |
A lot of what is explained below should be done automatically by the install |
| 5 |
process. It is explained here just in case it didn't do it correctly for |
| 6 |
your circumstance. |
| 7 |
|
| 8 |
|
| 9 |
1) HOW DO I TELL IF IT IS WORKING? |
| 10 |
|
| 11 |
Here is a quick smoke test to see if everything is working: |
| 12 |
|
| 13 |
|
| 14 |
$cd /opt/firebird/examples |
| 15 |
|
| 16 |
$/opt/firebird/bin/isql |
| 17 |
>connect employee.gdb; |
| 18 |
>select rdb$relation_name from rdb$relations; |
| 19 |
>exit; |
| 20 |
|
| 21 |
|
| 22 |
(You may need to provide the SYSDBA password in some cases) |
| 23 |
|
| 24 |
$/opt/firebird/bin/isql |
| 25 |
>connect employee.gdb user sysdba password <password>; |
| 26 |
>select rdb$relation_name from rdb$relations; |
| 27 |
>show tables; |
| 28 |
>exit; |
| 29 |
|
| 30 |
Where password will be either masterkey, or present in the |
| 31 |
file /opt/firebird/SYSDBA.password. |
| 32 |
|
| 33 |
|
| 34 |
For a test using networking: |
| 35 |
|
| 36 |
$/opt/firebird/bin/isql |
| 37 |
>connect 'localhost:/opt/firebird/examples/employee.gdb'; |
| 38 |
>select rdb$relation_name from rdb$relations; |
| 39 |
>exit; |
| 40 |
|
| 41 |
On a remote machine you can try the above replacing localhost with |
| 42 |
the server name. Remember, you may need to specify the username/password |
| 43 |
to get this to work. |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
2) HOW DO I CHECK THAT THE SERVER IS RUNNING |
| 48 |
|
| 49 |
You can check if the server is running by: |
| 50 |
|
| 51 |
netstat -an | grep 3050 |
| 52 |
|
| 53 |
If something is listening on port 3050 then the server is running. |
| 54 |
If something is not running, then see next topics. |
| 55 |
|
| 56 |
|
| 57 |
3) TROUBLESHOOTING CLASSIC SERVER INSTALL |
| 58 |
|
| 59 |
The classic server works in two modes. The first mode allows you |
| 60 |
to directly open the database files and does not need a server. |
| 61 |
|
| 62 |
To test this mode, open the database using only the directory path: |
| 63 |
|
| 64 |
$isql |
| 65 |
>connect '/opt/firebird/examples.gdb'; |
| 66 |
|
| 67 |
|
| 68 |
In the second mode, requests are serviced by the inetd process. To test |
| 69 |
this mode, open the database with a connection string that includes the |
| 70 |
server name or IP: |
| 71 |
|
| 72 |
$isql |
| 73 |
>connect 'localhost:/opt/firebird/examples.gdb'; |
| 74 |
|
| 75 |
The configuration files for setting up the inetd (or xinetd) for the |
| 76 |
classic server are as follows: |
| 77 |
|
| 78 |
The /etc/services file needs an entry as follows: |
| 79 |
gds_db 3050/tcp # InterBase Database Remote Protocol" |
| 80 |
|
| 81 |
|
| 82 |
For inetd the /etc/inetd.conf file should have a line as follows |
| 83 |
|
| 84 |
gds_db stream tcp nowait.30000 root /opt/firebird/bin/fb_inet_server gds_inet_server |
| 85 |
|
| 86 |
You will need to restart the inetd process before the server will work. |
| 87 |
$ps -ef | grep inetd |
| 88 |
will give you the process id and |
| 89 |
|
| 90 |
$kill -HUP <pid> |
| 91 |
will instruct it to reread its configuration file and listen on port 3050. |
| 92 |
|
| 93 |
|
| 94 |
Recent Linux systems Redhat 7.0, Mandrake 7.2, and later have xinetd. |
| 95 |
The process is fairly similar, except the firebird service is described via |
| 96 |
a file in /etc/xinetd.d/firebird. There is a template version of this file |
| 97 |
in /opt/firebird/misc/firebird.xinetd, you should only need to copy the |
| 98 |
file to that directory. |
| 99 |
|
| 100 |
After copying the file, to get the xinetd process to re-read its |
| 101 |
configuration files, first find the xinetd process id: |
| 102 |
|
| 103 |
$ ps -ef | grep xinetd |
| 104 |
|
| 105 |
Then send it a restart signal: |
| 106 |
|
| 107 |
$kill -USR2 <pid> |
| 108 |
|
| 109 |
The process will reread its configuration file and listen on port 3050. |
| 110 |
|
| 111 |
See the topic SERVER STILL WONT START for more info if required. |
| 112 |
|
| 113 |
|
| 114 |
4) TROUBLESHOOTING SUPER SERVER INSTALL |
| 115 |
|
| 116 |
Super server runs as an inetd process. There should be an fbguard process |
| 117 |
running and several (usually 3) fbserver threads running. |
| 118 |
|
| 119 |
The server should start with |
| 120 |
$/etc/init.d/firebird start |
| 121 |
|
| 122 |
Installation problems for super usually revolve around the server not |
| 123 |
starting up correctly during installation. |
| 124 |
|
| 125 |
Often this is caused by either lack of permission to connect via tcp |
| 126 |
to the server process or a prior install (perhaps a classic server ) |
| 127 |
already running. |
| 128 |
|
| 129 |
One bad side effect is that this could result in the initial SYSDBA |
| 130 |
password not being set correctly. |
| 131 |
|
| 132 |
If there are problems you may need to check the actual file for correct |
| 133 |
install location. |
| 134 |
|
| 135 |
If running the /etc/init.d/firebird start script does not work, then see |
| 136 |
the topic SERVER STILL WONT START for more debugging info. |
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
5) SERVER STILL WONT START |
| 141 |
|
| 142 |
If you are really having problems try running the server programs |
| 143 |
directly. In this case, unsatisfied links or error messages will show |
| 144 |
up in the console. |
| 145 |
|
| 146 |
To invoke superserver: |
| 147 |
|
| 148 |
$/opt/firebird/bin/fbserver # for super |
| 149 |
|
| 150 |
To invoke classic: |
| 151 |
|
| 152 |
$/opt/firebird/bin/fb_inet_server # for classic |
| 153 |
|
| 154 |
and take note of any error messages. |
| 155 |
|
| 156 |
There may be a problem with an unsatisfied dynamic library link. This |
| 157 |
occurs when firebird requires a library, or version of a library, that |
| 158 |
you do not have installed. |
| 159 |
|
| 160 |
You can check the dynamic library requirements as follows: |
| 161 |
|
| 162 |
$ldd /opt/firebird/bin/fbserver |
| 163 |
|
| 164 |
If you are still stuck, try posting a question to the support newsgroup at: |
| 165 |
http://tech.groups.yahoo.com/group/firebird-support/ |
| 166 |
|
| 167 |
|
| 168 |
6) PROBLEMS CONNECTING TO SERVER |
| 169 |
|
| 170 |
There can be problems if DNS is not configured correctly. |
| 171 |
Incorrect DNS configuration will result in problems looking up the |
| 172 |
host's name or IP. If this is the case, placing specific entries in the |
| 173 |
/etc/hosts file is a good place to start. |
| 174 |
|
| 175 |
Try to connect to the server using telnet, note space between server |
| 176 |
name and port. |
| 177 |
|
| 178 |
$telnet server 3050 |
| 179 |
|
| 180 |
This will tell you if you can get to the server. Failure could be because |
| 181 |
of some firewall blockage. The most common problem is simply that the |
| 182 |
server is not running. |
| 183 |
|
| 184 |
|
| 185 |
7) WHY ARE MY DATABASES OWNED BY ROOT |
| 186 |
|
| 187 |
|
| 188 |
8) WHAT IS THE DIFFERENCE |