Changes between Version 132 and Version 133 of FAQ


Ignore:
Timestamp:
Nov 29, 2017, 3:28:03 PM (7 years ago)
Author:
Dimitar Misev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • FAQ

    v132 v133  
    1919
    2020== Installation ==
    21 
    22 === Using automake I get an error message "directory should not contain /" ===
    23 
    24  * Probably you have an outdated automake version installed, we have seen such problems with 1.7.9. Upgrade to at least 1.10.1.
    25 
    26 === ''./configure'' complains that some further packages are required during installation ===
    27 
    28  * These are summarized on the [wiki:RequiredPackages] page.
    29 
    30 === ''./configure'' complains about missing ''curses'' ===
    31 ... although ''ncurses'' is there.
    32 
    33  * You have run into a [http://bugs.gentoo.org/67481 bug in the ncurses package]; in /usr/lib, manually create symlinks ''libcurses.a -> libncurses.a'' and ''libcurses.so -> libncurses.so''.
    34 
    35 === ''./configure'' complains that some required files, like install-sh, cannot be found === 
    36 
    37  * retry ''./configure'' after running
    38 {{{
    39 $ automake --add-missing
    40 }}}
    41 
    42 === ''./configure'' complains that C++ compiler cannot create executables ===
    43 
    44  * This means that either you haven't installed gcc/g++ or something got corrupted. On Debian it seems to happen when adding LIBS='-lecpg -lgdal1.7.0' to the ./configure command.
    45 
    46 === make complains about missing Makefiles ===
    47 ...such as in the time/ directory, and issues error messages like "No rule to make target `../time/libtime.a', needed by `rasserver'.  Stop.".
    48 
    49  * retry ''./configure'' after running
    50 {{{
    51 $ autoreconf
    52 $ automake
    53 }}}
    54 
    55 === I get C++ compilation errors. ===
    56 
    57  * Make sure you use the proper compiler version (see [wiki:RequiredPackages]). GNU folks have a relaxed view on backwards compatibility even with minor release changes, and we have experienced problems related to this in the past.
    58 
    59 === I get protobuf compilation errors. ===
    60 
    61  * Make sure to remove system protobuf/grpc packages, as well as any manually installed libraries/binaries in `/usr` (look for them with `find /usr -name '*proto*'`). See ticket #1249 for related information.
    62 
    63 === On a 64bit architecture I get linkage errors (e.g., when linking GDAL with the rasdaman driver) like "relocation R_X86_64_32 against `.bss' can not be used" ===
    64 
    65  * Make sure you use the proper compiler version (see [wiki:RequiredPackages]). GNU folks have a relaxed view on backwards compatibility even with minor release changes, and we have experienced problems related to this in the past.
    66  * retry ''./configure'' with these extra flags:
    67 {{{
    68 $ ./configure CFLAGS=-fPIC CXXFLAGS=-fPIC LDFLAGS=-fPIC ...other options...
    69 $ make install
    70 }}}
    71 
    72 === rview doesn't work in 64 bit systems ===
    73 
    74 If you try to run rview and you get one of the errors:
    75 
    76 {{{
    77 ./rview: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
    78 }}}
    79 or
    80 {{{
    81 ./rview: error while loading shared libraries: libXp.so.6: wrong ELF class: ELFCLASS64
    82 }}}
    83 then you are trying to run rview with libXp.so.6 64 bit version, and rview doesn't work with it. rview is a deprecated application and, as such, one should not expect any future workaround for this problem. You can, however, run rview in 64 bits system, if you install the libXp.so.6 32 bit version. To do this:
    84 
    85  1. add repository for 32-bit systems (optional, only necessary in more recent OS where ia32-libs is not available by default, e.g. Ubuntu 64 bits 13.10 or higher):
    86 {{{
    87 $ sudo gedit /etc/apt/sources.list
    88 }}}
    89  add following line in the end of file:
    90 {{{
    91 deb  http://cz.archive.ubuntu.com/ubuntu raring main universe
    92 }}}
    93  2. install `ia32-libs`:
    94 {{{
    95 $ sudo apt-get update
    96 $ sudo apt-get install ia32-libs
    97 }}}
    98  (this will install libXp.so.6, among other 32-bit libraries)
    99 
    100 rview works, now, but if not, you can link the 32 bit library (/usr/lib32) to /usr/lib.
    101 
    102 Note: Installing lib32z1, lib32ncurses5 or lib32bz2-1.0 libs DOES NOT install libXp.so.6
    103 
    104 === I get Java compilation errors. ===
    105 
    106  * If, during '''make''', you get errors like this:
    107 {{{
    108 javac -d bin src/org/odmg/*.java src/rasj/*.java src/rasj/global/*.java src/rasj/clientcommhttp/*.java src/rasj/odmg/*.java src/rasj/rnp/*.java
    109 Exception in thread "main" java.lang.NoSuchFieldError: java/util/zip/Inflater.strm
    110 ...many more lines...
    111 }}}
    112 
    113  then make sure you use the [http://www.oracle.com/technetwork/java/javase/overview/index-jsp-136246.html SUN Java 6 SDK] and not the IBM one (which seems to come preinstalled on some distributions, and is buggy).
    114 
    115 === After installing I cannot find the documentation in the install directory ===
    116 To include PDF and HTML documentation in the build process, which takes some time to build, you have to specify explicitly `--with-docs` when invoking `./configure`
    117 
    118 === How to reinitialize RASBASE ===
    119 If you want to drop all data stored in rasdaman quickly for some reason:
    120 
    121 '''SQLite/Filestorage (default)''':
    122 1. `stop_rasdaman.sh`
    123 1. Let `RASDATA` be the directory specified in the host `-connect` option in `rasmgr.conf`, likely `/opt/rasdaman/data`; make sure it is indeed this directory (`ls $RASDATA/` should show `RASBASE`, `TILES/`, `TRANSACTIONS/`).
    124 1. Drop the data: `rm -rf $RASDATA/*`
    125 1. Initialize a brand new database: `create_db.sh`
    126 1. `start_rasdaman.sh`
    127 
    128 '''PostgreSQL''':
    129 1. `stop_rasdaman.sh`
    130 1. Drop the data: `dropdb RASBASE`
    131 1. Initialize a brand new database: `create_db.sh`
    132 1. `start_rasdaman.sh`
    133 
    134 == PostgreSQL ==
    135 
    136 === I get a link error, function ECPGget_connection cannot be found ===
    137 
    138  * What appears to have happened is that in PostgreSQL 8.3.0 they removed ECPGget_connection and they have reintroduced it by 8.3.7. So PostgreSQL versions 8.3.0 up to (but excluding) 8.3.7 cannot be used.
    139 
    140 === I want to use a different version of PostgreSQL. Is that possible? ===
    141 
    142  * You need to include a different JDBC postgresql driver (as a JAR) in the libraries folder and update the Makefile as needed. Then you can try out another PostgreSQL version, it may or may not work. Let us know your experiences to update this information!
    143 
    144 === When running the script "create_db.sh", I get !''AdminIf'' related error ===
    145 ...more specifically, ''Creating base RASBASE...Warning/error in AdminIf Connect: SQLSTATE: 08001 SQLCODE: -402''
    146 
    147 There are several possible reasons:
    148   1. '''Execution permissions.''' Run the script as the user owning the postgresql processes. Use '''only''' that user for further work with rasdaman (see Installation Guide). If you use Ubuntu and installed postgres with apt-get, then logging in as user '''postgres''' is an option; I personally like to have a separate user ''rasdaman'' for this purpose where I also can set paths etc. to the executables once and for all. (The postgres db does not allow full access to rasdaman tools, because they do not run under the administrative user that launched the db server process.)
    149 
    150   Alternatively, make sure that the operating system user under which you run `create_db.sh` can be authenticated via the '''ident''' method, which can be set in `pg_hba.conf`. E.g. if user is "rasdaman", then in `pg_hba.conf` you should have at least:
    151 {{{
    152 # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
    153 local   all         rasdaman                          ident
    154 }}}
    155 
    156   2. '''Blocked incoming connections.''' Another cause of the problem might be that postgres does not allow incoming connections. If you have Postgres v8 or more recent, modify file "postgresl.conf" and set (uncomment) the option
    157 {{{
    158 listen_addresses = 'localhost'
    159 }}}
    160   3. '''TCP-IP connection.''' If you have Postgres v7, set (uncomment) the following option:
    161 {{{
    162 tcpip_socket = true
    163 }}}
    164 
    165 === I get "wrong connect string" error when first running ''rasdl'' ===
    166 When I first try to run rasdl (or the rasdaman server, for that matter) against PostgreSQL after installation, the log says "server ok" but "wrong connect string"
    167 
    168  * There are several possible reasons:
    169   1. '''Port:''' Running a database cluster on a separate port requires proper setting of environment variable PGPORT to allow for communication between rasdaman and PostgreSQL. (thanks to Mario Uhlig!)
    170   2. '''Socket directory:''' using '/var/lock/postgresql' as socket directory makes rasdl fail for a reason still to be found. Switching back to the default socket dir '/var/run/postgresql' resolves the issue. (thanks to Alexander Herzig!)
    171 
    172 === Undefined reference to 'ECPGconnect' ... ===
    173 In Ubuntu you may get this error:
    174 {{{
    175 adminif.cc:(.text+0x4b): undefined reference to `ECPGconnect'
    176 adminif.cc:(.text+0x71): undefined reference to `ECPGtrans'
    177 adminif.cc:(.text+0x80): undefined reference to `ECPGdisconnect'
    178 ../reladminif/libreladminif.a(databaseif.o): In function `DatabaseIf::disconnect()':
    179 
    180 mdddomaintype.cc:(.text+0x720): undefined reference to `ECPGdo'
    181 collect2: ld returned 1 exit status
    182 make[2]: *** [rasserver] Error 1
    183 make[2]: Leaving directory `/home/rasdaman/rasdaman/server'
    184 make[1]: *** [install-recursive] Error 1
    185 make[1]: Leaving directory `/home/rasdaman/rasdaman/server'
    186 make: *** [install-recursive] Error 1
    187 }}}
    188 
    189 To fix it, set the libs explicitly at configure, e.g.
    190 {{{
    191 ./configure --prefix=/home/rasdaman/install LIBS='-lecpg -lgdal1.7.0'
    192 }}}
    193 
    194 === Deleting big collection imported rasimport results in 'Serializable database error...' ===
    195 Check the PostgreSQL log, usually it indicates that some parameters in the postgresql.conf need to be increased, along with SHMALL/SHMMAX parameters in the kernel.
    196 
    197 == Administration ==
    198 
    199 === stop_rasdaman.sh fails to stop rasdaman ===
    200 
    201 If `stop_rasdaman.sh`, `sudo service rasdaman stop`, or `sudo systemctl stop rasdaman.service` fail to stop rasdaman, then it's necessary to do it manually. You have to manually kill first the rasmgr process and then the rasserver processes:
    202 1. `sudo pkill rasmgr`
    203  * check: if `pgrep rasmgr` still prints a pid, then it has to be killed with `sudo pkill -9 rasmgr`
    204 1. repeat the same with rasserver: `sudo pkill rasserver`
    205  * check: if `pgrep rasserver` still prints some pids, then it has to be killed with `sudo pkill -9 rasserver`
    206 
    207 Afterwards you can start rasdaman again.
    208 
    209 == Rasql queries ==
    210 
    211 === I get syntax error ''unexpected name'' when using a floating point number ===
    212 
    213  * Floating point numbers must have a leading zero, for example; "0.9" instead of ".9".
    214 
    215 === My query which uses ''log'' doesn't work ===
    216 {{{
    217 for c in (rgb) return encode(log(c.0), "jpeg")
    218 }}}
    219 
    220  * The '''log''' function needs positive numbers as arguments, and will return -Infinity if the argument is 0. You need to make sure that the input does not contain any zeros. You can check that using the query
    221 {{{
    222 for c in (rgb) return count(c.0 = 0)
    223 }}}
    224  '''''Solution''''' (depending on your overall formula): Add 1 to the input:
    225 {{{
    226 for c in (rgb) return encode(log(c.0+1), "jpeg")
    227 }}}
    228 
    229 === My insert query produces error 821 (cell type mismatch) ===
    230 ... although I provide a TIFF file with correct pixel type:
    231 {{{
    232 insert into FloatCollection values inv_tiff( $1 )
    233 }}}
    234 
    235  * You need to provide an explicit cast (see section 9.8 in the Rasql Guide); a correct phrasing of this query is:
    236 {{{
    237 insert into FloatCollection values (float) inv_tiff( $1 )
    238 }}}
    239 
    240 === How do I position a replacement array when updating a collection? ===
    241 
    242  * In an update statement, the slice coordinates are specified with the set operator, however the 2D position of the replacement array is defined by the spatial domain of the array, which by default is [0:width,0:height], and can be modified with the shift operator or the --mdddomain option of rasql.
    243    For example a query to update the 3D collection C with a 2D image of size 255x210 that should replace the region at interval [10, 100:355, 100:310]:
    244 {{{
    245 update C set [10, *:*, *:*] assign shift(inv_tiff($1), [100, 100])
    246 }}}
    247  See wiki:PartialUpdates for more details.
    248 
    249  Note that the shift vector applies to the second and third dimension (slice defined in the first dimension).
    250 
    251 === How does the Storage Layout Language work? ===
    252 
    253  * Check the [attachment:sstdm2010.pdf Storage Layout Language paper] for more details, while the manual is not yet updated.
    254 
    255 === "Error: 100 Exception: Internal error: DL parse error." ===
    256 What does this error returned by rasql mean?
    257 
    258  * You have likely inserted types to the database which names start with a rasdl reserved word. This is a known issue, see #121 for a workaround.
    259 
    260 === How can I import large images that don't fit into main memory? ===
    261  * Check this short guide on [wiki:PartialUpdates partial updates] in addition to the documentation of the update statement in the [source:manuals_and_examples/manuals/doc-guides/ql-guide.pdf Query Language Guide for rasql].
    262 
    263 === How to use the encode() function to export data ===
    264  * Check [wiki:RasqlEncodeFunction this] short unofficial documentation until the Query Language Guide is updated.
    265 
    266 
    267 == rasdaview ==
    268 
    269 === rasdaview returns an error "no suitable servers started", although I have servers available ===
    270 
    271  * For historical reasons, rasdaview needs an RPC type rasserver running. See the Installation Guide for what this means and how such a server can be started.
    272 
    273 == Rasj and Java ==
    274 
    275 === Overflow when unsigned bytes are retrieved with rasj ===
    276 If I send the query ''select max_cells(c.0) from rgb as c'' via command line (rasql utility), then the result is 255 as expected; if I send this query via RasJ, then the result is -1.
    277 
    278  * Java does not have an 8-bit unsigned data type. Byte is a signed 8 bit and hence 255 is represented as -1. What you can do is to transform bytes to char by adding 2^8^ if the 2^7^ bit is set. Tested, works. Alternatively, cast to a larger data type on server side:
    279 {{{
    280 select (long) max_cells(c.0) from rgb as c
    281 }}}
    282 
    283 === I get class version incompatibility error messages ===
    284 I get weird error messages from the Java runtime system which seems to hint at class version incompatibilities, such as "Class version error" or "Class not found".
    285 
    286  * There might be a conflict with the locally provided libraries, to be found at directory $PETASCOPE/lib. Check them, and if you find a mismatch then remove them and use the resp. libraries of your local installation instead. Alternatively, consider upgrading your Java SDK to version 1.6.
    287 
    288  * Check that the versions `javac -version` and `java -version` match, otherwise you may get an error `Exception in thread "main" java.lang.UnsupportedClassVersionError: ..: Unsupported major.minor version 51.0`
    289 
    290 == WCPS / petascope ==
    291 === Mixing trimming and slicing in WCPS fails ===
    292  * A workaround until [ticket:64 this ticket] is fixed is to separate the two operations, e.g. instead of
    293 {{{
    294 c[t(5),x(0:20),y(0:20)]
    295 }}}
    296    use
    297 {{{
    298 (c[x(0:20),y(0:20)])[t(5)]
    299 }}}
    300 
    301 === "Requested more data than the server can handle at once" ===
    302 
    303 If a WCS/WCPS query fails with a "Requested more data than the server can handle at once", then it's likely that you need to increase the maximum amount of RAM that Tomcat is allowed to allocate.
    304 
    305 On most systems this can be done by editing a `/etc/default/tomcat*` file. Find the `JAVA_OPTS` option and set `-Xmx` to the desired value (e.g. to allow 4GB RAM, use `-Xmx4G`.
    306 
    307 == Data formats ==
    308 
    309 === HDF4 is said to be supported, but rasdaman reports an error ===
    310 ...when trying to use ''hdf()'' or ''inv_hdf()'' - what can I do?
    311 
    312  * HDF4 needs to be compiled in explicitly. Re-generate rasdaman saying
    313 {{{
    314 $ make clean
    315 $ autoreconf
    316 $ ./configure --with-hdf4 ...other options...
    317 $ make
    318 $ make install
    319 }}}
    320 
    321 
    322 === NetCDF is said to be supported, but rasdaman reports an error ===
    323 ...when trying to use ''netcdf()'' or ''inv_netcdf()'' - what can I do?
    324 
    325  * NetCDF needs to be compiled in explicitly. Re-generate rasdaman saying
    326 {{{
    327 $ make clean
    328 $ autoreconf
    329 $ ./configure --with-netcdf ...other options...
    330 $ make
    331 $ make install
    332 }}}
    333    Supported NetCDF library version is 4.0+. It provides netcdf4 (including HDF, classic, and 64) and netcdf3 (as the API is backwards compatible).
    334    Limitations: only atomic cell types, but no struct types are supported at this moment; and metadata are not preserved (they have to be stored separately in PostgreSQL tables)
    335 
    336 === The NetCDF generated by rasdaman is not recognized by NetCDF tools ===
    337 
    338  * THe issue probably has to do with the pixel type. The 'char' type in rasdaman corresponds with the 'byte' type in netcdf. In netcdf, the 'char' type is used for the 8-bit characters intended for representing text. Therefore, the netcdf(char) result is in binary instead of ASCII. However, the netcdf(char) result is [http://cf-pcmdi.llnl.gov/conformance/compliance-checker/ validated against the compliance checker]. Note: netcdf(float) works fine.
    339 
    340 
    341 == Helping ==
    342 
    343 === I want to submit a patch, how do I do this? ===
    344 
    345  1. Set your credentials (ie, your name, YOUR_FULL_NAME, and email address, EMAIL):
    346 {{{
    347 $ git config --global user.name "YOUR_FULL_NAME"
    348 $ git config --global user.email EMAIL
    349 }}}
    350  1. rasdaman must be configured and compiled with `--enable-strict` to make sure that your patch doesn't introduce new warnings.
    351  1. When you commit your changes to your local copy put a meaningful message:
    352 {{{
    353 $ git commit file1 file2 ... -m "ticket:NUMBER - commit message"
    354 }}}
    355  The subject of the patch '''must''' start with "!ticket:NUMBER - ", where NUMBER is a valid ticket number on this trac. For example this is a valid subject: "ticket:231 - subject message...". To manually fix the subject after you have created the patch, edit the patch manually and adapt the ''Subject:'' line, e.g. from
    356 {{{
    357 Subject: [PATCH] invalid subject
    358 }}}
    359  to the below (make sure to not remove the [PATCH] part!)
    360 {{{
    361 Subject: [PATCH] ticket:NUMBER - commit message
    362 }}}
    363  It's best to '''always''' specify exactly the files that you want to commit, instead of committing everything with the `-a` option, so that you avoid submitting unnecessary changes in your patch.
    364  1. Then you can make the patch, e.g:
    365 {{{
    366 $ git format-patch HEAD~1
    367 }}}
    368  1. Finally you can submit the generated patch to the [http://rasdaman.org/patchmanager rasdaman patchmanager]
    369  
    370  '''Important:''' avoid submitting generated files like ''configure, Makefile.in'', etc. in your patch, unless the corresponding source (configure.ac, Makefile.am, ...) has been really modified. Make sure that all submitted sources have an appropriate licence header.
    371 
    372 === How to report a bug/problem ===
    373 It's best if you report bugs by filling a [http://rasdaman.org/trac/rasdaman/newticket new ticket]. It's always good to include as much as possible information of the setup in which the bug occurred, so we can reproduce it. In general you should include:
    374  * gcc --version
    375  * OS and architecture
    376  * how was rasdaman configured/compiled
    377  * versions of PostgreSQL's or any other libraries that may be relevant
    378  * relevant parts of the server log files
    379 
    380 To open a new ticket, you need an account in the trac system: please request one via one of our [MailingLists mailing lists].
    381 
    382 === Why do I have to accept the [wiki:ContributorAgreement Rasdaman Contribution Agreement] when providing a patch? ===
    383 Because [wiki:License for legal reasons] the project must have a trackable code provenance.
    38421
    38522
     
    41249   sudo semanage port -a -t http_port_t -p tcp 7010
    41350}}}
     51
     52
     53=== Using automake I get an error message "directory should not contain /" ===
     54
     55 * Probably you have an outdated automake version installed, we have seen such problems with 1.7.9. Upgrade to at least 1.10.1.
     56
     57=== ''./configure'' complains that some further packages are required during installation ===
     58
     59 * These are summarized on the [wiki:RequiredPackages] page.
     60
     61=== ''./configure'' complains about missing ''curses'' ===
     62... although ''ncurses'' is there.
     63
     64 * You have run into a [http://bugs.gentoo.org/67481 bug in the ncurses package]; in /usr/lib, manually create symlinks ''libcurses.a -> libncurses.a'' and ''libcurses.so -> libncurses.so''.
     65
     66=== ''./configure'' complains that some required files, like install-sh, cannot be found === 
     67
     68 * retry ''./configure'' after running
     69{{{
     70$ automake --add-missing
     71}}}
     72
     73=== ''./configure'' complains that C++ compiler cannot create executables ===
     74
     75 * This means that either you haven't installed gcc/g++ or something got corrupted. On Debian it seems to happen when adding LIBS='-lecpg -lgdal1.7.0' to the ./configure command.
     76
     77=== make complains about missing Makefiles ===
     78...such as in the time/ directory, and issues error messages like "No rule to make target `../time/libtime.a', needed by `rasserver'.  Stop.".
     79
     80 * retry ''./configure'' after running
     81{{{
     82$ autoreconf
     83$ automake
     84}}}
     85
     86=== I get C++ compilation errors. ===
     87
     88 * Make sure you use the proper compiler version (see [wiki:RequiredPackages]). GNU folks have a relaxed view on backwards compatibility even with minor release changes, and we have experienced problems related to this in the past.
     89
     90=== I get protobuf compilation errors. ===
     91
     92 * Make sure to remove system protobuf/grpc packages, as well as any manually installed libraries/binaries in `/usr` (look for them with `find /usr -name '*proto*'`). See ticket #1249 for related information.
     93
     94=== On a 64bit architecture I get linkage errors (e.g., when linking GDAL with the rasdaman driver) like "relocation R_X86_64_32 against `.bss' can not be used" ===
     95
     96 * Make sure you use the proper compiler version (see [wiki:RequiredPackages]). GNU folks have a relaxed view on backwards compatibility even with minor release changes, and we have experienced problems related to this in the past.
     97 * retry ''./configure'' with these extra flags:
     98{{{
     99$ ./configure CFLAGS=-fPIC CXXFLAGS=-fPIC LDFLAGS=-fPIC ...other options...
     100$ make install
     101}}}
     102
     103=== rview doesn't work in 64 bit systems ===
     104
     105If you try to run rview and you get one of the errors:
     106
     107{{{
     108./rview: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
     109}}}
     110or
     111{{{
     112./rview: error while loading shared libraries: libXp.so.6: wrong ELF class: ELFCLASS64
     113}}}
     114then you are trying to run rview with libXp.so.6 64 bit version, and rview doesn't work with it. rview is a deprecated application and, as such, one should not expect any future workaround for this problem. You can, however, run rview in 64 bits system, if you install the libXp.so.6 32 bit version. To do this:
     115
     116 1. add repository for 32-bit systems (optional, only necessary in more recent OS where ia32-libs is not available by default, e.g. Ubuntu 64 bits 13.10 or higher):
     117{{{
     118$ sudo gedit /etc/apt/sources.list
     119}}}
     120 add following line in the end of file:
     121{{{
     122deb  http://cz.archive.ubuntu.com/ubuntu raring main universe
     123}}}
     124 2. install `ia32-libs`:
     125{{{
     126$ sudo apt-get update
     127$ sudo apt-get install ia32-libs
     128}}}
     129 (this will install libXp.so.6, among other 32-bit libraries)
     130
     131rview works, now, but if not, you can link the 32 bit library (/usr/lib32) to /usr/lib.
     132
     133Note: Installing lib32z1, lib32ncurses5 or lib32bz2-1.0 libs DOES NOT install libXp.so.6
     134
     135=== I get Java compilation errors. ===
     136
     137 * If, during '''make''', you get errors like this:
     138{{{
     139javac -d bin src/org/odmg/*.java src/rasj/*.java src/rasj/global/*.java src/rasj/clientcommhttp/*.java src/rasj/odmg/*.java src/rasj/rnp/*.java
     140Exception in thread "main" java.lang.NoSuchFieldError: java/util/zip/Inflater.strm
     141...many more lines...
     142}}}
     143
     144 then make sure you use the [http://www.oracle.com/technetwork/java/javase/overview/index-jsp-136246.html SUN Java 6 SDK] and not the IBM one (which seems to come preinstalled on some distributions, and is buggy).
     145
     146=== After installing I cannot find the documentation in the install directory ===
     147To include PDF and HTML documentation in the build process, which takes some time to build, you have to specify explicitly `--with-docs` when invoking `./configure`
     148
     149=== How to reinitialize RASBASE ===
     150If you want to drop all data stored in rasdaman quickly for some reason:
     151
     152'''SQLite/Filestorage (default)''':
     1531. `stop_rasdaman.sh`
     1541. Let `RASDATA` be the directory specified in the host `-connect` option in `rasmgr.conf`, likely `/opt/rasdaman/data`; make sure it is indeed this directory (`ls $RASDATA/` should show `RASBASE`, `TILES/`, `TRANSACTIONS/`).
     1551. Drop the data: `rm -rf $RASDATA/*`
     1561. Initialize a brand new database: `create_db.sh`
     1571. `start_rasdaman.sh`
     158
     159'''PostgreSQL''':
     1601. `stop_rasdaman.sh`
     1611. Drop the data: `dropdb RASBASE`
     1621. Initialize a brand new database: `create_db.sh`
     1631. `start_rasdaman.sh`
     164
     165== PostgreSQL ==
     166
     167=== I get a link error, function ECPGget_connection cannot be found ===
     168
     169 * What appears to have happened is that in PostgreSQL 8.3.0 they removed ECPGget_connection and they have reintroduced it by 8.3.7. So PostgreSQL versions 8.3.0 up to (but excluding) 8.3.7 cannot be used.
     170
     171=== I want to use a different version of PostgreSQL. Is that possible? ===
     172
     173 * You need to include a different JDBC postgresql driver (as a JAR) in the libraries folder and update the Makefile as needed. Then you can try out another PostgreSQL version, it may or may not work. Let us know your experiences to update this information!
     174
     175=== When running the script "create_db.sh", I get !''AdminIf'' related error ===
     176...more specifically, ''Creating base RASBASE...Warning/error in AdminIf Connect: SQLSTATE: 08001 SQLCODE: -402''
     177
     178There are several possible reasons:
     179  1. '''Execution permissions.''' Run the script as the user owning the postgresql processes. Use '''only''' that user for further work with rasdaman (see Installation Guide). If you use Ubuntu and installed postgres with apt-get, then logging in as user '''postgres''' is an option; I personally like to have a separate user ''rasdaman'' for this purpose where I also can set paths etc. to the executables once and for all. (The postgres db does not allow full access to rasdaman tools, because they do not run under the administrative user that launched the db server process.)
     180
     181  Alternatively, make sure that the operating system user under which you run `create_db.sh` can be authenticated via the '''ident''' method, which can be set in `pg_hba.conf`. E.g. if user is "rasdaman", then in `pg_hba.conf` you should have at least:
     182{{{
     183# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
     184local   all         rasdaman                          ident
     185}}}
     186
     187  2. '''Blocked incoming connections.''' Another cause of the problem might be that postgres does not allow incoming connections. If you have Postgres v8 or more recent, modify file "postgresl.conf" and set (uncomment) the option
     188{{{
     189listen_addresses = 'localhost'
     190}}}
     191  3. '''TCP-IP connection.''' If you have Postgres v7, set (uncomment) the following option:
     192{{{
     193tcpip_socket = true
     194}}}
     195
     196=== I get "wrong connect string" error when first running ''rasdl'' ===
     197When I first try to run rasdl (or the rasdaman server, for that matter) against PostgreSQL after installation, the log says "server ok" but "wrong connect string"
     198
     199 * There are several possible reasons:
     200  1. '''Port:''' Running a database cluster on a separate port requires proper setting of environment variable PGPORT to allow for communication between rasdaman and PostgreSQL. (thanks to Mario Uhlig!)
     201  2. '''Socket directory:''' using '/var/lock/postgresql' as socket directory makes rasdl fail for a reason still to be found. Switching back to the default socket dir '/var/run/postgresql' resolves the issue. (thanks to Alexander Herzig!)
     202
     203=== Undefined reference to 'ECPGconnect' ... ===
     204In Ubuntu you may get this error:
     205{{{
     206adminif.cc:(.text+0x4b): undefined reference to `ECPGconnect'
     207adminif.cc:(.text+0x71): undefined reference to `ECPGtrans'
     208adminif.cc:(.text+0x80): undefined reference to `ECPGdisconnect'
     209../reladminif/libreladminif.a(databaseif.o): In function `DatabaseIf::disconnect()':
     210
     211mdddomaintype.cc:(.text+0x720): undefined reference to `ECPGdo'
     212collect2: ld returned 1 exit status
     213make[2]: *** [rasserver] Error 1
     214make[2]: Leaving directory `/home/rasdaman/rasdaman/server'
     215make[1]: *** [install-recursive] Error 1
     216make[1]: Leaving directory `/home/rasdaman/rasdaman/server'
     217make: *** [install-recursive] Error 1
     218}}}
     219
     220To fix it, set the libs explicitly at configure, e.g.
     221{{{
     222./configure --prefix=/home/rasdaman/install LIBS='-lecpg -lgdal1.7.0'
     223}}}
     224
     225=== Deleting big collection imported rasimport results in 'Serializable database error...' ===
     226Check the PostgreSQL log, usually it indicates that some parameters in the postgresql.conf need to be increased, along with SHMALL/SHMMAX parameters in the kernel.
     227
     228== Administration ==
     229
     230=== stop_rasdaman.sh fails to stop rasdaman ===
     231
     232If `stop_rasdaman.sh`, `sudo service rasdaman stop`, or `sudo systemctl stop rasdaman.service` fail to stop rasdaman, then it's necessary to do it manually. You have to manually kill first the rasmgr process and then the rasserver processes:
     2331. `sudo pkill rasmgr`
     234 * check: if `pgrep rasmgr` still prints a pid, then it has to be killed with `sudo pkill -9 rasmgr`
     2351. repeat the same with rasserver: `sudo pkill rasserver`
     236 * check: if `pgrep rasserver` still prints some pids, then it has to be killed with `sudo pkill -9 rasserver`
     237
     238Afterwards you can start rasdaman again.
     239
     240== Rasql queries ==
     241
     242=== I get syntax error ''unexpected name'' when using a floating point number ===
     243
     244 * Floating point numbers must have a leading zero, for example; "0.9" instead of ".9".
     245
     246=== My query which uses ''log'' doesn't work ===
     247{{{
     248for c in (rgb) return encode(log(c.0), "jpeg")
     249}}}
     250
     251 * The '''log''' function needs positive numbers as arguments, and will return -Infinity if the argument is 0. You need to make sure that the input does not contain any zeros. You can check that using the query
     252{{{
     253for c in (rgb) return count(c.0 = 0)
     254}}}
     255 '''''Solution''''' (depending on your overall formula): Add 1 to the input:
     256{{{
     257for c in (rgb) return encode(log(c.0+1), "jpeg")
     258}}}
     259
     260=== My insert query produces error 821 (cell type mismatch) ===
     261... although I provide a TIFF file with correct pixel type:
     262{{{
     263insert into FloatCollection values inv_tiff( $1 )
     264}}}
     265
     266 * You need to provide an explicit cast (see section 9.8 in the Rasql Guide); a correct phrasing of this query is:
     267{{{
     268insert into FloatCollection values (float) inv_tiff( $1 )
     269}}}
     270
     271=== How do I position a replacement array when updating a collection? ===
     272
     273 * In an update statement, the slice coordinates are specified with the set operator, however the 2D position of the replacement array is defined by the spatial domain of the array, which by default is [0:width,0:height], and can be modified with the shift operator or the --mdddomain option of rasql.
     274   For example a query to update the 3D collection C with a 2D image of size 255x210 that should replace the region at interval [10, 100:355, 100:310]:
     275{{{
     276update C set [10, *:*, *:*] assign shift(inv_tiff($1), [100, 100])
     277}}}
     278 See wiki:PartialUpdates for more details.
     279
     280 Note that the shift vector applies to the second and third dimension (slice defined in the first dimension).
     281
     282=== How does the Storage Layout Language work? ===
     283
     284 * Check the [attachment:sstdm2010.pdf Storage Layout Language paper] for more details, while the manual is not yet updated.
     285
     286=== "Error: 100 Exception: Internal error: DL parse error." ===
     287What does this error returned by rasql mean?
     288
     289 * You have likely inserted types to the database which names start with a rasdl reserved word. This is a known issue, see #121 for a workaround.
     290
     291=== How can I import large images that don't fit into main memory? ===
     292 * Check this short guide on [wiki:PartialUpdates partial updates] in addition to the documentation of the update statement in the [source:manuals_and_examples/manuals/doc-guides/ql-guide.pdf Query Language Guide for rasql].
     293
     294=== How to use the encode() function to export data ===
     295 * Check [wiki:RasqlEncodeFunction this] short unofficial documentation until the Query Language Guide is updated.
     296
     297
     298== rasdaview ==
     299
     300=== rasdaview returns an error "no suitable servers started", although I have servers available ===
     301
     302 * For historical reasons, rasdaview needs an RPC type rasserver running. See the Installation Guide for what this means and how such a server can be started.
     303
     304== Rasj and Java ==
     305
     306=== Overflow when unsigned bytes are retrieved with rasj ===
     307If I send the query ''select max_cells(c.0) from rgb as c'' via command line (rasql utility), then the result is 255 as expected; if I send this query via RasJ, then the result is -1.
     308
     309 * Java does not have an 8-bit unsigned data type. Byte is a signed 8 bit and hence 255 is represented as -1. What you can do is to transform bytes to char by adding 2^8^ if the 2^7^ bit is set. Tested, works. Alternatively, cast to a larger data type on server side:
     310{{{
     311select (long) max_cells(c.0) from rgb as c
     312}}}
     313
     314=== I get class version incompatibility error messages ===
     315I get weird error messages from the Java runtime system which seems to hint at class version incompatibilities, such as "Class version error" or "Class not found".
     316
     317 * There might be a conflict with the locally provided libraries, to be found at directory $PETASCOPE/lib. Check them, and if you find a mismatch then remove them and use the resp. libraries of your local installation instead. Alternatively, consider upgrading your Java SDK to version 1.6.
     318
     319 * Check that the versions `javac -version` and `java -version` match, otherwise you may get an error `Exception in thread "main" java.lang.UnsupportedClassVersionError: ..: Unsupported major.minor version 51.0`
     320
     321== WCPS / petascope ==
     322=== Mixing trimming and slicing in WCPS fails ===
     323 * A workaround until [ticket:64 this ticket] is fixed is to separate the two operations, e.g. instead of
     324{{{
     325c[t(5),x(0:20),y(0:20)]
     326}}}
     327   use
     328{{{
     329(c[x(0:20),y(0:20)])[t(5)]
     330}}}
     331
     332=== "Requested more data than the server can handle at once" ===
     333
     334If a WCS/WCPS query fails with a "Requested more data than the server can handle at once", then it's likely that you need to increase the maximum amount of RAM that Tomcat is allowed to allocate.
     335
     336On most systems this can be done by editing a `/etc/default/tomcat*` file. Find the `JAVA_OPTS` option and set `-Xmx` to the desired value (e.g. to allow 4GB RAM, use `-Xmx4G`.
     337
     338== Data formats ==
     339
     340=== HDF4 is said to be supported, but rasdaman reports an error ===
     341...when trying to use ''hdf()'' or ''inv_hdf()'' - what can I do?
     342
     343 * HDF4 needs to be compiled in explicitly. Re-generate rasdaman saying
     344{{{
     345$ make clean
     346$ autoreconf
     347$ ./configure --with-hdf4 ...other options...
     348$ make
     349$ make install
     350}}}
     351
     352
     353=== NetCDF is said to be supported, but rasdaman reports an error ===
     354...when trying to use ''netcdf()'' or ''inv_netcdf()'' - what can I do?
     355
     356 * NetCDF needs to be compiled in explicitly. Re-generate rasdaman saying
     357{{{
     358$ make clean
     359$ autoreconf
     360$ ./configure --with-netcdf ...other options...
     361$ make
     362$ make install
     363}}}
     364   Supported NetCDF library version is 4.0+. It provides netcdf4 (including HDF, classic, and 64) and netcdf3 (as the API is backwards compatible).
     365   Limitations: only atomic cell types, but no struct types are supported at this moment; and metadata are not preserved (they have to be stored separately in PostgreSQL tables)
     366
     367=== The NetCDF generated by rasdaman is not recognized by NetCDF tools ===
     368
     369 * THe issue probably has to do with the pixel type. The 'char' type in rasdaman corresponds with the 'byte' type in netcdf. In netcdf, the 'char' type is used for the 8-bit characters intended for representing text. Therefore, the netcdf(char) result is in binary instead of ASCII. However, the netcdf(char) result is [http://cf-pcmdi.llnl.gov/conformance/compliance-checker/ validated against the compliance checker]. Note: netcdf(float) works fine.
     370
     371
     372== Helping ==
     373
     374=== I want to submit a patch, how do I do this? ===
     375
     376 1. Set your credentials (ie, your name, YOUR_FULL_NAME, and email address, EMAIL):
     377{{{
     378$ git config --global user.name "YOUR_FULL_NAME"
     379$ git config --global user.email EMAIL
     380}}}
     381 1. rasdaman must be configured and compiled with `--enable-strict` to make sure that your patch doesn't introduce new warnings.
     382 1. When you commit your changes to your local copy put a meaningful message:
     383{{{
     384$ git commit file1 file2 ... -m "ticket:NUMBER - commit message"
     385}}}
     386 The subject of the patch '''must''' start with "!ticket:NUMBER - ", where NUMBER is a valid ticket number on this trac. For example this is a valid subject: "ticket:231 - subject message...". To manually fix the subject after you have created the patch, edit the patch manually and adapt the ''Subject:'' line, e.g. from
     387{{{
     388Subject: [PATCH] invalid subject
     389}}}
     390 to the below (make sure to not remove the [PATCH] part!)
     391{{{
     392Subject: [PATCH] ticket:NUMBER - commit message
     393}}}
     394 It's best to '''always''' specify exactly the files that you want to commit, instead of committing everything with the `-a` option, so that you avoid submitting unnecessary changes in your patch.
     395 1. Then you can make the patch, e.g:
     396{{{
     397$ git format-patch HEAD~1
     398}}}
     399 1. Finally you can submit the generated patch to the [http://rasdaman.org/patchmanager rasdaman patchmanager]
     400 
     401 '''Important:''' avoid submitting generated files like ''configure, Makefile.in'', etc. in your patch, unless the corresponding source (configure.ac, Makefile.am, ...) has been really modified. Make sure that all submitted sources have an appropriate licence header.
     402
     403=== How to report a bug/problem ===
     404It's best if you report bugs by filling a [http://rasdaman.org/trac/rasdaman/newticket new ticket]. It's always good to include as much as possible information of the setup in which the bug occurred, so we can reproduce it. In general you should include:
     405 * gcc --version
     406 * OS and architecture
     407 * how was rasdaman configured/compiled
     408 * versions of PostgreSQL's or any other libraries that may be relevant
     409 * relevant parts of the server log files
     410
     411To open a new ticket, you need an account in the trac system: please request one via one of our [MailingLists mailing lists].
     412
     413=== Why do I have to accept the [wiki:ContributorAgreement Rasdaman Contribution Agreement] when providing a patch? ===
     414Because [wiki:License for legal reasons] the project must have a trackable code provenance.