Can't get highcharts export server working using Java - highcharts

everyone,
I followed instructions on highcharts export server. And my test environment is Ubuntu Server, tomcat 7.x, java 1.7.x, the latest highcharts export server code cloned by git. No problem occurred during mvn install and mvn clean package. And soem settings of my app-convert.properties is
port=8080 # the same port with my tomcat
exec = /home/{my user name}/phantomjs-1.9.1-linux-x86_64/bin/phantomjs
And from the logs of Tomcat, I can see that phantomjs is started and listening on port 8080. Also when I access http://{myservername}:8080/highchars-export-web/, it's loaded correctly, even when I click 'Generate Image' button, it gave me a file named 'Charts.png'. However, the image's size is 1kb, not the one as getting from http://export.highcharts.com/demo. I don't know what I am missing. I need you guys help on this.
Best wishes,
Arthur

Pick a different port other than the one your tomcat (or other service) is listening on. That port you set in the app.properties files is for the phatomjs service to listen on.

Related

Jenkins Update Center broken -- java.io.IOException: Downloaded file /var/lib/jenkins/plugins/*.jpi.tmp does not match expected SHA-1 [duplicate]

I have installed Jenkins by deploying its WAR file to Tomcat. On typing
http://localhost:8080/jenkins
In browser, jenkins home page is opening which means jenkins is successfully installed. I configured system settings, gave jdk and maven path and save them. Then to install plugins, I clicked on Jenkins->Manage plugins and clicked on Available tab but could not find any plugins. I tried three solutions:
Configured proxy for Jenkins by going to Jenkins->Manage Plugins->Advanced(did not find plugins)
Restarted server, refreshed browser and went to Jenkins->Manage plugins->Available (still did not find any plugins). So, I read somewhere that we have update plugins forcefully if they are not updated automatically. So, went to Jenkins->Manage Plugins->Advanced and clicked the tab 'Check now' (Still did not find any plugins on clicking on Available tab).
Finally I read somewhere that if we add the pluginGroup 'org.jvnet.hudson.tools' to settings.xml file of maven, problem may be resolved. So, added the corresponding code to settings.xml:
Then I tried again but still could not find any plugins in
Jenkins->Manage plugins->Available
If any other solution is there which can resolve this problem please let me know.
Go to: Manage Jenkins → Manage Plugins → Advanced, then click Check now in the bottom right-hand corner. When you go back to Available tab all plugins should be listed.
At the plugins section of Jenkins open the "Advanced Settings" tab and paste the following URL into the Update Server URL field (at the bottom): https://updates.jenkins.io/update-center.json
For me the following worked:
Go to Manage Jenkins->Configure Global Security
Click the checkbox for "Use browser for metadata download"
I also have security disabled and prevent cross site forgery unchecked.
You can force update the plugin list by hand.
This worked for me:
wget -O default.js http://updates.jenkins-ci.org/update-center.json
sed '1d;$d' default.js > default.json
curl -X POST -H "Accept: application/json" -d #default.json http://localhost:8080/updateCenter/byId/default/postBack --verbose
(I created this in order to be able to deploy Jenkins and install plugins in batch)
The problem may be that your browser proxy settings are not configured properly.
Jenkins doesn't retrieve the plugin list directly from the update center, it tells your browser to retrieve it and post it back to Jenkins. So the HTTP proxy settings within Jenkins are ignored for this step.
So if you are using a browser that is configured to only work within your network, to connect to local servers such as a Jenkins instance, then you won't be able to update the plugin list.
(This just happened to me and took a frustrating hour to work out.)
This was so frustrating... Not because of difficulty but lack of clarity and good documentation, at least for the issues I encountered. I ended up having to set up the Manage Plugins -> Advanced -> HTTP Proxy Configuration in a very specific, picky way. If I didn't do exactly this, minus the last noted thing on the bottom, I could not get this working. Maybe it's my work's firewall, maybe it's jenkins, either way give this a shot if you haven't been able to successfully update your proxy settings. I used the Validate Proxy tool in the menu. I'll very briefly describe the infographic basics below
Don't add http:// or https:// to your Server field
Use your jenkins credentials for Username and Password, not your proxy credentials (if that's even applicable)
Add http:// to your Test URL if you're checking something like Google or Yahoo
Submit your changes
Then run check-now
(Optional?) Change Update site from HTTP to HTTPS
You should be able to now update your plugins fingers-crossed
Change the update site from
https://updates.jenkins.io/update-center.json
to
http://updates.jenkins-ci.org/update-center.json
I had this issue when using nginx as a secure reverse proxy. I needed to update the url from which to download the updates list, as suggested above, only with https to prevent mixed content errors in chrome.
The reason why I could not find a plugin that i searched for in Jenkins->Manage plugins->Available:
It had already been installed and it was in Jenkins->Manage plugins->Installed.
I came across this SO answer while I was experiencing the same issue. When I would click "Check Now" to force Jenkins to download the latest list, my browser would just hang. It wasn't until I tailed the Jenkins log that I found this here:
Mar 10, 2014 1:15:54 PM hudson.security.csrf.CrumbFilter doFilter
WARNING: No valid crumb was included in request for /administrativeMonitor/hudson.diagnosis.ReverseProxySetupMonitor/test. Returning 403.
Looks like the issue has to do with how I've put Jenkins behind a reverse proxy and enabled the option to prevent Cross Site Request Forgery. Once I disabled that, the "Check Now" completed within 30 seconds.
For me, the following works out. I experience this empty available list issue after a fresh install jenkins 1.638 on Ubuntu 1404 in virtual box. We're under an ISA proxy server.
Go to Jenkins->Manage Plugins->Advanced and setup the proxy as below:
Host: 192.168.x.x (your Proxy IP)
Port: 80 (Your proxy port)
Note that I find the format matters. I tried adding http:// it doesn't work. It has to be exactly like above.
Then hit the check now button in the bottom right as everyone else suggested. Then you get the list.
My solution is here
If you type in "http://updates.jenkins-ci.org/update-center.json" directory to brower's address bar, (in my case) it actually redirected to "http://ftp.tsukuba.wide.ad.jp/software/jenkins/updates/current/update-center.json."
It worked when I set "http://ftp.tsukuba.wide.ad.jp/software/jenkins/updates/current/update-center.json" to Jenkins' update site, and click "Save" & "Update."
Hope this helps.
Or your plugin can be already installed. Once it's installed it's not in the list of available plugins.
If you're using Chrome
Go to: Manage Jenkins → Manage Plugins → Advanced, then click Check now in the bottom right-hand corner. Then click a shield icon in the address bar, click Load anyway and Jenkins will start to update plugins. In Firefox this icon is situated on the left side of address bar, near back button.
You can install plugins manually, to this this, go to advanced tab in manage plugins, after downloading plugins you need, submit these
I had an issue with NginX proxy requests to Jenkins. I had error:
Nginx 413 Request Entity Too Large
I was able to fix that by adding
client_max_body_size 2M;
to the /etc/nginx/nginx.conf file. After that I went to Jenkins - Plugin Manager - Advanced tab and press Check Now button
I had the same issue and was able to resolve it by enabling the browser metadata download. Please follow the steps below the enable this configuration in Jenkins
Step 01: Select Manage Jenkins and click on Configure Global Security
Step 02: Under the Plugin Manager section tick the "Use browser for metadata download"
Step 03: View Available tab under the Plugin Manager section in Manage Jenkins
If its a fresh installation not behind proxy please follow instruction under available "Use the search field above to search for available plugins".
After trying many things (including all the solutions posted here) and hours of searching... I've ended up with the upgrade of jenkins to version 1.638.
This helps to solve the frustrated problem with empty available plugins in older version of jenkins!
This answer is specific to Windows 10. If you use the installer that Jenkins now comes bundled as, Jenkins will get installed as a service. By default, the service runs under the Local System account. You have to change it to run under the Network Service account in order for Jenkins to be able to connect with the plugin update service. If you have Administrator privileges on the system then these steps should help:
Open Command Prompt.
Type in Services.msc and hit enter.
The Services window should be open now.
Locate the Jenkins instance in the list.
Right click on it and click Properties.
Go to the Log On tab (should be the second one).
There should be 2 radio buttons.
Local System Account (selected)
This Account (unselected)
Select This Account.
Type in Network Service in the text box.
Provide your windows password.
Hit Apply and OK.
Restart the Jenkins service.
Reload Jenkins in browser.
For added measures, you could also add a rule in Windows Firewall (or any other Firewall that you may be using) to allow outbound requests from Jenkins. Point to the jenkins.exe application that should be located in the installation directory of Jenkins for this rule.
For those like me who use Jenkins with Docker with a JDK8u60+ version, you need to remove the MD5 hash in JDK_HOME/jre/lib/security/java.security to make it works:
jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
To
jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
This should be a temporary workaround
You don't have internet connection on Jenkins Machine.please configure Internet or installed plugin in offline mode.
Go to Jenkins -Plugin Manager-Upload Plugin
My Environment
Windows 7 Enterprise
Jenkins 2.89.2
Direct access to Internet
I tried most of the suggestions provided here but nothing worked until I tried following
First: I needed to run as 'Administrator'
Second: It was using default user home dir at C:\users\yourusername\.jenkins.
What Worked:
I changed default dir above to a different folder by defining JENKINS_HOME environment variable and I was able to get new plugins.
I faced the same issue with the latest Jenkins version, and all solutions didn't work with me so I followed the command line approach to install any plugin
sudo java -jar jenkins-cli.jar -s http://localhost:8080/ -auth USERNAME:PASSWORD -webSocket install-plugin PLUGIN_NAME
You can download the Jenkins-cli.jar from the installed Jenkins page http://localhost:8080/cli
You can search for the plugin name from the Jenkins site
https://plugins.jenkins.io/
If you have the Jenkins CLI installed uou can run this command
directly via terminal
jenkins-plugin-cli --plugins PLUGIN_NAME
I hope this solution helps if others didn't work with you.
I too tried all above,but this worked wonders
steps:
Go to https://plugins.jenkins.io (official page to get all jenkins plugins you are looking to install on jenkins)
Search "github" ( as we need github plugin to install)
You will see the github plugin,check the plugin id...it displays as id:github....so "github" is the exact plugin id
Download the jenkins-cli.jar from http://localhost:8080/cli and copy under /opt/jenkins-cli.jar in jenkins server
On jenkins server ,run the command to install github plugin
java -jar jenkins-cli.jar -s "http://localhost:8080" -auth jenkins-username:jenkins-password install-plugin github
Restart server
Now u will see the github plugin installed under installed section
For those who used Docker with MacOS. When you use Docker, there is no need to configure proxy settings for Jenkins inside Jenkins application, but you can and should do it already when running the container. For the context, I use MacOS and I was working within enterprise domain that had proxy configured.
SOLUTION
Configure proxy settings for Docker. You can do that if you open Preferences in Docker Desktop. The left menu, "Resources"->"Proxies". There you need to add correct proxy settings and then click "Apply & restart"
Add proxy settings to container when running it by giving and env variables HTTP_PROXY and HTTPS_PROXY. Add following flags with correct values to your command:-e HTTP_PROXY=<your_http_proxy:port> -e HTTPS_PROXY=<your_http_proxy:port>. An example with my own proxy configuration:
docker run \
-p 8080:8080 \
-p 50000:50000 \
-e HTTP_PROXY=http://10.65.100.13:8080 \
-e HTTPS_PROXY=http://10.65.100.13:8080 \
-v jenkins_home:/var/jenkins_home \
jenkins/jenkins:lts-jdk11
UNDERLYING ISSUE
The issue was SSL certificates. Jenkins, when downloading plugins, was unable to reach the CA certificates while working inside the container that was no configured to work using proxy. This caused the download to fail. Even if I configured Jenkins proxy settings as suggested in previous answers, it was no good, because the container itself failed to communicate over proxy.
Reading the Docker documentation, I found out that Docker should access CA certs itself from keychain, but it does not add proxy settings automatically to containers. Configuration to the container has to be added manually. Doing so configures the whole container properly in terms of proxy and container is able to reach for CA certs. Once the container works via proxy as expected, Jenkins does not need additional configuration itself.

How to start dart web app on server on default port

I just install dart on my server Ubuntu 12.04. I started on mydomain.com:8080/ and "hello word" displayed. But for real web app I need to run on address mydomain.com (without :8080). When I try to set port 80 on dart script it failed because apache already run on port 80. Here is my current dart script: https://www.dartlang.org/dart-by-example/#http-server So how can I do it?
If you want your Dart app to bind to port 80 you have to stop Apache or bind Apache to another port.
Another solution is to make Dart run by Apache http://news.dartlang.org/2012/05/run-dart-in-apache-web-server.html (didn't read or try myself)
You could use Apache as a proxy (via mod_proxy) to your Dart based webserver. It allows you to have both the power of Apache and Dart on the same device. I haven't used this approach in combination with Dart yet, but I use it with Java applications on Tomcat. Here is a simple Tomcat related example (scroll down to "Configure mod_proxy"). It should be easy to apply that to a Dart based server.
But that might not work with Websockets. The good thing about Websockets is that they aren't limited by the same origin policy, so you can run your Websocket applications on another port.

How to change port no of the jboss 4.2 server

I have to different eclipse ide and jboss server.I need to start both the server at a time but problem is what when I try to start the second server it gives error(port conflict as the first one is using it already).Please guide me to how to change the port no of jboss 4.2
You can change the port of JBoss 4 as detailed in "How to change port 8080 in JBoss?".
Goto the deploy folder of the server instance you use.
Goto the jbossweb-tomcat55.sar inside that deploy folder.
Find the file named server.xml inside that folder. (tomcat service file).
Then look at the Connector configuration in that file.

Unable to find plugins in list of available plugins in jenkins

I have installed Jenkins by deploying its WAR file to Tomcat. On typing
http://localhost:8080/jenkins
In browser, jenkins home page is opening which means jenkins is successfully installed. I configured system settings, gave jdk and maven path and save them. Then to install plugins, I clicked on Jenkins->Manage plugins and clicked on Available tab but could not find any plugins. I tried three solutions:
Configured proxy for Jenkins by going to Jenkins->Manage Plugins->Advanced(did not find plugins)
Restarted server, refreshed browser and went to Jenkins->Manage plugins->Available (still did not find any plugins). So, I read somewhere that we have update plugins forcefully if they are not updated automatically. So, went to Jenkins->Manage Plugins->Advanced and clicked the tab 'Check now' (Still did not find any plugins on clicking on Available tab).
Finally I read somewhere that if we add the pluginGroup 'org.jvnet.hudson.tools' to settings.xml file of maven, problem may be resolved. So, added the corresponding code to settings.xml:
Then I tried again but still could not find any plugins in
Jenkins->Manage plugins->Available
If any other solution is there which can resolve this problem please let me know.
Go to: Manage Jenkins → Manage Plugins → Advanced, then click Check now in the bottom right-hand corner. When you go back to Available tab all plugins should be listed.
At the plugins section of Jenkins open the "Advanced Settings" tab and paste the following URL into the Update Server URL field (at the bottom): https://updates.jenkins.io/update-center.json
For me the following worked:
Go to Manage Jenkins->Configure Global Security
Click the checkbox for "Use browser for metadata download"
I also have security disabled and prevent cross site forgery unchecked.
You can force update the plugin list by hand.
This worked for me:
wget -O default.js http://updates.jenkins-ci.org/update-center.json
sed '1d;$d' default.js > default.json
curl -X POST -H "Accept: application/json" -d #default.json http://localhost:8080/updateCenter/byId/default/postBack --verbose
(I created this in order to be able to deploy Jenkins and install plugins in batch)
The problem may be that your browser proxy settings are not configured properly.
Jenkins doesn't retrieve the plugin list directly from the update center, it tells your browser to retrieve it and post it back to Jenkins. So the HTTP proxy settings within Jenkins are ignored for this step.
So if you are using a browser that is configured to only work within your network, to connect to local servers such as a Jenkins instance, then you won't be able to update the plugin list.
(This just happened to me and took a frustrating hour to work out.)
This was so frustrating... Not because of difficulty but lack of clarity and good documentation, at least for the issues I encountered. I ended up having to set up the Manage Plugins -> Advanced -> HTTP Proxy Configuration in a very specific, picky way. If I didn't do exactly this, minus the last noted thing on the bottom, I could not get this working. Maybe it's my work's firewall, maybe it's jenkins, either way give this a shot if you haven't been able to successfully update your proxy settings. I used the Validate Proxy tool in the menu. I'll very briefly describe the infographic basics below
Don't add http:// or https:// to your Server field
Use your jenkins credentials for Username and Password, not your proxy credentials (if that's even applicable)
Add http:// to your Test URL if you're checking something like Google or Yahoo
Submit your changes
Then run check-now
(Optional?) Change Update site from HTTP to HTTPS
You should be able to now update your plugins fingers-crossed
Change the update site from
https://updates.jenkins.io/update-center.json
to
http://updates.jenkins-ci.org/update-center.json
I had this issue when using nginx as a secure reverse proxy. I needed to update the url from which to download the updates list, as suggested above, only with https to prevent mixed content errors in chrome.
The reason why I could not find a plugin that i searched for in Jenkins->Manage plugins->Available:
It had already been installed and it was in Jenkins->Manage plugins->Installed.
I came across this SO answer while I was experiencing the same issue. When I would click "Check Now" to force Jenkins to download the latest list, my browser would just hang. It wasn't until I tailed the Jenkins log that I found this here:
Mar 10, 2014 1:15:54 PM hudson.security.csrf.CrumbFilter doFilter
WARNING: No valid crumb was included in request for /administrativeMonitor/hudson.diagnosis.ReverseProxySetupMonitor/test. Returning 403.
Looks like the issue has to do with how I've put Jenkins behind a reverse proxy and enabled the option to prevent Cross Site Request Forgery. Once I disabled that, the "Check Now" completed within 30 seconds.
For me, the following works out. I experience this empty available list issue after a fresh install jenkins 1.638 on Ubuntu 1404 in virtual box. We're under an ISA proxy server.
Go to Jenkins->Manage Plugins->Advanced and setup the proxy as below:
Host: 192.168.x.x (your Proxy IP)
Port: 80 (Your proxy port)
Note that I find the format matters. I tried adding http:// it doesn't work. It has to be exactly like above.
Then hit the check now button in the bottom right as everyone else suggested. Then you get the list.
My solution is here
If you type in "http://updates.jenkins-ci.org/update-center.json" directory to brower's address bar, (in my case) it actually redirected to "http://ftp.tsukuba.wide.ad.jp/software/jenkins/updates/current/update-center.json."
It worked when I set "http://ftp.tsukuba.wide.ad.jp/software/jenkins/updates/current/update-center.json" to Jenkins' update site, and click "Save" & "Update."
Hope this helps.
Or your plugin can be already installed. Once it's installed it's not in the list of available plugins.
If you're using Chrome
Go to: Manage Jenkins → Manage Plugins → Advanced, then click Check now in the bottom right-hand corner. Then click a shield icon in the address bar, click Load anyway and Jenkins will start to update plugins. In Firefox this icon is situated on the left side of address bar, near back button.
You can install plugins manually, to this this, go to advanced tab in manage plugins, after downloading plugins you need, submit these
I had an issue with NginX proxy requests to Jenkins. I had error:
Nginx 413 Request Entity Too Large
I was able to fix that by adding
client_max_body_size 2M;
to the /etc/nginx/nginx.conf file. After that I went to Jenkins - Plugin Manager - Advanced tab and press Check Now button
I had the same issue and was able to resolve it by enabling the browser metadata download. Please follow the steps below the enable this configuration in Jenkins
Step 01: Select Manage Jenkins and click on Configure Global Security
Step 02: Under the Plugin Manager section tick the "Use browser for metadata download"
Step 03: View Available tab under the Plugin Manager section in Manage Jenkins
If its a fresh installation not behind proxy please follow instruction under available "Use the search field above to search for available plugins".
After trying many things (including all the solutions posted here) and hours of searching... I've ended up with the upgrade of jenkins to version 1.638.
This helps to solve the frustrated problem with empty available plugins in older version of jenkins!
This answer is specific to Windows 10. If you use the installer that Jenkins now comes bundled as, Jenkins will get installed as a service. By default, the service runs under the Local System account. You have to change it to run under the Network Service account in order for Jenkins to be able to connect with the plugin update service. If you have Administrator privileges on the system then these steps should help:
Open Command Prompt.
Type in Services.msc and hit enter.
The Services window should be open now.
Locate the Jenkins instance in the list.
Right click on it and click Properties.
Go to the Log On tab (should be the second one).
There should be 2 radio buttons.
Local System Account (selected)
This Account (unselected)
Select This Account.
Type in Network Service in the text box.
Provide your windows password.
Hit Apply and OK.
Restart the Jenkins service.
Reload Jenkins in browser.
For added measures, you could also add a rule in Windows Firewall (or any other Firewall that you may be using) to allow outbound requests from Jenkins. Point to the jenkins.exe application that should be located in the installation directory of Jenkins for this rule.
For those like me who use Jenkins with Docker with a JDK8u60+ version, you need to remove the MD5 hash in JDK_HOME/jre/lib/security/java.security to make it works:
jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
To
jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
This should be a temporary workaround
You don't have internet connection on Jenkins Machine.please configure Internet or installed plugin in offline mode.
Go to Jenkins -Plugin Manager-Upload Plugin
My Environment
Windows 7 Enterprise
Jenkins 2.89.2
Direct access to Internet
I tried most of the suggestions provided here but nothing worked until I tried following
First: I needed to run as 'Administrator'
Second: It was using default user home dir at C:\users\yourusername\.jenkins.
What Worked:
I changed default dir above to a different folder by defining JENKINS_HOME environment variable and I was able to get new plugins.
I faced the same issue with the latest Jenkins version, and all solutions didn't work with me so I followed the command line approach to install any plugin
sudo java -jar jenkins-cli.jar -s http://localhost:8080/ -auth USERNAME:PASSWORD -webSocket install-plugin PLUGIN_NAME
You can download the Jenkins-cli.jar from the installed Jenkins page http://localhost:8080/cli
You can search for the plugin name from the Jenkins site
https://plugins.jenkins.io/
If you have the Jenkins CLI installed uou can run this command
directly via terminal
jenkins-plugin-cli --plugins PLUGIN_NAME
I hope this solution helps if others didn't work with you.
I too tried all above,but this worked wonders
steps:
Go to https://plugins.jenkins.io (official page to get all jenkins plugins you are looking to install on jenkins)
Search "github" ( as we need github plugin to install)
You will see the github plugin,check the plugin id...it displays as id:github....so "github" is the exact plugin id
Download the jenkins-cli.jar from http://localhost:8080/cli and copy under /opt/jenkins-cli.jar in jenkins server
On jenkins server ,run the command to install github plugin
java -jar jenkins-cli.jar -s "http://localhost:8080" -auth jenkins-username:jenkins-password install-plugin github
Restart server
Now u will see the github plugin installed under installed section
For those who used Docker with MacOS. When you use Docker, there is no need to configure proxy settings for Jenkins inside Jenkins application, but you can and should do it already when running the container. For the context, I use MacOS and I was working within enterprise domain that had proxy configured.
SOLUTION
Configure proxy settings for Docker. You can do that if you open Preferences in Docker Desktop. The left menu, "Resources"->"Proxies". There you need to add correct proxy settings and then click "Apply & restart"
Add proxy settings to container when running it by giving and env variables HTTP_PROXY and HTTPS_PROXY. Add following flags with correct values to your command:-e HTTP_PROXY=<your_http_proxy:port> -e HTTPS_PROXY=<your_http_proxy:port>. An example with my own proxy configuration:
docker run \
-p 8080:8080 \
-p 50000:50000 \
-e HTTP_PROXY=http://10.65.100.13:8080 \
-e HTTPS_PROXY=http://10.65.100.13:8080 \
-v jenkins_home:/var/jenkins_home \
jenkins/jenkins:lts-jdk11
UNDERLYING ISSUE
The issue was SSL certificates. Jenkins, when downloading plugins, was unable to reach the CA certificates while working inside the container that was no configured to work using proxy. This caused the download to fail. Even if I configured Jenkins proxy settings as suggested in previous answers, it was no good, because the container itself failed to communicate over proxy.
Reading the Docker documentation, I found out that Docker should access CA certs itself from keychain, but it does not add proxy settings automatically to containers. Configuration to the container has to be added manually. Doing so configures the whole container properly in terms of proxy and container is able to reach for CA certs. Once the container works via proxy as expected, Jenkins does not need additional configuration itself.

pylons on production server fedora 8

I'm interested in learning some python, and thought Pylons would be a good starting point (after spending 2 days trying to get django working -- to no avail).
I have an Amazon EC2 instance with Fedora 8 on it. It is a bare-bones install. I am halfway through my second day of trying to get it to work. I have mod_wsgi installed. I have Apache (though that's a later task to tackle). I have easy_install, paster is working fine; basically all of the pre-requisites mentioned throughout the Pylons docs.
I can't for the life of me get the thing to work. And I can't seem to find a coherent walkthough anywhere that lists all the steps necessary. There is tons of info out there, but it is all scattered. Wsgi this, python that. Google, google, google... "47 million results found for 'socket.error:(lol, 'Yous a goofs')".
So, this is my latest attempt:
apachectl -k stop
cd /home/
paster create -t pylons test
[blah blah.. ok]
cd test
nano development.ini
[hmm, last time I changed the host from 127.0.0.1 to my domain name or url, it threw an error like socket.error: (99, 'Cannot assign requested address')... I'll just leave it]
[open port 5000 on firewall]
paster serve development.ini
[firefox->url:5000]
Firefox can't establish a connection to the server
Doing these steps locally works as expected.
This is just a test to see if I can get it to work at all, which I can't. If I get it to work, then is the task of getting it to work with apache.
My madness is that I'd like to play around a little developing and deploying before diving into a full-fledged project. So far: self, I am dissapoint.
[server:main]
use = egg:Paste#http
host = 0.0.0.0
port = 5000
If you leave it as 127.0.0.1, you'll only be able to surf the site from the ECS instance. By putting in the IP of your ECS instance, or 0.0.0.0 which will listen to all available IPs, it should work.
Unless you have something else listening on port 5000, it should work.
If you are using the hostname, and the hostname resolves to an IP address on your machine it should work. If you use a URL, paster won't be able to resolve the domain name properly. I'm guessing that when you used the domain name, it didn't properly resolve it which generated the error you received. 0.0.0.0 or the IP address in that case should fix it.
I'm not 100% sure whether you used a virtualenv for your pylons installation, but, it is generally a good idea since you don't need to alter the server's environment to install new libraries.
http://pylonshq.com/docs/en/1.0/gettingstarted/#installing

Resources