Python is a dynamically and strongly typed programming language that encourages readability.

learn more… | top users | synonyms

1
vote
2answers
60 views

Running a Python script which saves files to server with cgi and apache2 version 2.4

I have a python script (python.py) located in the /var/www/html/Python folder. The script saves some images to another directory (/var/www/html/Data) I have the -x file permission on the python.py ...
2
votes
3answers
94 views

Nginx: 502 Bad Gateway error with (111: Connection refused) to uWSGI socket while running django

I am building an app using an Nginx, uWSGI, Django and Postgresql stack. The app uses a Unix socket between Nginx and uWSGI. The file permissions on the socket is 775. But I still get this permission ...
-1
votes
1answer
44 views

Which Nginx log file is for fail2ban?

I have files in /var/log/nginx/ the log file /var/log/nginx/access.log is empty. But the /var/log/nginx/access.log.1 is being appended as always. In file /etc/fail2ban/fail2ban.conf, logtarget = /...
-1
votes
2answers
54 views

Running python script on anisble

I have an ansible server that I find works fine, but when I try to run a python script on the deployed servers I get no such file or directory, even though I visually confirm they are there. Here's ...
1
vote
1answer
102 views

Trying to install CloudWatch Agent on Ubuntu 14.04: “Failed to create virtualenv”

I am trying to install AWS CloudWatch Log Agent on Ubuntu 14.04 following this guide: http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/QuickStartEC2Instance.html When I type in ...
0
votes
0answers
18 views

uWSGI process switching to root user after starting?

I got a vanilla flask/uwsgi/nginx setup on ubuntu 14.04, with the wsgi app started with an Upstart script with uid:guid set to www-data, and no virtual env The uwsgi init file: [uwsgi] base = /home/...
-2
votes
1answer
33 views

Python and java static IP [closed]

I have a Python server. Each time I change the network the IP changes. I want it to have a static IP over all networks so it can receive data without customizing the code every time. I want to do the ...
0
votes
0answers
25 views

How can I run websocket server on Virtual Private Server that use apache?

I am trying to implement a websocket server on a virtual private server that uses apache. This websocket socket server is tornado which is written in python Testing websocket on my local machine I ...
1
vote
0answers
63 views

Nginx serve static files for flask app 404

I've tried numerous solutions of other posts, but nothing seems to work for me, I always get a 404 error, when trying to let nginx serve static files of my flask application. Somewhere in between all ...
2
votes
0answers
36 views

Cannot install from ansible-galaxy on an FC22 machine

Ansible is installed from github, as per ansible site's instructions, and appears to work OK. But galaxy fails thusly: # ansible-galaxy -vvv install goozbach.epel Using /etc/ansible/ansible.cfg as ...
0
votes
1answer
84 views

Windows Server 2012 R2 not printing from Task Scheduler

I have a script, written in Python, that generates a PDF document and prints it to network printer. When I execute that script through the cmd line or launch executable .cmd or .bat file, it works ...
1
vote
0answers
44 views

Django Invalid HTTP_HOST header: '\x80\xc7\xda\x9e'

I am getting errors from Django 1.7 application hosted in Digital ocean. Invalid HTTP_HOST header: '\x80\xc7\xda\x9e'. The domain name provided is not valid according to RFC 1034/1035. Request repr()...
0
votes
0answers
40 views

CentOS 6.4 YUM Python error

I'm getting an odd YUM error using the shell which I can't find any answers to elsewhere. What's weirder is that this worked fine on a very similar machine. It's a CentOS 6.4 machine and both YUM ...
0
votes
2answers
200 views

Unable to run a python3 script in CentOs7 [with python2.7] via cronjob

I have been trying to deal with this strage problem all morning. I have a simple crawler.py file, which contans a code that can only run under python3 to be exact under python3.3 evenrionment Now, ...
0
votes
1answer
87 views

Unable to install Rtree 0.8.2 package on RHEL6 64-bit

UPDATE: If it also helps. I have root access. Seems like I am not the only with the problem, but a couple had this problems https://github.com/ioos/conda-recipes/pull/198 I had updated my core.py ...
0
votes
1answer
136 views

Jupyter notebook SSL: WRONG_VERSION_NUMBER error only through Apache

I'm trying to set up a secured Jupyter notebook on my Apache 2.4.7 server. If there's a better, easier, or more secure way to do it, that'd be great. I know AuthType Basic doesn't really add much, I ...
0
votes
0answers
19 views

Python changes to user profile data

