ColdFusion 2016 file not found error - coldfusion

I installed ColdFusion 2016 developer edition on windows 8.1. I copied my CF project folder MyCFProject to C:\ColdFusion2016\cfusion\wwwroot\CFIDE directory and opened http://localhost/MyCFProject/index.cfm where index.cfm is in MyCFProject folder. This url worked fine and I can run the app successfully. But I copied another project folder MySecondProject that also has an index.cfm file and opened url http://localhost/MySecondProject/index.cfm that gives me the following error. Both projects were copied from Windows 7 that has ColdFusion 11 installed and both projects work fine there:
Error:
File not found: /MySecondProject/Index.cfm
Browser Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36
Remote Address ::1
Referrer
Date/Time 23-Jul-16 08:00 PM
Stack Trace
coldfusion.runtime.TemplateNotFoundException: File not found: /MySecondProject/Index.cfm
at coldfusion.filter.PathFilter.invoke(PathFilter.java:145)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
at coldfusion.CfmServlet.service(CfmServlet.java:219)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)

I found the error and it works now. In ColdFusion 11, when I copied the project directory to the path C:\ColdFusion11\cfusion\wwwroot\CFIDE, it automatically appeared in IIS7.5 (maybe the CF installation sets up this path to IIS). However, in ColdFusion 2016, it seems you have to create a virtual directory yourself and point it to the physical path of your app (in my case, the path described above). Another possibility is that during the ColdFusion 2016 installation, there was an option to point C:\ColdFusion2016\cfusion\wwwroot\CFIDE to IIS8, but I either ignored it or opted out of that installation option.
OBSERVATION: Moreover, I noticed that in CF 11, when you copy your project directory to C:\ColdFusion11\cfusion\wwwroot\CFIDE it gets connected to IIS and when you browse the site from IIS you get the home page URL as http:/localhost/CFIDE/MyProject; whereas in ColdFusion 2016, when you copy your project folder to C:\ColdFusion2016\cfusion\wwwroot\CFIDE you still have to manually create a virtual directory in IIS and point it to C:\ColdFusion2016\cfusion\wwwroot\CFIDE and that the URL of your site is http://localhost/MyProject [without CFIDE folder in the URL]. It may have something to do with the installation options I may have chosen when I installed CF 2016.

Related

WSO2 API Manager 2.0.0 : white screen on the application view screen when running as a systemd service

Consecutively to WSO2 API Manager 2.0.0 : white screens after installing https certificate, I've just installed a fresh new WSO2 API Manager (single node) from the 2.0.0 zip distribution using MySQL Database to try to avoid problems related to H2 database.
After the install is complete, it starts with no warning and no error (after a few tries to get all things right in master-datasources.xml).
In publisher, I can log in as admin, create a new API, import swagger json contract, finalize API with no problem.
In store, I can log in as admin, view the API I've just created, create a new application via the right-side drop down menu, subscribe to it.
BUT when I try to open an application in order to generate keys and token, I just get a white empty screen. Nothing can help me in the logs :
[29/Nov/2016:16:17:33 +0100] "GET /store/site/pages/application.jag?name=MyNewApp&tenant=carbon.super HTTP/1.1" 200 3 "https://10.22.106.101:9443/store/site/pages/applications.jag?tenant=carbon.super" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
EDIT :
A few minutes after I get the page crash (maybe not related ?) I have this printing repeatedly in wso2carbon.log :
WARN {sun.rmi.transport.tcp.TCPTransport$AcceptLoop} - RMI TCP Accept-11111: accept loop for ServerSocket[addr=0.0.0.0/0.0.0.0,localport=11111] throws {sun.rmi.transport.tcp.TCPTransport$AcceptLoop}
java.lang.OutOfMemoryError: unable to create new native thread
Again, this is a basic installation (unzip) plugged into MySQL database with no customization/configuration.
EDIT 2 : So I think I have found the cause, but not the solution. This problem does not occur when I launch via direct command line, it occurs only when I launch through systemd service :
sudo sytemctl start wso2am.service
/etc/systemd/system/wso2am.service :
[Unit]
Description=WSO2 API Manager
[Service]
User=linc
ExecStart=/bin/bash -c ". /etc/profile.d/setenv.sh; /home/linc/wso2am-2.0.0/bin/wso2server.sh start"
Type=forking
[Install]
WantedBy=multi-user.target
So is WSO2 not compatible with systemd launching ? or am I missing some parameter ?
I have followed this blog post to run APIM as a Linux service. Please have a look. It should work without a problem. (Make sure to add #!bin/sh at the top of myService.sh)
Finally I have WSO2 API manager running as a Systemd service.
This is my 'wso2apim.service' file
[Unit]
Description=WSO2 API Manager
[Service]
Environment= JAVA_HOME=/usr/lib/jvm/java-8-oracle
WorkingDirectory=/opt/wso2/wso2am-2.0.0
User=wso2
ExecStart=/bin/bash /opt/wso2/wso2am-2.0.0/bin/wso2server.sh
ExecStop= /bin/bash -c '/opt/wso2/wso2am-2.0.0/bin/wso2server.sh stop'
ExecReload=/bin/bash -c '/opt/wso2/wso2am-2.0.0/bin/wso2server.sh restart'
[Install]
WantedBy=multi-user.target
It's simple, but tricky
The service type is simple (not fork or either). (Default value)
The ExecStart has not to include the 'start' option. With the
start option, it tries a nohup, that is not working
But, the stop has to include the stop options
Hope it helps

wamp server is not working on the windows8

I am installing wamp server 64 bit on my windows 8 system.I get following error "Application was unable to start correctly ( 0*c00007b)"
1) I have not installed the Skype
2) Port 80 is not being used by any program.
3) IIS service is not running on my system
4) I have tried re installing the wamp also
See screenshots
Following is there in C:\Windows\System32\Drivers\etc\hosts
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
How to fix this.
Even though I start wamp server the icon never turn to green.
Do I need VC++ Redistributable?
Solution
I followed shiva's answer and installed 32 bit version.
Hope some one will post correct solution for this issue.
you can install TCPView to find out that which service is using the post number 80, and close it and then run Apache(if something is using it).
alternately you can edit the httpd.conf file and change the port number ,by default it can be found at this location
C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf
In it go to the line which has this entry(line 58 in WAMP server 2.4's installation)
Listen 80
and change it to something like this Listen 8080, and restart WAMP(or specifically Apache).
Now you will be able to access localhost like this
http://localhost:8080
Update 1
According to this forum post, installing 32-bit version in place of 64 bit version,solved the issue in some cases

Django - Development server all ports forbidden

I am get a little crazy with Django development server
Since yesterday, i got the following message:
0 errors found January 17, 2014 - 17:49:31
Django version 1.6.1, using settings 'applibs.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Error: You don't have permission to access that port.
And this, independently from the port i use...i tried with 8081, 8082 and so on.
I must have changed something but i can't figure out what exactly
Any help would be welcomed
thanks
EDIT: Reason Found!
I finally understand the reason for such problem and it has nothing to do with the ports as it initially seems to be.
Indeed, i am initiating a logger in Wsgi.py as shown below
logging.basicConfig(level=logging.DEBUG,format='%(asctime)s \t %(name)s \t %(levelname)s \t %(message)s', datefmt='%Y-%m-%d %H:%M:%S',filename=os.path.join(settings.BASE_DIR,'applibs.log'))
All traces are logged in a file called applibs.log
If the file does not exist, it is automatically created.
If i run the development server, the file will be created with the current user as owner and group.
If i run a production server (ie. apache), the file will be created with the apache user (www-data) as owner and group.
In any case, the file is created with write access only to the user.
So what happened?
I ran the application on a production server. The file was created with user www-data.
Then when i tried to run the application in development server, the application was trying to access the same file (which has already been created) with the current user and so the access is refused.
Et voila :)

