Archive for the “ColdFusion” Category

Coldfusion: Connection reset by peer: socket write error

If you get the following error message repeatedly when a ColdFusion page connects to a database, deselect the Maintain Connections option for the data source:

[Macromedia][Oracle JDBC Driver]Connection reset by peer: socket write error

If you do not want to deselect the Maintain Connections option for performance reasons, you can lower the Timeout setting for the data source from the default of 20 minutes to 1 or 2 minutes. This way, if your database connections are dropped by a database server event, your ColdFusion MX server will recover in 1 or 2 minutes instead of 20 minutes.

——–
reference
Coldfusion release notes

============
Error Message:

Connection reset by peer.

Explanation:

A connection was forcibly closed by a peer. This normally results from a loss of the connection on the remote socket due to a timeout or a restart. On a datastream socket, the connection was reset. This reset could be generated locally by the network system when it detects a connection failure, or it might be received from the remote host (in TCP terms, the remote host sent an RST packet). This error is also possible on a datagram socket; for instance, this error could result if your application sends a UDP datagram to a host, which rejects it by responding with an ICMP Port Unreachable.

User Action:

Check the following: 1. Ping the remote host you were connected to. If it doesn’t respond, it might be offline or there might be a network problem along the way. If it does respond, this problem might have been a transient one (so you can reconnect now), or the server application you were connected to might have terminated (so you might not be able to connect again). 2. Ping a local host to verify that your local network is still functioning (if on a serial connection, see next step). 3. Ping your local router address. If you are on a serial connection, your local router is the IP address of the host you initially logged on to using SLIP or PPP. 4. Ping a host on the same subnet as the host you were connected to (if you know of one). This will verify that the destination network is functioning. 5. Type tracert at the command prompt to determine the path to the host you were connected to. This won’t reveal too much unless you know the router addresses at the remote end, but it might help to identify if the problem is somewhere along the way.

M$ reference guide

August 11, 2008 Posted Under: ColdFusion   Read More

coldfusion: unable to connect to search service

C:\ColdFusion8\verity directory.Once there double click the verity-install.bat file

CF7

C:\JRun4\verity\verity-install.bat

to uninstall

verity\verity-uninstall.bat

reference

http://orangepips.instantspot.com/blog/Verity

April 26, 2008 Posted Under: ColdFusion   Read More

Adding Fonts to coldfusion

Add the needed fonts via the control panel . click on the fonts icon and proceed to file and install new font. After you install the new font you must then restart the coldfusion application

January 17, 2008 Posted Under: ColdFusion   Read More

Null Pointers are another name for undefined values

The Null Pointer error is due to an issue with ColdFusion8 and MySQL. The fix for this is to uncheck ‘Maintain connections across client requests’ in the Advanced settings fir the ColdFusion DSN. .

January 10, 2008 Posted Under: ColdFusion   Read More

Installing coldfusion with Apache

Compiling and Installing the Apache module for CFMX from source code
This example was tested on a server running Redhat Linux 8 and Apache 2.0.46 built from source. Click on the link for instructions on installing from source.

Install updater 3 or greater
The source code for the ColdFusion Apache module was included in CFMX updater 3, so step one is to install Updater 3 or higher from Macromedia. In this particular case CFMX was already installed using the standalone server, so if your are installing from scratch choose that option.

Extract the module source code
The source is located in the coldfusionmx/runtime/lib/ directory inside the wsconfig.jar file. Jar files are Java Archive files, and they use the same compression as zip files, so you can treat them like zip files.

cp /opt/coldfusionmx/runtime/lib/wsconfig.jar .
unzip wsconfig.jar

This creates several directories but in connectors/src/ the source for the Apache module resides. Unzip the file ApacheModule.zip
cd connectors/src
unzip ApacheModule.zip

Compile the Apache Module
In the src directory is a file called ApacheBuildInstructions.txt, read this file. This file is the basis of our instructions for this step.

cat ApacheBuildInstructions.txt

We have crafted a build script that does most of the work for you, you just need to make sure the the paths are correct in the build script:
#!/bin/bash
#CFMX path eg: /opt/coldfusionmx
export CFMX=/opt/coldfusionmx

#apache path eg: /usr/local/apache2
export APACHE_PATH=/usr/local/apache2

#apache bin path eg: $APACHE_PATH/bin
export APACHE_BIN=$APACHE_PATH/bin

#CFMX connector path eg $CFMX/runtime/lib/wsconfig/1
export CFMX_CONNECTOR=$CFMX/runtime/lib/wsconfig/1

#stop apache
$APACHE_BIN/apachectl stop

${APACHE_BIN}/apxs -c -Wc,-w -n jrun20 -S LIBEXECDIR=${CFMX_CONNECTOR} mod_jrun20.c \
jrun_maptable_impl.c jrun_property.c jrun_session.c platform.c \
jrun_mutex.c jrun_proxy.c jrun_ssl.c

${APACHE_BIN}/apxs -i -n jrun20 -S LIBEXECDIR=${CFMX_CONNECTOR} mod_jrun20.la

strip $CFMX_CONNECTOR/mod_jrun20.so

Before you run this script (note: you can also just type it in by hand) make sure that the directory for the CFMX_CONNECTOR exists (runtime/lib/wsconfig/1). You will probably need to make this directory:
mkdir /opt/coldfusionmx/runtime/lib/wsconfig/1

If the directory already exists create a directory called 2 instead of 1, and update the CFMX_CONNECTOR variable in the script. Now save the script above in a file, we assume you called it build.sh. You need to mark it as executable with chmod, and then run it.
chmod u+x build.sh
./build.sh

Now you have built the mod_jrun20.so file, and it resides in your CFMX_CONNECTOR directory.

Configure ColdFusion MX to work with Apache First stop ColdFusion MX:

service coldfusionmx stop

Now edit the file /opt/coldfusionmx/runtime/servers/default/SERVER-INF/jrun.xml it may be a good idea to keep a backup of this file before you edit it. Below is the settings you will want to change, with changes in Bold (approx line 350):
8500
*
true
10
10
300
1000

51010
false
10
10
300

false
500
0

The cacheRealPath attribute may be left to true if your only running one web site on the apache server, but if you are running multiple sites you will want to set it to false.

Configure apache for ColdFusion
The Apache httpd.conf file needs to be told to load the module, and also told that index.cfm should be used as a directory index. To accomplish this, I like to create a directory called conf.d in my apache directory /usr/local/apache2/conf.d/ and then create a file called coldfusion.conf. If I have other modules such as php, I create a php.conf file. This allows you to easily edit module specific settings. So to do this I need to tell httpd.conf about my conf.d directory, I do this by adding the following line to the httpd.conf file:

Include conf.d/*.conf

you will want to make sure that your httpd.conf file does not already have this line in it, to search your file run:
grep conf.d httpd.conf

It will not output anything if it does not find the string conf.d in httpd.conf

Now lets create conf.d/coldfusion.conf with the following contents:

LoadModule jrun_module “/opt/coldfusionmx/runtime/lib/wsconfig/1/mod_jrun20.so”

JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore “/opt/coldfusionmx/runtime/lib/wsconfig/1/jrunserver.store”
JRunConfig Bootstrap 127.0.0.1:51010
#JRunConfig Errorurl optionally redirect to this URL on errors
AddHandler jrun-handler .cfm .cfc .cfml .jsp .jws

DirectoryIndex index.cfm

Start ColdFusion and Apache

service coldfusionmx start

service apache start

December 5, 2007 Posted Under: Apache, ColdFusion   Read More