Forgive me if my terminology if a bit off, I have little expertise in networking and domains. To the point: After calling python "example.py" in a batch file, the script executed perfectly. However, ...
0
votes
0answers
6 views

No connection could be made because the target machine actively refused it error: [Errno 10061] [duplicate]

I start a server on socket using self.sock.bind(('0.0.0.0',0)). How can I make other machines connect to that port? I connect to public IP address and that port, I get : error: [Errno 10061] No ...
0
votes
0answers
40 views

trying certificate authentication with python3 - ftplib got an unexpected keyword argument 'context'

I got this error while trying to use ftplib.FTP_TLS function as described in documentation here. Here is my MWE : (I run it with python3 on debian) import sys,ssl from ftplib import FTP_TLS # only ...
0
votes
0answers
62 views

web2py running mod_wsgi on Apache - “ImportError: No module named site”

Im having problem to run web2py on apache. OS is CentOS Apache 2.4 Python is installed in /usr/lib/python2.7/ defualt.conf looks like: NameVirtualHost *:80 NameVirtualHost *:443 <VirtualHost ...
-1
votes
1answer
154 views

How to install python module(s) via pip using salt?

I need to install the paramiko module of python on multiple machines using the salt stack. I looked at the documentation about how to do this, but was not able to understand the syntax. Can someone ...
0
votes
0answers
21 views

Does Microsoft SQL Server have something similar to 'sqlite:///:memory:'?

Python 2.7 SQLAlchemy Microsoft SQL Server Management Studio 10.50.2500.0 Microsoft Analysis Services Client Tools 10.50.2500.0 Microsoft Data Access Components ...
0
votes
1answer
56 views

Programmatically Check AWS EC2 CPU and Memory usage

Does boto3 make it possible to access EC2 CPU and Memory usage? I looked here, but couldn't find anything in the docs. How do I programmatically check memory and CPU usage on an EC2 server running ...
0
votes
0answers
25 views

Ping request timed out when basehttpserver is loading website

I am running a website using basehttpserver. 10.0.xx.xx is the ip to access the site. There is a 'controller' with a cellular modem on it, which hosts the website and runs the basehttpserver. When ...
-1
votes
1answer
43 views

Apache Error (AH01276), Cannot serve directory /var/www/project/:

I am trying to deploy a Django web app on a newly installed centos7 server. for this i am using apache2.4 with mod_wsgi. i am stuck at serving the static files and because i am new to this, this is ...
0
votes
1answer
64 views

Can Nagios NRPE call a Python script on a Windows host, which requires a UNC network share connection?

I have a Nagios host which is monitoring Windows servers using NRPE. One of the tasks is to remotely connect to a Windows Server, using NRPE, and run a Python script. The python script simply checks ...
1
vote
2answers
256 views

Jenkins : Python script with arguments

Note: Never used jenkins before I have a python script that takes in 3 arguments to run. Via a terminal you would use it like this: python script.py arg1 arg2 arg3 I want to create a new jenkins ...
0
votes
0answers
63 views

Python script to delete HPSA RHEL software policy items(rpms)

I'm looking to script the deletion of HPSA software policy items (RHEL RPMs) from HP Server Automation server. In our environment we have "HP Server Automation 10.22", using rhn_import command we ...
0
votes
0answers
61 views

Python/Django/WSGI/Apache webserver gateway timeout with outgoing SSL connections with urllib2/urllib3/requests

I have a webserver serving Django through Apache 2.4 with mod_wsgi and Python 2.7 on Ubuntu 14.04. Outgoing connections with any of urllib2, urllib3, or requests, connections to non-SSL (on port 80) ...
0
votes
0answers
10 views

Creating images and use ionice to prevent the script from using too many I/O resources

I have a python script that generates images for me and updates a database. I need to create almost ~200k images and for every image it does an insert to the database. I have a VPS with 100GB SSD-...
1
vote
0answers
19 views

urllib3 failure through Apache/WSGI; successful from python commandline

I have a webserver serving Django through Apache 2.4 with mod_wsgi and Python 2.7 on Ubuntu 14.04. When first setup, outgoing connections from this webserver using the Python library urllib3 were ...
1
vote
1answer
71 views

Nginx and Gunicorn 'err_conn_refused', but nginx not logging error

I've been playing around with Django Cookie Cutter for local projects, and wanted to put it on my DO Droplet as a semi-production staging environment. The server is set up with Nginx reverse ...
0
votes
0answers
87 views

sh: x-terminal-emulator: command not found

I got this message during apt-get upgrade in my Ubuntu server 14.04, and I have no idea what is it. E: changelog for this version is not (yet) available; try https://launchpad.net/ubuntu/+source/...
1
vote
0answers
36 views

How to get the output of the python script executed in aws instance

I am trying to automate the aws instance setup using boto. I have a python script in which I will do the ssh to the instance. After ssh,I am executing a python function which is in remote python file ...
0
votes
1answer
53 views

How to Use Puppet python module in manifest file

I am writing a puppet manifest file to install python and pymongo. This python module is installed on the server, link shown below https://forge.puppetlabs.com/stankevich/python Here is the ...
1
vote
0answers
41 views

mpiexec won't run mpi4py script when two hosts are utilized in an MPI cluster established through LAN

So I have this other desktop PC, that serves as my server, primesystem and a laptop as my client, zerosystem that is connected to it. They both serve as my ssh-server and ssh-client respectively, and ...
4
votes
2answers
36 views

How to tell whether a serial connection is “established”?

We have a Debian-based embedded device. It runs an application that communicates with other embedded equipment via serial (RS-232, /dev/ttyS*). Usually, this works just fine. But of course, sometimes ...
0
votes
1answer
37 views

Ansible error with_together and user management

Having some annoying issue that I just cannot figure out. Here is my code. If I completely comment out the group and groups variables everything works fine. But this as is spits out the errors below....
0
votes
4answers
96 views

Script started with nohup get killed when leave terminal

I need to run some python scripts with infinite loop on ubuntu server (Amazon EC2). And I really like the idea to use nohup as it is simple and I can have output.out log file. I start script like ...
1
vote
0answers
25 views

Issues with URL length in Apache/mod_wsgi

I have a python wsgi API in which I process incoming URL payloads of varied length. I believe, but am not absolutely sure, that I may have run into a limitation of URL size. For a particular payload (...
1
vote
2answers
89 views

Docker compose and ngnix load balancer

Currently I have 2 Docker containers: Application (python flask) Load Balancer (ngnix) I'm starting both containers separately with docker-composer up Ngnix is listening in port 8080 and should ...
0
votes
0answers
37 views

python server running but nothing in web browser

I have python server running in terminal but I don't get anything in my web browser, beside it, below is written django 1.8.3 but I made upgrade to django 1.9.2: (env)root@mx:/srv/mercury# python3 ./...
-2
votes
1answer
141 views

Serving a Python Page with Windows / Apache / Mod_WSGI?

I'm trying to setup python / apache / WSGI on windows. I have the following installed, all 32-bit and vc9: Apache 2.4 Python 2.7.9 Mod_WSGI.so in the modules folder. http://localhost/ Displays ...
1
vote
1answer
34 views

Should I choose language node or python to automate AWS? [closed]

I have been exploring on automating AWS services and which language is preferable to start with? Nodejs or python?. My question: Is it better to start with node or python?
0
votes
2answers
446 views

openldap TLS error -8179:Peer's Certificate issuer is not recognized

tl;dr Does this error mean that I need to find my company's ldap server's public certificate and install it, or that my company's ldap server needs to install my public cert? If the former, how can I ...
0
votes
1answer
55 views

Why is method that uses gevent in a mod_wsgi deployed Flask api raising error about switching threads?

I am trying to deploy a Flask api via Apache/mod_wsgi. The api uses Gevent to provide concurrency for a recursive method. However, it is throwing the following error [Mon Feb 08 12:05:37 2016] [error]...
0
votes
0answers
33 views

building a cluster using dispy on aws

I'm trying to use dispy to distribute work to ec2 instances. I've followed: http://stackoverflow.com/questions/33557194/using-dispy-with-port-forwarding-via-ssh-tunnel http://dispy.sourceforge.net/...
1
vote
1answer
23 views

Switching library paths in python virtualenv dynamically

There are two versions of Python that can be installed on RHEL 6.7, as many obviously know. Yum needs 2.6, and other programs for example Graphite need 2.7 After digging into it, I see that even when ...
0
votes
0answers
26 views

puppet Error 400 could not find class

I am new to puppet but keep getting an error I cannot get passed. Any help would be much appreciated!! Puppet version: 3.8.1 Redhat version: 6.6 I want to install Python version 3.3 (default ...
1
vote
1answer
180 views

Mysql listens to wrong port on restart

I'm working on a 'local' PHP project. It's a PHP app running in a Debian VM intended for use on the user's own PC. I have a couple of python scripts running as root services from /etc/init.d which ...