Use Wamp without having to use projects

So, I love Wamp. It's great for development. The only downside is that in wamp, I have to code everything to use "localhost/projectname/" as a base, but on my actual site, everything has the base of just "/".
Is there a way to use wamp where it treats localhost has your website url?
here's how I'm doing :
I'm editing my httpd.conf file and append a virtual host at
the bottom of it (in the dedicated lines) each time I want to add a
new local website :
<VirtualHost *:80>
DocumentRoot "C:/wamp/www/fake"
ServerName fakesite
</VirtualHost>
And I tell windows to point the local host address (127.0.0.1) from
the hostname that I defined (fakesite in the example):
I'm using windows and I just edit the following file :
X:\Windows\System32\drivers\etc\hosts and append a new line as
follow : 127.0.0.1 fakesite
note : you'll need to restart wamp after edition config files.
This way and if everything went right you'll just need to type fakesite/xxx to reach the following physical folder : c:/wamp/www/fake/xxx
Can't you use VirtualBox to set up a real server, use apache vhosts to set a fake domain and edit your windows hosts file to point to your local server?
When I do that, I set up samba shares so I can still use Windows to edit my files, then hit "save" in the editor and just refresh the browser. Works like a charm.

C/C++ FastCGI Developers toolkit example program (not working?)

I am using the fastcgi C/C++ toolkit, to develop a test fastcgi app.
I built (and am now testing) this example provided by the toolkit.
I have loaded Apache mod_fcgid and successfully restarted the apache2 daemon. However, when I try to access the fastcgi resource, it is returning a blank page.
Note: I made the following changes to the example code (as it didn't work with the default socket fd value of 0):
int sock_fd = FCGX_OpenSocket(":5000", 1);
FCGX_InitRequest(&request, sock_fd, 0);
My /etc/apache2/mods-enabled/fcgid.conf file looks like this:
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
SocketPath /var/lib/apache2/fcgid/sock
IPCConnectTimeout 10
IPCCommTimeout 20
OutputBufferSize 0
MaxRequestsPerProcess 500
</IfModule>
My /etc/apache2/mods-enabled/fcgid.load file looks like this:
LoadModule fcgid_module /my/path/here/libs/mod_fcgid.so
I then accessed the 'resource' in a browser using the following url:
http://127.0.0.1:5000
What am I doing wrong? (assuming that someone has actually managed to get the example cited above, to work)
I am developing/testing on Linux Ubuntu 10.x
i don't use apache for while, but i think your url is bad
i assume your apache run on port 80 and your echo.fcgi is at root of apache folder
for information, i use nginx for serve fcgi application
http://localhost/echo.fcgi
Run apachctl -D to verify your have mod_fcgid running. I believe no output (i.e a white page) occurs when your process crashes.
You will need to compile your program with debugging (-O0 -ggdb), redeploy, and restart Apache.
Change your Apache config to only spawn one process. This will allow you to attach gdb to your FCGI application and debug it.
Let me know if you need further assistance.