Search Results

Search found 1461 results on 59 pages for 'blocked'.

Page 49/59 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • Java Random Slowdowns on Mac OS cont'd

    - by javajustice
    I asked this question a few weeks ago, but I'm still having the problem and I have some new hints. The original question is here: http://stackoverflow.com/questions/1651887/java-random-slowdowns-on-mac-os Basically, I have a java application that splits a job into independent pieces and runs them in separate threads. The threads have no synchronization or shared memory items. The only resources they do share are data files on the hard disk, with each thread having an open file channel. Most of the time it runs very fast, but occasionally it will run very slow for no apparent reason. If I attach a CPU profiler to it, then it will start running quickly again. If I take a CPU snapshot, it says its spending most of its time in "self time" in a function that doesn't do anything except check a few (unshared unsynchronized) booleans. I don't know how this could be accurate because 1, it makes no sense, and 2, attaching the profiler seems to knock the threads out of whatever mode they're in and fix the problem. Also, regardless of whether it runs fast or slow, it always finishes and gives the same output, and it never dips in total cpu usage (in this case ~1500%), implying that the threads aren't getting blocked. I have tried different garbage collectors, different sizings the parts of the memory space, writing data output to non-raid drives, and putting all data output in threads separate the main worker threads. Does anyone have any idea what kind of problem this could be? Could it be the operating system (OS X 10.6.2) ? I have not been able to duplicate it on a windows machine, but I don't have one with a similar hardware configuration.

    Read the article

  • Looking for all-in-one drm/installer/CD creation kit.

    - by user30997
    The company I work for has a download manager in place that handles distribution, DRM, installation of our products - when a user gets them off our website. However, we're using an clunky system for packaging and protecting our products when we do press releases or make retail CDs. Part of the antiquation problem is the fact that the automated system that works with the installer- and DRM-creation software we have is a disaster that needs to be put out of my misery. The list of products that we currently produce, that I would like a new system MUST be capable of producing: Retail CDs, with a certain level of obfuscation to make copying difficult. Downloadable installers that time out after a few hours of use of the product. After the time has expired, removing and reinstalling the product will leave you still blocked from use. Installers that will fail to work after a certain date. I'd love to be able to just feed a tool the directory where a complete product resides and have the installer generated with a couple command-line operations. (The command-line issue is non-negotiable this well be called by an automated tool.) A single-solution package would be far preferable. Software with royalty-based or per-unit based licensing is not an option.

    Read the article

  • use php to parse json data posted from another php file

    - by akshay.is.gr8
    my web hosting has blocked the outward traffic so i am using a free web hosting to read data and post it to my server but the problem is that my php file receives data in the $_REQUEST variable but is not able to parse it. post.php function postCon($pCon){ //echo $pCon; $ch = curl_init('http://localhost/rss/recv.php'); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, "data=$pCon"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $d=curl_exec ($ch); echo $d."<br />"; curl_close ($ch); } recv.php <?php if(!json_decode($_REQUEST['data'])) echo "json error"; echo "<pre>"; print_r($data); echo "</pre>"; ?> every time it gives json error. but echo $_REQUEST['data'] gives the correct json data. plz help.

    Read the article

  • How to publish internal data to the internet - as simple as possible

    - by mlarsen
    We have a .net 2-tier application where a desktop program is talking to a database. We support MS SQL Server 2000, 2005, 2008 and Oracle 9, 10 and 11. The application is sold, not as shrink-wrap, but pretty close. It is quite important for us that the installation and configuration is as easy as possible as installation instructions are usually supplied in written form to the customers internal IT-department. Our application is usually not seen as mission critical for the IT-department, so we need to keep their work down to a minimum. Now we are starting to get wishes for a web application build on top of the same data. The web application will be hosted by us and delivered as a SaaS application. Now the challenge is how to move data back and forth between the web application and the customers internal database. as I see it we have some requirements: We must be ready to handle the situation where the customers database is not accessible from the DMZ. I guess the easiest solution is that all communication is initiated from inside the customers lan. As little firewall configuration as possible. The best is if we can run without any special configuration as long as outgoing traffic from the customers lan are not blocked. If we need something changed in the firewall, we must be able to document that the change is secure. It doesn't have to be real time. Moving data in batches every ten minutes or so is OK. Data moves both ways, but not the same tables, so we don't have to support merges. It would be nice if we don't have to roll our own framework completely. Looking forward to hear your suggestions.

    Read the article

  • Downloading javascript Without Blocking

    - by doug
    The context: My question relates to improving web-page loading performance, and in particular the effect that javascript has on page-loading (resources/elements below the script are blocked from downloading/rendering). This problem is usually avoided/mitigated by placing the scripts at the bottom (eg, just before the tag). The code i am looking at is for web analytics. Placing it at the bottom reduces its accuracy; and because this script has no effect on the page's content, ie, it's not re-writing any part of the page--i want to move it inside the head. Just how to do that without ruining page-loading performance is the crux. From my research, i've found six techniques (w/ support among all or most of the major browsers) for downloading scripts so that they don't block down-page content from loading/rendering: (i) XHR + eval(); (ii) XHR + 'inject'; (iii) download the HTML-wrapped script as in iFrame; (iv) setting the script tag's 'async' flag to 'TRUE' (HTML 5 only); (v) setting the script tag's 'defer' attribute; and (vi) 'Script DOM Element'. It's the last of these i don't understand. The javascript to implement the pattern (vi) is: (function() { var q1 = document.createElement('script'); q1.src = 'http://www.my_site.com/q1.js' document.documentElement.firstChild.appendChild(q1) })(); Seems simple enough: inside this anonymous function, a script element is created, its 'src' element is set to it's location, then the script element is added to the DOM. But while each line is clear, it's still not clear to me how exactly this pattern allows script loading without blocking down-page elements/resources from rendering/loading?

    Read the article

  • image appears larger than bounding rectangle?

    - by Kildareflare
    Hello I'm implementing a custom print preview control. One of the objects it needs to display is an image which can be several pages high and wide. I've successfully divided the image into pages and displayed them in the correct order. Each "page" is drawn within the marginbounds. (That is, each page is sized to be the same as the marginBounds.) The problem I have is that the image the page represents exceeds the bottom margin. However if I draw a rectangle with the same dimensions as the image, at the same position as the image, the rectangle matches the marginbounds. Thus when drawn to the page (in print preview and printed page) the image is larger than a rectangle drawn based on the image dimensions. I.e. The image is drawn at the same size as e.MarignBounds and is drawn at e.MarginBounds.Location yet exceeds the bottom margin. How is this? I've checked resoutions at each step of the process and they are all 96DPI. //... private List<Image> m_printImages = new List<Image>(); //... private void ImagePrintDocument_PrintPage(object sender, PrintPageEventArgs e) { PrepareImageForPrinting(e); e.Graphics.DrawImage(m_printImages[m_currentPage], new Point(e.MarginBounds.X, e.MarginBounds.Y); e.Graphics.DrawRectangle(new Pen(Color.Blue, 1.0F), new Rectangle( new Point(e.MarginBounds.X, e.MarginBounds.Y), new Size(m_printImages[m_currentPage].Width, m_printImages[m_currentPage].Height))); //rest of handler } PS Not able to show an image as free image hosting blocked here.

    Read the article

  • Linux time sample based profiler.

    - by Caspin
    short version: Is there a good time based sampling profiler for Linux? long version: I generally use OProfile to optimize my applications. I recently found a shortcoming that has me wondering. The problem was a tight loop spawning c++filt to demangle a c++ name. I only stumbled upon the code by accident while chasing down another bottleneck. The OProfile didn't show anything unusual about the code so I almost ignored it but my code sense told me to optimize the call and see what happened. I changed the popen of c++filt to abi::__cxa_demangle. The runtime went from more than a minute to a little over a second. About a x60 speed up. Is there a way I could have configured OProfile to flag the popen call? As the profile data sits now OProfile thinks the bottle neck was the heap and std::string calls (which BTW once optimized dropped the runtime to less than a second, more than x2 speed up). Here is my OProfile configuration: $ sudo opcontrol --status Daemon not running Event 0: CPU_CLK_UNHALTED:90000:0:1:1 Separate options: library vmlinux file: none Image filter: /path/to/excutable Call-graph depth: 7 Buffer size: 65536 Is there another profiler for Linux that could have found the bottleneck? I suspect the issue is that OProfile only logs its samples to the currently running process. I'd like it to always log its samples to the process I'm profiling. So if the process is currently switched out (blocking on IO or a popen call) OProfile would just place its sample at the blocked call. If I can't fix this, OProfile will only be useful when the executable is pushing near 100% CPU. It can't help with executables that that have inefficient blocking calls.

    Read the article

  • Parallel version of loop not faster than serial version

    - by Il-Bhima
    I'm writing a program in C++ to perform a simulation of particular system. For each timestep, the biggest part of the execution is taking up by a single loop. Fortunately this is embarassingly parallel, so I decided to use Boost Threads to parallelize it (I'm running on a 2 core machine). I would expect at speedup close to 2 times the serial version, since there is no locking. However I am finding that there is no speedup at all. I implemented the parallel version of the loop as follows: Wake up the two threads (they are blocked on a barrier). Each thread then performs the following: Atomically fetch and increment a global counter. Retrieve the particle with that index. Perform the computation on that particle, storing the result in a separate array Wait on a job finished barrier The main thread waits on the job finished barrier. I used this approach since it should provide good load balancing (since each computation may take differing amounts of time). I am really curious as to what could possibly cause this slowdown. I always read that atomic variables are fast, but now I'm starting to wonder whether they have their performance costs. If anybody has some ideas what to look for or any hints I would really appreciate it. I've been bashing my head on it for a week, and profiling has not revealed much.

    Read the article

  • IIS Restrict Access to Directory for table of users

    - by Dave
    I am trying to restrict access to files in a directory and it's sub directories based user rights. My user rights are stored in an MS SQL database in a custom format, however it is easy to query the list of users with rights to this directory. I need to know how to apply this to a web config on the server to authenticate against a query of a database table to determine if the username is authenticated and allowed to view the file. Of course if they are not they should be blocked / given a 404. I am using IIS and ASP.Net MVC3 with a form based security as opposed to the built in roles and responsibilities that was custom made for us and that works great. There are over 10k users tied to this non-Active Directory authentication so I am not planning to change my authentication type so please don't go there. It is not my decision on the choice of platform, or I would have gone with a LAMP server and been done with this. Edit 11-13-2012 @ 8:57a: In the web config can you put the result of an SQL query?

    Read the article

  • Stale connection with Pheanstalk

    - by token47
    I'm using beanstalkd to offload some work to other machines. The setup is a bit unusual, the server is on the internet (public ip) but the consumers are behind adsl lines on some peoples homes. So there is a linux server as client going out through a dynamic ip and connecting to the server to get a job. It's all PHP and I'm using pheanstalk library. Everything runs smoothly for some time, but then the adsl changes the IP (every 24h hours the provider forces a disconnect-reconnect) the client just hangs, never to go out of "reserve". I thought that putting a timeout on the reserve would help it, but it didn't. As it seems, the client issues a command and blocks, it never checks the timeout. It just issues a reserve-with-timeout (instead of a simple reserve) and it is the servers responsibility to return a TIME_OUT as the timeout occurs. The problem is, the connection is broken (but the TCP/IP doesn't know about that yet until any of the sides try to talk to the other side) and if the client blocked reading, it will never return. The library seems to have support for some kind of timeouts locally (for example when trying to connect to server), but it does not seem to contemplate this scenario. How could I detect the stale connection and force a reconnect? Is there some kind of keepalive on the protocol (and on the pheanstalk itself)? Thanks!

    Read the article

  • Hiding/blocking tabs using windows forms in c#

    - by Audel
    The thing is that i have a 'log in window' and a 'mainwindow' that is called after pressing the log in button or the "VISITANT" button If pressing the log in button, the whole system will come out, and if i press the VISITANT button, one tab should disappear or be blocked or something. private void visitant(object sender, EventArgs e) { mainwindow menu = new mainwindow(); menu.Show(); //mainwindow.tabPage1.Enabled = false; //attempt1 //mainwindow.tabPage1.Visible = false; //attempt1 //System.Windows.Forms.tabPage1.Enabled = false;//attempt2 //System.Windows.Forms.tabPage1.Visible = false;//attempt2 this.Hide(); } the errors i get for using the attempt1 are Error 1 'System.mainwindow.tabPage1' is inaccessible due to its protection level' Error 2 An object reference is required for the non-static field, method, or property 'System.mainwindow.tabPage1' and the one i get for using the attempt2 is Error 1 The type or namespace name 'tabPage1' does not exist in the namespace 'System.Windows.Forms' (are you missing an assembly reference?) as you probably have guessed "tabPage1" is the tab i need to hide when pressing the visitant button. I can't think of any more details, I will be around to provide any extra information Thanks in advance.

    Read the article

  • Creating a blocking Queue<T> in .NET?

    - by spoon16
    I have a scenario where I have multiple threads adding to a queue and multiple threads reading from the same queue. If the queue reaches a specific size all threads that are filling the queue will be blocked on add until an item is removed from the queue. The solution below is what I am using right now and my question is: How can this be improved? Is there an object that already enables this behavior in the BCL that I should be using? internal class BlockingCollection<T> : CollectionBase, IEnumerable { //todo: might be worth changing this into a proper QUEUE private AutoResetEvent _FullEvent = new AutoResetEvent(false); internal T this[int i] { get { return (T) List[i]; } } private int _MaxSize; internal int MaxSize { get { return _MaxSize; } set { _MaxSize = value; checkSize(); } } internal BlockingCollection(int maxSize) { MaxSize = maxSize; } internal void Add(T item) { Trace.WriteLine(string.Format("BlockingCollection add waiting: {0}", Thread.CurrentThread.ManagedThreadId)); _FullEvent.WaitOne(); List.Add(item); Trace.WriteLine(string.Format("BlockingCollection item added: {0}", Thread.CurrentThread.ManagedThreadId)); checkSize(); } internal void Remove(T item) { lock (List) { List.Remove(item); } Trace.WriteLine(string.Format("BlockingCollection item removed: {0}", Thread.CurrentThread.ManagedThreadId)); } protected override void OnRemoveComplete(int index, object value) { checkSize(); base.OnRemoveComplete(index, value); } internal new IEnumerator GetEnumerator() { return List.GetEnumerator(); } private void checkSize() { if (Count < MaxSize) { Trace.WriteLine(string.Format("BlockingCollection FullEvent set: {0}", Thread.CurrentThread.ManagedThreadId)); _FullEvent.Set(); } else { Trace.WriteLine(string.Format("BlockingCollection FullEvent reset: {0}", Thread.CurrentThread.ManagedThreadId)); _FullEvent.Reset(); } } }

    Read the article

  • Read file:// URLs in IE XMLHttpRequest

    - by Dan Fabulich
    I'm developing a JavaScript application that's meant to be run either from a web server (over http) or from the file system (on a file:// URL). As part of this code, I need to use XMLHttpRequest to load files in the same directory as the page and in subdirectories of the page. This code works fine ("PASS") when executed on a web server, but doesn't work ("FAIL") in Internet Explorer 8 when run off the file system: <html><head> <script> window.onload = function() { var xhr = new XMLHttpRequest(); xhr.open("GET", window.location.href, false); xhr.send(null); if (/TestString/.test(xhr.responseText)) { document.body.innerHTML="<p>PASS</p>"; } } </script> <body><p>FAIL</p></body> Of course, at first it fails because no scripts can run at all on the file system; the user is prompted a yellow bar, warning that "To help protect your security, Internet Explorer has restricted this webpage from running scripts or ActiveX controls that could access your computer." But even once I click on the bar and "Allow Blocked Content" the page still fails; I get an "Access is Denied" error on the xhr.open call. This puzzles me, because MSDN says that "For development purposes, the file:// protocol is allowed from the Local Machine zone." This local file should be part of the Local Machine Zone, right? How can I get code like this to work? I'm fine with prompting the user with security warnings; I'm not OK with forcing them to turn off security in the control panel. EDIT: I am not, in fact, loading an XML document in my case; I'm loading a plain text file (.txt).

    Read the article

  • Place JComponent On The Top Of JXLayer

    - by Yan Cheng CHEOK
    Hello, currently, I had successful applying JXLayer on my charting component, to draw a yellow information box on the top of it. final org.jdesktop.jxlayer.JXLayer<ChartPanel> layer = new org.jdesktop.jxlayer.JXLayer<ChartPanel>(this.chartPanel); this.chartLayerUI = new ChartLayerUI<ChartPanel>(this); layer.setUI(this.chartLayerUI); At the same time, I wish to add the following JComponent (DefaultDrawingView) on the top of JXLayer. This JComponent has the ability 1) To receive mouse event to draw figures on itself. Within ChartLayerUI, I add the following code @Override @SuppressWarnings("unchecked") public void installUI(JComponent c) { super.installUI(c); JXLayer<JComponent> l = (JXLayer<JComponent>) c; l.getGlassPane().setLayout(new java.awt.BorderLayout()); // this.view is DefaultDrawingView drawing object. l.getGlassPane().add(this.view, java.awt.BorderLayout.CENTER); } However, after having the above code, I get the following outcome 1) My charting component ChartPanel are being blocked by DefaultDrawingView 2) My charting component no longer able to receive mouse event. What I wish is that A) ChartPanel and DefaultDrawingView able to show up B) ChartPanel and DefaultDrawingView able to receive mouse event Is there other steps I had missed out, or did wrong? Thanks.

    Read the article

  • apache web server configuration problem

    - by mohit
    i want to have apache server to serve only /var/www/ directory now it serves all my files on system from directory "/" i tried to edit httpd.conf placed in /etc/apache2 and placed the folllowing content in it(intially it was empty) <Directory /> Options None AllowOverride None </Directory> DocumentRoot "/var/www" <Directory "/var/www"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> then saved it,restarted apache server put the location /var/www in the web browser address bar,still it shows the higher level directories too then i edited the file Default,Default-ssl in the sites-available folder repeated the same process still apache serves all files on my system 2.when i try to use the following command gedit httpd.conf I get the error gedit:2696): EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)

    Read the article

  • getting attribute as column headers

    - by edwards
    I have the following XML: <DEVICEMESSAGES> <VERSION xml="1" checksum="" revision="0" envision="33050000" device="" /> <HEADER id1="0001" id2="0001" content="Nasher[&lt;messageid&gt;]: &lt;!payload&gt;" /> <MESSAGE level="7" parse="1" parsedefvalue="1" tableid="15" id1="24682" id2="24682" eventcategory="1003010000" content="Access to &lt;webpage&gt; was blocked due to its category (&lt;info&gt; by &lt;hostname&gt;)" /> </DEVICEMESSAGES> I am using the following XSLT: <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:strip-space elements="*"/> <xsl:template match="DEVICEMESSAGES/HEADERS"> <xsl:value-of select="@id2"/>,<xsl:text/> <xsl:value-of select="@content"/>,<xsl:text/> <xsl:text>&#xa;</xsl:text> </xsl:template> </xsl:stylesheet> I get the following output: 0001 , Nasher[<messageid>]: <!payload> whereas I need the column headings, too: id2, content 0001 , Nasher[<messageid>]: <!payload>

    Read the article

  • How to Treat Race Condition of Session in Web Application?

    - by Morgan Cheng
    I was in a ASP.NET application has heavy traffic of AJAX requests. Once a user login our web application, a session is created to store information of this user's state. Currently, our solution to keep session data consistent is quite simple and brutal: each request needs to acquire a exclusive lock before being processed. This works fine for tradition web application. But, when the web application turns to support AJAX, it turns to not efficient. It is quite possible that multiple AJAX requests are sent to server at the same time without reloading the web page. If all AJAX requests are serialized by the exclusive lock, the response is not so quick. Anyway, many AJAX requests that doesn't access same session variables are blocked as well. If we don't have a exclusive lock for each requests, then we need to treat all race condition carefully to avoid dead lock. I'm afraid that would make the code complex and buggy. So, is there any best practice to keep session data consistent and keep code simple and clean?

    Read the article

  • Java: How to make this main thread wait for the new thread to terminate

    - by Jeff Bullard
    I have a java class that creates a process, called child, using ProcessBuilder. The child process generates a lot of output that I am draining on a separate thread to keep the main thread from getting blocked. However, a little later on I need to wait for the output thread to complete/terminate before going on, and I'm not sure how to do that. I think that join() is the usual way to do this but I'm not sure how to do that in this case. Here is the relevant part of the java code. // Capture output from process called child on a separate thread final StringBuffer outtext = new StringBuffer(""); new Thread(new Runnable() { public void run() { InputStream in = null; in = child.getInputStream(); try { if (in != null) { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String line = reader.readLine(); while ((line != null)) { outtext.append(line).append("\n"); ServerFile.appendUserOpTextFile(userName, opname, outfile, line+"\n"); line = reader.readLine(); } } } catch (IOException iox) { throw new RuntimeException(iox); } } }).start(); // Write input to for the child process on this main thread // String intext = ServerFile.readUserOpTextFile(userName, opname, infile); OutputStream out = child.getOutputStream(); try { out.write(intext.getBytes()); out.close(); } catch (IOException iox) { throw new RuntimeException(iox); } // ***HERE IS WHERE I NEED TO WAIT FOR THE THREAD TO FINISH *** // Other code goes here that needs to wait for outtext to get all // of the output from the process // Then, finally, when all the remaining code is finished, I return // the contents of outtext return outtext.toString();

    Read the article

  • Connecting to an RMI object without registry

    - by Mark Probst
    I think I need to connect to a remote RMI object without going through the registry, but I don't know how. My situation is this: I'm implementing a simple job distribution service which consists of one distributor and multiple workers. The distributor has a registered RMI object to which clients connect to send jobs, and workers connect to accept jobs. Unfortunately the distributor and worker hosts are behind a firewall. To get to the distributor host I am tunneling two ports (one for the registry, one for the distributor object) via SSH, so I can get to the registry and the distributor from outside the firewall. To make that work I have to set "-Djava.rmi.server.hostname=localhost" on the distributor JVM so that the clients connect to their local, tunneled port, instead of the port on the actual distributor host, which is blocked. This creates a problem for the workers, though, because they need to connect to the distributor directly, but because of the "localhost" redirection they behave like clients and try to connect to a port on their own host, which is not available, because I'm not tunneling on the workers (it is impractical). Now, if I could connect to a remote object directly by giving the hostname and port, I could do away both with the registry on the distributor and the "localhost" hack, and make the workers connect properly. How do I do that? Or is there a different solution to this problem?

    Read the article

  • FileReference.browse() stops playback on some Flash Players

    - by Christophe Herreman
    We have an issue were the server session associated with a Flex client times out when the browse file dialog is open for a time longer then the configured session timeout. It seems that on some players, the playback is stopped when browse or download on a FileReference is executing. This also causes remote calls to be blocked and hence our manual keep-alive messages are not sent to the server, resulting in a session timeout. I searched for some info on this in the docs and found a notice of it, but it does not explicitly list the players it does (not) work. Would anyone know were I could find a complete list? PS: here are the links that mention this behavior: http://livedocs.adobe.com/flex/3/html/help.html?content=17_Networking_and_communications_7.html While calls to the FileReference.browse(), FileReferenceList.browse(), or FileReference.download() method are executing, most players will continue SWF file playback. http://livedocs.adobe.com/flex/3/langref/flash/net/FileReference.html While calls to the FileReference.browse(), FileReferenceList.browse(), or FileReference.download() methods are executing, SWF file playback pauses in stand-alone and external versions of Flash Player and in AIR for Linux and Mac OS X 10.1 and earlier Anyone knows what is meant with an "external Flash Player"? PPS: we tested this on Linux (10.0.x and 10.1.x) in Firefox where it seems to stop playback and on Windows (10.0.x) in IE where playback seems to continue.

    Read the article

  • Can not open ports in iptables on CentOS 5??

    - by abszero
    I am trying to open up ports in CentOS's firewall and am having a terrible go at it. I have followed the "HowTo" here: http://wiki.centos.org/HowTos/Network/IPTables as well as a few other places on the Net but I still can't get the bloody thing to work. Basically I wanted to get two things working: VNC and Apache over the internal network. The problem is that the firewall is blocking all attempts to connect to these services. Now if I issue service iptables stop and then try to access the server via VNC or hit the webserver everything works as expected. However the moment I turn iptables back on all of my access is blocked. Below is a truncated version of my iptables file as it appears in vi -A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 5801 -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 5901 -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 6001 -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 5900 -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT Really I would just be happy if I could get port 80 opened up for Apache since I can do most stuff via putty but if I could figure out VNC as well that would be cool. As far as VNC goes there is just a single/user desktop that I am trying to connect to via: [ipaddress]:1 Any help would be greatly appreciated!

    Read the article

  • Generating a canonical path

    - by Joel
    Does any one know of any Java libraries I could use to generate canonical paths (basically remove back-references). I need something that will do the following: Raw Path - Canonical Path /../foo/ -> /foo /foo/ -> /foo /../../../ -> / /./foo/./ -> /foo //foo//bar -> /foo/bar //foo/../bar -> /bar etc... At the moment I lazily rely on using: new File("/", path).getCanonicalPath(); But this resolves the path against the actual file system, and is synchronised. java.lang.Thread.State: BLOCKED (on object monitor) at java.io.ExpiringCache.get(ExpiringCache.java:55) - waiting to lock <0x93a0d180> (a java.io.ExpiringCache) at java.io.UnixFileSystem.canonicalize(UnixFileSystem.java:137) at java.io.File.getCanonicalPath(File.java:559) The paths that I am canonicalising do not exist on my file system, so just the logic of the method will do me fine, thus not requiring any synchronisation. I'm hoping for a well tested library rather than having to write my own.

    Read the article

  • Java Applet - ArrayIndexOutOfBoundsException (pt 2)

    - by Dan
    Hi there, I fixed my previous problem. But now when on my tile map... if I try to go 9 tiles to the RIGHT, and on trying to get to the 9th tile.... I will get this error: Exception in thread "AWT-EventQueue-1" java.lang.ArrayIndexOutOfBoundsException: 8 at tileGen.blocked(tileGen.java:125) at tileGen.keyPressed(tileGen.java:58) at java.awt.Component.processKeyEvent(Component.java:6221) at java.awt.Component.processEvent(Component.java:6040) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1850) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:712) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:990) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:855) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:676) at java.awt.Component.dispatchEventImpl(Component.java:4502) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Here is code: http://www.so.pastebin.com/hYkpQf13 I have tried many solutions, all of which have failed. Maybe someone here can I help me? Thank you.

    Read the article

  • Python Multiprocessing Question

    - by Avan
    My program has 2 parts divided into the core and downloader. The core handles all the app logic while the downloader just downloads urls. Right now, I am trying to use the python multiprocessing module to accomplish the task of the core as a process and the downloader as a process. The first problem I noticed was that if I spawn the downloader process from the core process so that the downloader is the child process and the core is the parent, the core process(parent) is blocked until the child is finished. I do not want this behaivor though. I would like to have a core process and a downloader process that are both able to execute their code and communicate between each other. example ... def main(): jobQueue = Queue() jobQueue.put("http://google.com) d = Downloader(jobQueue) p = Process(target=d.start()) p.start() if __name__ == '__main__': freeze_support() main() where Downloader's start() just takes the url out of the queue and downloads it. In order to have the 2 processes unblocked, would I need to create 2 processes from the parent process and then share something between them?

    Read the article

  • UDP server doesnt accept calls from outside.

    - by rayman
    Hi, ive implement simple udp server on my Android device.(sdk 1.5) it works fine when i am runnning a local client on the phone sends through it trigger to my server. but when i try to get udp call from an outside server to my phone, it doesnt work. already make sure the outside server isnt blocked by firewall and it's sending the udp trigger to the right port, which my phone is listening to. i used natstat on the phone and checked that the phone is realy listening to the it's local ip and the port ive setted it to. here is my code of the server:(on the device) // server will listen to one client try { Thread udpServerThread = new Thread() { @Override public void run() { try { // Retrieve the ServerName InetAddress serverAddr = InetAddress .getByName("localhost"); Log.d("UDP", "S: Connecting..."); // Create new UDP-Socket socket = new DatagramSocket(SERVERPORT,serverAddr); byte[] buf = new byte[17]; // * Prepare a UDP-Packet that can contain the data we // * want to receive DatagramPacket packet = new DatagramPacket(buf, buf.length); Log.d("UDP", "S: Receiving..."); // wait to Receive the UDP-Packet socket.receive(packet); Log.d("UDP", "S: Received: '" + new String(packet.getData()) + "'"); acceptedMsg=new String(packet.getData()); notifyService(acceptedMsg); Log.d("UDP", "S: Done."); } catch (Exception e) { Log.e("UDP", "S: Error", e); } } }; udpServerThread.start(); } catch (Exception E) { Log.e("r",E.getMessage()) ; } so as i said, when i try it with local client(seperate thread) which sends udp trigger it works fine, but when i take this client implementation and put it on an outside real server, after UDP being sent, the phone doesnt respond to it. any idea? thanks, ray.

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >