Search Results

Search found 555 results on 23 pages for 'errno'.

Page 1/23 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • MySQL "ERROR 1005 (HY000): Can't create table 'foo.#sql-12c_4' (errno: 150)"

    - by Ankur Banerjee
    Hi, I was working on creating some tables in database foo, but every time I end up with errno 150 regarding the foreign key. Firstly, here's my code for creating tables: CREATE TABLE Clients ( client_id CHAR(10) NOT NULL , client_name CHAR(50) NOT NULL , provisional_license_num CHAR(50) NOT NULL , client_address CHAR(50) NULL , client_city CHAR(50) NULL , client_county CHAR(50) NULL , client_zip CHAR(10) NULL , client_phone INT NULL , client_email CHAR(255) NULL , client_dob DATETIME NULL , test_attempts INT NULL ); CREATE TABLE Applications ( application_id CHAR(10) NOT NULL , office_id INT NOT NULL , client_id CHAR(10) NOT NULL , instructor_id CHAR(10) NOT NULL , car_id CHAR(10) NOT NULL , application_date DATETIME NULL ); CREATE TABLE Instructors ( instructor_id CHAR(10) NOT NULL , office_id INT NOT NULL , instructor_name CHAR(50) NOT NULL , instructor_address CHAR(50) NULL , instructor_city CHAR(50) NULL , instructor_county CHAR(50) NULL , instructor_zip CHAR(10) NULL , instructor_phone INT NULL , instructor_email CHAR(255) NULL , instructor_dob DATETIME NULL , lessons_given INT NULL ); CREATE TABLE Cars ( car_id CHAR(10) NOT NULL , office_id INT NOT NULL , engine_serial_num CHAR(10) NULL , registration_num CHAR(10) NULL , car_make CHAR(50) NULL , car_model CHAR(50) NULL ); CREATE TABLE Offices ( office_id INT NOT NULL , office_address CHAR(50) NULL , office_city CHAR(50) NULL , office_County CHAR(50) NULL , office_zip CHAR(10) NULL , office_phone INT NULL , office_email CHAR(255) NULL ); CREATE TABLE Lessons ( lesson_num INT NOT NULL , client_id CHAR(10) NOT NULL , date DATETIME NOT NULL , time DATETIME NOT NULL , milegage_used DECIMAL(5, 2) NULL , progress CHAR(50) NULL ); CREATE TABLE DrivingTests ( test_num INT NOT NULL , client_id CHAR(10) NOT NULL , test_date DATETIME NOT NULL , seat_num INT NOT NULL , score INT NULL , test_notes CHAR(255) NULL ); ALTER TABLE Clients ADD PRIMARY KEY (client_id); ALTER TABLE Applications ADD PRIMARY KEY (application_id); ALTER TABLE Instructors ADD PRIMARY KEY (instructor_id); ALTER TABLE Offices ADD PRIMARY KEY (office_id); ALTER TABLE Lessons ADD PRIMARY KEY (lesson_num); ALTER TABLE DrivingTests ADD PRIMARY KEY (test_num); ALTER TABLE Applications ADD CONSTRAINT FK_Applications_Offices FOREIGN KEY (office_id) REFERENCES Offices (office_id); ALTER TABLE Applications ADD CONSTRAINT FK_Applications_Clients FOREIGN KEY (client_id) REFERENCES Clients (client_id); ALTER TABLE Applications ADD CONSTRAINT FK_Applications_Instructors FOREIGN KEY (instructor_id) REFERENCES Instructors (instructor_id); ALTER TABLE Applications ADD CONSTRAINT FK_Applications_Cars FOREIGN KEY (car_id) REFERENCES Cars (car_id); ALTER TABLE Lessons ADD CONSTRAINT FK_Lessons_Clients FOREIGN KEY (client_id) REFERENCES Clients (client_id); ALTER TABLE Cars ADD CONSTRAINT FK_Cars_Offices FOREIGN KEY (office_id) REFERENCES Offices (office_id); ALTER TABLE Clients ADD CONSTRAINT FK_DrivingTests_Clients FOREIGN KEY (client_id) REFERENCES Clients (client_id); These are the errors that I get: mysql> ALTER TABLE Applications ADD CONSTRAINT FK_Applications_Cars FOREIGN KEY (car_id) REFERENCES Cars (car_id); ERROR 1005 (HY000): Can't create table 'foo.#sql-12c_4' (errno: 150) I ran SHOW ENGINE INNODB STATUS which gives a more detailed error description: ------------------------ LATEST FOREIGN KEY ERROR ------------------------ 100509 20:59:49 Error in foreign key constraint of table practice9/#sql-12c_4: FOREIGN KEY (car_id) REFERENCES Cars (car_id): Cannot find an index in the referenced table where the referenced columns appear as the first columns, or column types in the table and the referenced table do not match for constraint. Note that the internal storage type of ENUM and SET changed in tables created with >= InnoDB-4.1.12, and such columns in old tables cannot be referenced by such columns in new tables. See http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html for correct foreign key definition. ------------ I searched around on StackOverflow and elsewhere online - came across a helpful blog post here with pointers on how to resolve this error - but I can't figure out what's going wrong. Any help would be appreciated!

    Read the article

  • Cannot open TUN/TAP dev /dev/as0t0: No such file or directory (errno=2)

    - by Mark
    I just attempted to install OpenVPN Access Server on my Debian VPS that uses OpenVZ. It installed fine, however when I try to start it from the administration panel, I get these errors: process started and then immediately exited: ['Sat Sep 22 19:14:33 2012 Cannot open TUN/TAP dev /dev/as0t0: No such file or directory (errno=2)'] service failed to start or returned error status process started and then immediately exited: ['Sat Sep 22 19:14:33 2012 Cannot open TUN/TAP dev /dev/as0t1: No such file or directory (errno=2)'] service failed to start or returned error status process started and then immediately exited: ['Sat Sep 22 19:14:33 2012 Cannot open TUN/TAP dev /dev/as0t2: No such file or directory (errno=2)'] service failed to start or returned error status process started and then immediately exited: ['Sat Sep 22 19:14:33 2012 Cannot open TUN/TAP dev /dev/as0t3: No such file or directory (errno=2)'] service failed to start or returned error status process started and then immediately exited: ['Sat Sep 22 19:14:33 2012 Cannot open TUN/TAP dev /dev/as0t4: No such file or directory (errno=2)'] service failed to start or returned error status process started and then immediately exited: ['Sat Sep 22 19:14:33 2012 Cannot open TUN/TAP dev /dev/as0t5: No such file or directory (errno=2)'] service failed to start or returned error status process started and then immediately exited: ['Sat Sep 22 19:14:33 2012 Cannot open TUN/TAP dev /dev/as0t6: No such file or directory (errno=2)'] service failed to start or returned error status process started and then immediately exited: ['Sat Sep 22 19:14:33 2012 Cannot open TUN/TAP dev /dev/as0t7: No such file or directory (errno=2)'] service failed to start or returned error status Is there a solution for this?

    Read the article

  • After juju deploy : [Errno 2] No such file or directory

    - by user84471
    I get this after juju deploy. hsf@ubuntuserver:~$ juju deploy wordpress 2012-10-23 13:12:15,663 INFO Searching for charm cs:precise/wordpress in charm store [Errno 2] No such file or directory: '/home/hsf/.juju/cache/downloads/cs_3a_precise_2f_wordpress-9.charmGLg7sI.part' 2012-10-23 13:12:16,075 ERROR [Errno 2] No such file or directory: '/home/hsf/.juju/cache/downloads/cs_3a_precise_2f_wordpress-9.charmGLg7sI.part' I am using Ubuntu 12.04 server.

    Read the article

  • Howto fix "[Errno 13] Permission denied" in mailman mailing lists

    - by Michael
    After migrating domains from one plesk server onto another, I got several of those mails every day: (the target mailbox does not exist, so I get those as undeliverable mail bounces) Return-Path: <[email protected]> Received: (qmail 26460 invoked by uid 38); 26 May 2012 12:00:02 +0200 Date: 26 May 2012 12:00:02 +0200 Message-ID: <20120526100002.xyzxx.qmail@lvpsxxx-xx-xx-xx.dedicated.hosteurope.de> From: [email protected] (Cron Daemon) To: [email protected] Subject: Cron <list@lvpsxxx-xx-xx-xx> [ -x /usr/lib/mailman/cron/senddigests ] && /usr/lib/mailman/cron/senddigests Content-Type: text/plain; charset=ANSI_X3.4-1968 X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <HOME=/var/list> X-Cron-Env: <PATH=/usr/bin:/bin> X-Cron-Env: <LOGNAME=list> List: xyzxyz: problem processing /var/lib/mailman/lists/xyzxyz/digest.mbox: [Errno 13] Permission denied: '/var/lib/mailman/archives/private/xyzxyz' I tried to fix the permissions myself, but the problem still exists.

    Read the article

  • Problem Installing Ubuntu 12.04 - [Errno 5]

    - by Rob Barker
    I'm trying to intall Ubuntu 12.04 to my brand new eBay purchased hard drive. Only got the drive today and already it's causing me problems. The seller is a proper proffesional company with 99.9% positive feedback, so it seems unlikely they would have sold me something rubbish. My old hard drive packed up last Tuesday and so i bought a new one to replace it. Because this was an entirely new drive i decided to install Ubuntu as there was no current operating system. My computer is an eMachines EM250 netbook. There's no disc drive so i am installing from a USB stick. The new operating system loads beautifully, and the desktop appears just as it should. When i click install i am taken to the installer which copies the files to about 35% and then displays this: [Errno 5] Input/output error This is often due to a faulty CD/DVD disk or drive, or a faulty hard disk. It may help to clean the CD/DVD, to burn the CD/DVD at a lower speed, to clean the CD/DVD drive lens (cleaning kits are often available from electronics suppliers), to check whether the hard disk is old and in need of replacement, or to move the system to a cooler environment. The hard drive can be heard constantly crackling. When i booted Ubuntu 12.04 from my old faulty hard drive as a test, i didn't even make it past the purple Ubuntu screen, so it can't be that bad. Any ideas? Message to the moderators. Please do not close this thread. I'm well aware there may be other threads on this, but i don't want it closing as the others do not provide the answer i am looking for. Thank you.

    Read the article

  • IOError: [Errno 32] Broken pipe

    - by khati
    I got "IOError: [Errno 32] Broken pipe" while writing files in linux. I am using python to read each line a of csv file and then write into a database table. My code is f = open(path,'r') command = command to connect to database p = Popen(command, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, env=env) query = " COPY myTable( id, name, address) FROM STDIN WITH DELIMITER ';' CSV QUOTE '"'; " p.stdin.write(query.encode('ascii')) *-->(Here exactly I got the error, p.stdin.write(query.encode('ascii')) IOError: [Errno 32] Broken pipe )* So when I run this program in linux, I got error "IOError: [Errno 32] Broken pipe" . However this works fine when I run in windows7. Do I need to do some configuration in Linux sever? Any suggestions will be appreciated. Thank you.

    Read the article

  • ERRNO 5 Input/Output Error

    - by CCarey
    Going up for my first ubuntu installation and encountered a critical error. Mind that I am installing on my Macbook Pro, and have already removed all other partitions. (I'm installing with a CD) My Ubuntu version is: "ubuntu-12.10-desktop-i386" So once the installation gets to something around "Finishing copying files", a great big "[ERRNO5] Input/Output Error" pops up on the screen. Obviously this halts and crashes the whole installation. Now, I've already run a disk check, memtest, and cpu load test, and all came up green. I have also redownloaded ubuntu twice, md5 match both times, and burnt four disks. None got past this error. If anyone could help me out, that would be greatly appreciated! Cheers!

    Read the article

  • easy_install ReviewBoard [Errno 104] Connection reset by peer

    - by blastthisinferno
    I have a Kubuntu 10.04 VM image and am trying to install ReviewBoard by following The Linux Installation Wiki. When I get to the step to easy_install ReviewBoard, I encounter a problem I cannot find a solution to. Below is the console output: sudo easy_install ReviewBoard Searching for ReviewBoard Best match: ReviewBoard 1.0.8 Processing ReviewBoard-1.0.8-py2.6.egg ReviewBoard 1.0.8 is already the active version in easy-install.pth Installing rb-site script to /usr/local/bin Using /usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.8-py2.6.egg Processing dependencies for ReviewBoard Searching for pytz Reading http://downloads.reviewboard.org/mirror/ Download error: [Errno 104] Connection reset by peer -- Some packages may not be found! Reading http://downloads.reviewboard.org/releases/ReviewBoard/1.0/ Download error: [Errno 104] Connection reset by peer -- Some packages may not be found! Reading http://pypi.python.org/simple/pytz/ Download error: [Errno 104] Connection reset by peer -- Some packages may not be found! Reading http://pypi.python.org/simple/pytz/ Download error: [Errno 104] Connection reset by peer -- Some packages may not be found! Couldn't find index page for 'pytz' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading http://pypi.python.org/simple/ Download error: [Errno 104] Connection reset by peer -- Some packages may not be found! No local packages or download links found for pytz error: Could not find suitable distribution for Requirement.parse('pytz') I am new to python, but it seems like easy_install cannot decide on a version of pytz. I have read http://stackoverflow.com/questions/383738/104-connection-reset-by-peer-socket-error-or-when-does-closing-a-socket-resul http://homepage.mac.com/s_lott/iblog/architecture/C551260341/E20081031204203/index.html and it seems like the problem described in those articles has more to do with development than my problem, but I could be wrong. Has anyone encountered a problem like this? If there is any missing information that would help troubleshoot this, please let me know.

    Read the article

  • pkgadd solaris 10 on VMWare - process datastream failed for SUNWi1cs errno=2

    - by Mike-M
    I am trying to install packadges SUNWi1cs and SUNWi15cs for Oracle 11g on Solaris 10 (VMWare Player). NO cdrom (I dont know how to mount it the iso file is on USB device), I transferd the ISO and unzip the ISO in a directory I run: "pkgadd -d /export/michel/SOLARIS_10/PRODUCT SUNi1cs" == process datastream failed ... errno=2. I've check the web without success, many answers but none that fit my prob. Thank you

    Read the article

  • Error including errno.h

    - by TechWiz
    Every time I try to compile a project that includes errno.h in linux, I get issues using the error codes. GCC spits out errors saying the error codes aren't declared and I get the same issue with 3rd party projects that are, of course, known to compile. I have the Linux headers for my kernel installed. Any suggestions as to what else it could be? edit: Snippet at error code: if ((res != 0) && (errno == EEXIST)) Snippet of includes: ... #include <dirent.h> #include <errno.h> #include <stdarg.h> ... as is with no ifdef edit: Well I'm convinced my system's Linux headers are hosed somehow... that, or I'm missing some environment vars.

    Read the article

  • Duplicity Errno 2 - no such file or directory

    - by Luma
    Hello, I am trying to setup a script for backing up a linux box to a CIFS share. I manually mounted the CIFS share and created a few test folders - OK I then ran duplicity manually with a rather simple command to begin with to make sure things work and well Not OK on this one :) duplicity /root file:///cifsmountfolder/existingfolder/ results: No signatures found, switching to full backup. Traceback (most recent call last): File "/usr/bin/duplicity", line 463, in <module> with_tempdir(main) File "/usr/bin/duplicity", line 458, in with_tempdir fn() File "/usr/bin/duplicity", line 449, in main full_backup(col_stats) File "/usr/bin/duplicity", line 155, in full_backup bytes_written = write_multivol("full", tarblock_iter, globals.backend) File "/usr/bin/duplicity", line 99, in write_multivol backend.put(tdp, dest_filename) File "/usr/lib/python2.5/site-packages/duplicity/backends.py", line 279, in put target_path.writefileobj(source_path.open("rb")) File "/usr/lib/python2.5/site-packages/duplicity/path.py", line 500, in writefileobj fout = self.open("wb") File "/usr/lib/python2.5/site-packages/duplicity/path.py", line 448, in open else: result = open(self.name, mode) IOError: [Errno 2] No such file or directory: '/cifsmountfolder/existingfolder/duplicity-full.2010-09-18T18:41:43-07:00.vol1.difftar.gpg' any ideas? Thank you. Luc

    Read the article

  • SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

    - by Vikash
    I am using Authlogic-Connect for third party logins. After running appropriate migrations, Twitter/Google/yahoo logins seem to work fine but the facebook login throws exception: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed The dev log shows OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed): app/controllers/users_controller.rb:37:in `update' Please suggest..

    Read the article

  • yum install php-tidy - no more mirrors

    - by Lylo
    Hi im trying to get the tidy extensions installed on centos running php 5.3 Thanks Downloading Packages: http://repo.webtatic.com/yum/centos/5/x86_64/php-tidy-5.3.5-1.w5.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found Trying other mirror. http://repo.webtatic.com/yum/centos/5/x86_64/php-pdo-5.3.5-1.w5.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found Trying other mirror. http://repo.webtatic.com/yum/centos/5/x86_64/php-mysql-5.3.5-1.w5.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found Trying other mirror. http://repo.webtatic.com/yum/centos/5/x86_64/php-gd-5.3.5-1.w5.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found Trying other mirror. http://repo.webtatic.com/yum/centos/5/x86_64/php-xml-5.3.5-1.w5.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found Trying other mirror. http://repo.webtatic.com/yum/centos/5/x86_64/php-common-5.3.5-1.w5.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found Trying other mirror. http://repo.webtatic.com/yum/centos/5/x86_64/php-devel-5.3.5-1.w5.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found Trying other mirror. http://repo.webtatic.com/yum/centos/5/x86_64/php-5.3.5-1.w5.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found Trying other mirror. http://repo.webtatic.com/yum/centos/5/x86_64/php-cli-5.3.5-1.w5.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found Trying other mirror. Error Downloading Packages: php-tidy-5.3.5-1.w5.x86_64: failure: php-tidy-5.3.5-1.w5.x86_64.rpm from webtatic: [Errno 256] No more mirrors to try. php-cli-5.3.5-1.w5.x86_64: failure: php-cli-5.3.5-1.w5.x86_64.rpm from webtatic: [Errno 256] No more mirrors to try. php-5.3.5-1.w5.x86_64: failure: php-5.3.5-1.w5.x86_64.rpm from webtatic: [Errno 256] No more mirrors to try. php-pdo-5.3.5-1.w5.x86_64: failure: php-pdo-5.3.5-1.w5.x86_64.rpm from webtatic: [Errno 256] No more mirrors to try. php-devel-5.3.5-1.w5.x86_64: failure: php-devel-5.3.5-1.w5.x86_64.rpm from webtatic: [Errno 256] No more mirrors to try. php-mysql-5.3.5-1.w5.x86_64: failure: php-mysql-5.3.5-1.w5.x86_64.rpm from webtatic: [Errno 256] No more mirrors to try. php-common-5.3.5-1.w5.x86_64: failure: php-common-5.3.5-1.w5.x86_64.rpm from webtatic: [Errno 256] No more mirrors to try. php-xml-5.3.5-1.w5.x86_64: failure: php-xml-5.3.5-1.w5.x86_64.rpm from webtatic: [Errno 256] No more mirrors to try. php-gd-5.3.5-1.w5.x86_64: failure: php-gd-5.3.5-1.w5.x86_64.rpm from webtatic: [Errno 256] No more mirrors to try.

    Read the article

  • Error code 1005 (errno: 121) upon create table while restoring MySQL database from a dump

    - by Jonathan
    I have a linux prod machine and a Win7 64bit dev machine. My workflow includes dumping the production MySQL database on the linux machine and restoring it in my local MySQL database on the windows machine (using SQLyog). This worked fine for a long time. Following some trouble, I formatted and reinstalled my windows dev machine. Since then I'm unable to restore the db on it. I keep receiving the following error: Query: CREATE TABLE `auth_group` ( `id` int(11) NOT NULL auto_increment, `name` varchar(80) collate utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci Error occured at:2010-06-26 17:16:14 Line no.:30 Error Code: 1005 - Can't create table 'ap_site.auth_group' (errno: 121) Notice that this is the first create table statement in the sql dump file. This error occurs both on MySQL Community Server 5.1.41 and 5.1.48 and with SQLyog Community 8.0.4 and 8.5.1. I really don't know what's different in my configuration from before the reinstall and now and why does it have this effect. Restoring from sql dump is something I need to keep on doing, so I need a permanent fix and not a tailored workaround.

    Read the article

  • Error code 1005 (errno: 121) upon create table while restoring MySQL database from a dump

    - by Jonathan
    I have a linux prod machine and a Win7 64bit dev machine. My workflow includes dumping the production MySQL database on the linux machine and restoring it in my local MySQL database on the windows machine (using SQLyog). This worked fine for a long time. Following some trouble, I formatted and reinstalled my windows dev machine. Since then I'm unable to restore the db on it. I keep receiving the following error: Query: CREATE TABLE `auth_group` ( `id` int(11) NOT NULL auto_increment, `name` varchar(80) collate utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci Error occured at:2010-06-26 17:16:14 Line no.:30 Error Code: 1005 - Can't create table 'ap_site.auth_group' (errno: 121) Notice that this is the first create table statement in the sql dump file. This error occurs both on MySQL Community Server 5.1.41 and 5.1.48 and with SQLyog Community 8.0.4 and 8.5.1. I really don't know what's different in my configuration from before the reinstall and now and why does it have this effect. Restoring from sql dump is something I need to keep on doing, so I need a permanent fix and not a tailored workaround.

    Read the article

  • In Python epoll can I avoid the errno.EWOULDBLOCK, errno.EAGAIN ?

    - by davyzhang
    I wrote a epoll wrapper in python, It works fine but recently I found the performance is not not ideal for large package sending. I look down into the code and found there's actually a LOT of error Traceback (most recent call last): File "/Users/dawn/Documents/workspace/work/dev/server/sandbox/single_point/tcp_epoll.py", line 231, in send_now num_bytes = self.sock.send(self.response) error: [Errno 35] Resource temporarily unavailable and previously silent it as the document said, so my sending function was done this way: def send_now(self): '''send message at once''' st = time.time() times = 0 while self.response != '': try: num_bytes = self.sock.send(self.response) l.info('msg wrote %s %d : %r size %r',self.ip,self.port,self.response[:num_bytes],num_bytes) self.response = self.response[num_bytes:] except socket.error,e: if e[0] in (errno.EWOULDBLOCK,errno.EAGAIN): #here I printed it, but I silent it in normal days #print 'would block, again %r',tb.format_exc() break else: l.warning('%r %r socket error %r',self.ip,self.port,tb.format_exc()) #must break or cause dead loop break except: #other exceptions l.warning('%r %r msg write error %r',self.ip,self.port,tb.format_exc()) break times += 1 et = time.time() I googled it, and says it caused by temporarily network buffer run out So how can I manually and efficiently detect this error instead it goes to exception phase? Because it cause to much time to rasie/handle the exception.

    Read the article

  • lseek/write suddenly returns -1 with errno = 9 (Bad file descriptor)

    - by Ger Teunis
    My application uses lseek to seek the desired position to write data. The file is opened using open() command successfully and my application was able to use lseek and wite lots of times. At a given time, for some users and not easily reproducible the lseek returns -1 with an errno of 9. File is not closed before this and the filehandle (int) isn't reset. After this an other file is created open is okay again and lseek and write works again. To make it even worse, this user tried the complete sequence again and all was well. So my question is, can the OS close the file handle for me for some reason? What could cause this? A file indexer or file scanner of some sort? What is the best way to solve this; is this pseudo code the best solution? (never mind the code layout, will create functions for it) int fd=open(...); if (fd>-1) { long result = lseek(fd,....); if (result == -1 && errno==9) { close(fd..); //make sure we try to close nicely fd=open(...); result = lseek(fd,....); } } Anybody experience with something similar? Summary: file seek and write works okay for a given fd and suddenly gives back errno=9 without a reason.

    Read the article

  • OSError : [Errno 38] Function not implemented - Django Celery implementation

    - by Jordan Messina
    I installed django-celery and I tried to start up the worker server but I get an OSError that a function isn't implemented. I'm running CentOS release 5.4 (Final) on a VPS: . broker -> amqp://guest@localhost:5672/ . queues -> . celery -> exchange:celery (direct) binding:celery . concurrency -> 4 . loader -> djcelery.loaders.DjangoLoader . logfile -> [stderr]@WARNING . events -> OFF . beat -> OFF [2010-07-22 17:10:01,364: WARNING/MainProcess] Traceback (most recent call last): [2010-07-22 17:10:01,364: WARNING/MainProcess] File "manage.py", line 11, in <module> [2010-07-22 17:10:01,364: WARNING/MainProcess] execute_manager(settings) [2010-07-22 17:10:01,364: WARNING/MainProcess] File "/usr/local/lib/python2.6/site-packages/django/core/management/__init__.py", line 438, in execute_manager [2010-07-22 17:10:01,364: WARNING/MainProcess] utility.execute() [2010-07-22 17:10:01,364: WARNING/MainProcess] File "/usr/local/lib/python2.6/site-packages/django/core/management/__init__.py", line 379, in execute [2010-07-22 17:10:01,365: WARNING/MainProcess] self.fetch_command(subcommand).run_from_argv(self.argv) [2010-07-22 17:10:01,365: WARNING/MainProcess] File "/usr/local/lib/python2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv [2010-07-22 17:10:01,365: WARNING/MainProcess] self.execute(*args, **options.__dict__) [2010-07-22 17:10:01,365: WARNING/MainProcess] File "/usr/local/lib/python2.6/site-packages/django/core/management/base.py", line 218, in execute [2010-07-22 17:10:01,365: WARNING/MainProcess] output = self.handle(*args, **options) [2010-07-22 17:10:01,365: WARNING/MainProcess] File "/usr/local/lib/python2.6/site-packages/django_celery-2.0.0-py2.6.egg/djcelery/management/commands/celeryd.py", line 22, in handle [2010-07-22 17:10:01,366: WARNING/MainProcess] run_worker(**options) [2010-07-22 17:10:01,366: WARNING/MainProcess] File "/usr/local/lib/python2.6/site-packages/celery-2.0.1-py2.6.egg/celery/bin/celeryd.py", line 385, in run_worker [2010-07-22 17:10:01,366: WARNING/MainProcess] return Worker(**options).run() [2010-07-22 17:10:01,366: WARNING/MainProcess] File "/usr/local/lib/python2.6/site-packages/celery-2.0.1-py2.6.egg/celery/bin/celeryd.py", line 218, in run [2010-07-22 17:10:01,366: WARNING/MainProcess] self.run_worker() [2010-07-22 17:10:01,366: WARNING/MainProcess] File "/usr/local/lib/python2.6/site-packages/celery-2.0.1-py2.6.egg/celery/bin/celeryd.py", line 312, in run_worker [2010-07-22 17:10:01,367: WARNING/MainProcess] worker.start() [2010-07-22 17:10:01,367: WARNING/MainProcess] File "/usr/local/lib/python2.6/site-packages/celery-2.0.1-py2.6.egg/celery/worker/__init__.py", line 206, in start [2010-07-22 17:10:01,367: WARNING/MainProcess] component.start() [2010-07-22 17:10:01,367: WARNING/MainProcess] File "/usr/local/lib/python2.6/site-packages/celery-2.0.1-py2.6.egg/celery/concurrency/processes/__init__.py", line 54, in start [2010-07-22 17:10:01,367: WARNING/MainProcess] maxtasksperchild=self.maxtasksperchild) [2010-07-22 17:10:01,367: WARNING/MainProcess] File "/usr/local/lib/python2.6/site-packages/celery-2.0.1-py2.6.egg/celery/concurrency/processes/pool.py", line 448, in __init__ [2010-07-22 17:10:01,368: WARNING/MainProcess] self._setup_queues() [2010-07-22 17:10:01,368: WARNING/MainProcess] File "/usr/local/lib/python2.6/site-packages/celery-2.0.1-py2.6.egg/celery/concurrency/processes/pool.py", line 564, in _setup_queues [2010-07-22 17:10:01,368: WARNING/MainProcess] self._inqueue = SimpleQueue() [2010-07-22 17:10:01,368: WARNING/MainProcess] File "/usr/local/lib/python2.6/multiprocessing/queues.py", line 315, in __init__ [2010-07-22 17:10:01,368: WARNING/MainProcess] self._rlock = Lock() [2010-07-22 17:10:01,368: WARNING/MainProcess] File "/usr/local/lib/python2.6/multiprocessing/synchronize.py", line 117, in __init__ [2010-07-22 17:10:01,369: WARNING/MainProcess] SemLock.__init__(self, SEMAPHORE, 1, 1) [2010-07-22 17:10:01,369: WARNING/MainProcess] File "/usr/local/lib/python2.6/multiprocessing/synchronize.py", line 49, in __init__ [2010-07-22 17:10:01,369: WARNING/MainProcess] sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue) [2010-07-22 17:10:01,369: WARNING/MainProcess] OSError [2010-07-22 17:10:01,369: WARNING/MainProcess] : [2010-07-22 17:10:01,369: WARNING/MainProcess] [Errno 38] Function not implemented Am I just totally screwed and should use a new kernel that has this implemented or is there an easy way to resolve this?

    Read the article

  • strerror_r returns trash when I manually set errno during testing

    - by Robert S. Barnes
    During testing I have a mock object which sets errno = ETIMEDOUT; The object I'm testing sees the error and calls strerror_r to get back an error string: if (ret) { if (ret == EAI_SYSTEM) { char err[128]; strerror_r(errno, err, 128); err_string.assign(err); } else { err_string.assign(gai_strerror(ret)); } return ret; } I don't understand why strerror_r is returning trash. I even tried calling strerror_r(ETIMEDOUT, err, 128) directly and still got trash. I must be missing something. It seems I'm getting the gnu version of the function not the posix one, but that shouldn't make any difference in this case.

    Read the article

  • unable to run Selenium webdriver in windows - Permission denied - bind(2) (Errno::EACCES)

    - by mrd abd
    I want to start Selenium web driver in Windows 7 with Ruby 2. but i get error Permission denied - bind(2) (Errno::EACCES) Even in running with Administrator permission. here is my simple ruby code: require "selenium-webdriver" driver = Selenium::WebDriver.for :firefox driver.navigate.to "http://google.com" element = driver.find_element(:name, 'q') element.send_keys "Hello WebDriver!" element.submit puts driver.title driver.quit and here is the error: E:\ruby\930305\Studio\Ruby\test>ruby selenium.rb C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/w ebdriver/common/port_prober.rb:28:in `initialize': Permission denied - bind(2) (Errno::EACCES) from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/port_prober.rb:28:in `new' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/port_prober.rb:28:in `block in free?' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/port_prober.rb:26:in `each' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/port_prober.rb:26:in `free?' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/port_prober.rb:5:in `above' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/firefox/launcher.rb:49:in `find_free_port' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/firefox/launcher.rb:33:in `block in launch' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/firefox/socket_lock.rb:20:in `locked' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/firefox/launcher.rb:32:in `launch' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/firefox/bridge.rb:24:in `initialize' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/driver.rb:31:in `new' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/driver.rb:31:in `for' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver.rb:67:in `for' from selenium.rb:3:in `<main>'

    Read the article

  • Where is the errnos defined? Example linux c/c++ program for i2c.

    - by Johan
    Hi When something goes wrong in a classic linux c/c++ software we have the magic variable errno that gives us a clue on what just went wrong. But where is those errors defined? Let's take a example (it's actually a piece from a Qt app, therefore the qDebug()). if (ioctl(file, I2C_SLAVE, address) < 0) { int err = errno; qDebug() << __FILE__ << __FUNCTION__ << __LINE__ << "Can't set address:" << address << "Errno:" << err << strerror(err); .... The next step is to look at what that errno was so we can decide if we just quit or try to do something about the problem. So we maybe add a if or switch at this point. if (err == 9) { // do something... } else { //do someting else } And my question is where to find the errors that "9" represents? I don't like that kind of magic numbers in my code. /Thanks

    Read the article

  • Getting "Illegal Seek" error after calling accept()

    - by Bilthon
    Well.. it's pretty much that, I seem to be getting a "Illegal Seek" error when checking my errno variable. The problem is that I have no idea of what that can mean. I know sockets are treated like files in unix, but I can't see how can this be related to sockets. What I'm doing exactly is: int sck = ::accept(m_socket, (struct sockaddr*)&client_address, (socklen_t*)&address_len); Then I get sck = -1 and errno = ESPIPE And the weird thing is that it happens randomly. I mean, sometimes the code works fine, and sometimes it just thows an exception. I'm working with threads so that's understandable. But I just would like to know what kind of behaviour makes the accept() call to set errno as ESPIPE so I could check the paramethers for instance. Thanks Nelson R. Pérez

    Read the article

  • ERROR 1005 (HY000): Can't create table 'tmp' (errno: 13)

    - by kobey
    Hi, I'm Running Mysql on ubuntu 9.10, the process of Mysql is running as root, I'm using root account when logging to Mysql, which I gave all privileges, I'm using my own db(not mysql), I can create a table, but when i try to create Temporary table i get this error: ERROR 1005 (HY000): Can't create table 'tmp' (errno: 13) For this query: CREATE TEMPORARY TABLE tmp (id int); I've plenty of space in my hard drive, all permissions are granted(also var/lib/mysql have mysql permissions). Any idea? Thanks, Koby

    Read the article

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

    - by user551717
    I've tried to connect to my local machine every time I try and run my program. I am a nub, so it's probably a simple mistake somewhere. def connect(self): self.conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.conn.connect((self.host,self.port)) That is the code causing the error. The host and port are defined. Why is it giving me this error report? [Errno 10061] No connection could be made because the target machine actively refused it

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >