Daily Archives

Articles indexed Thursday June 21 2012

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

  • Accessing an object's fields without an active session

    - by Dave
    I'm using Hibernate 4.0.1.Final. Is it possible to access an object's fields if that object has been loaded via the org.hibernate.Session.load(Class clazz, Serializable id) method and there is no active session? I use this code to access an object by id … protected Object find(Class clazz, Serializable id) { Object obj = null; try { startOperation(); obj = session.load(clazz, id); tx.commit(); } catch (HibernateException e) { handleException(e); } finally { session.close(); } return obj; } but if I have that object without an active session, like with this code … final Organization foundOrg = orgDao.findById(org.getOrganizationId()); System.out.println(foundOrg.getName()); I get this error on the "System.out" line … org.hibernate.LazyInitializationException: could not initialize proxy - no Session at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:149) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:195) at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:185) at org.myco.myproject.orgsclient.model.Organization_$$_javassist_0.getName(Organization_$$_javassist_0.java) at org.myco.myproject.orgsclient.dao.OrganizationDAOTest.testInsertSchool(OrganizationDAOTest.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

    Read the article

  • XMLRPC java insert issue

    - by Sanjai Palliyil
    I am trying to insert customer details into OpenERP server using XMLPRC and java. I am able to do an authentication. But when i call the execute method to insert the record by passing the parameters, am getting Exception in thread "main" java.lang.NullPointerException on line res_create = client_1.execute("execute", params_create); Please find my code below res = client.execute("login", params); String url_1 = "http://agilewebdevelopment.net:8514/xmlrpc/object"; XmlRpcClientConfigImpl config_1 = new XmlRpcClientConfigImpl(); try { config_1.setServerURL(new URL(url_1)); } catch (MalformedURLException e) { System.out.println("First"); e.printStackTrace(); } System.out.println(res); HashMap<String, Object> vals = new HashMap<String, Object>(); vals.put("name", "Mantavya Gajjar"); vals.put("ref", "MGA"); XmlRpcClient client_1 = new XmlRpcClient(); client.setConfig(config_1); Object[] params_create = new Object[]{"erp_performance", "1", "admin", "res.partner", "create", vals}; Object res_create = null; try { res_create = client_1.execute("execute", params_create); } catch (XmlRpcException e) { e.printStackTrace(); } Any helps is appreciated

    Read the article

  • Authorizing a computer to access a web application

    - by HackedByChinese
    I have a web application, and am tasked with adding secure sign-on to bolster security, akin to what Google has added to Google accounts. Use Case Essentially, when a user logs in, we want to detect if the user has previously authorized this computer. If the computer has not been authorized, the user is sent a one-time password (via email, SMS, or phone call) that they must enter, where the user may choose to remember this computer. In the web application, we will track authorized devices, allowing users to see when/where they logged in from that device last, and deauthorize any devices if they so choose. We require a solution that is very light touch (meaning, requiring no client-side software installation), and works with Safari, Chrome, Firefox, and IE 7+ (unfortunately). We will offer x509 security, which provides adequate security, but we still need a solution for customers that can't or won't use x509. My intention is to store authorization information using cookies (or, potentially, using local storage, degrading to flash cookies, and then normal cookies). At First Blush Track two separate values (local data or cookies): a hash representing a secure sign-on token, as well as a device token. Both values are driven (and recorded) by the web application, and dictated to the client. The SSO token is dependent on the device as well as a sequence number. This effectively allows devices to be deauthorized (all SSO tokens become invalid) and mitigates replay (not effectively, though, which is why I'm asking this question) through the use of a sequence number, and uses a nonce. Problem With this solution, it's possible for someone to just copy the SSO and device tokens and use in another request. While the sequence number will help me detect such an abuse and thus deauthorize the device, the detection and response can only happen after the valid device and malicious request both attempt access, which is ample time for damage to be done. I feel like using HMAC would be better. Track the device, the sequence, create a nonce, timestamp, and hash with a private key, then send the hash plus those values as plain text. Server does the same (in addition to validating the device and sequence) and compares. That seems much easier, and much more reliable.... assuming we can securely negotiate, exchange, and store private keys. Question So then, how can I securely negotiate a private key for authorized device, and then securely store that key? Is it more possible, at least, if I settle for storing the private key using local storage or flash cookies and just say it's "good enough"? Or, is there something I can do to my original draft to mitigate the vulnerability I describe?

    Read the article

  • Can't find how to import as one object or how to merge

    - by Aaron
    I need write a script in blender that creates some birds which fly around some obstacles. The problem is that I need to import a pretty large Collada model (a building) which consists of multiple objects. The import works fine, but the the building is not seen as 1 object. I need to resize and move this building, but I can only get the last object in the building (which is a camera)... Does anyone know how to merge this building in 1 object, group, variable... so I can resize and move it correctly? Part of the code I used: bpy.ops.wm.collada_import(filepath="C:\\Users\\me\\building.dae") building= bpy.context.object building.scale = (100, 100, 100) building.name = "building"

    Read the article

  • wcf service creating proxy by using svcutil.exe in command prompt?

    - by Surya sasidhar
    when i am trying to generate proxy manually using comand prompt i am getting this error Setting environment for using Microsoft Visual Studio 2008 x86 tools. C:\Program Files\Microsoft Visual Studio 9.0\VC>cd\ C:\>svcutil /language:cs /out:proxy.cs /config:app.config /http://localhost:2544 /myservicewcf/Sasi.svc 'svcutil' is not recognized as an internal or external command, operable program or batch file. C:\>svcutil.exe /language:cs /out:proxy.cs /config:app.config /http://localhost: 2544/myservicewcf/sasi.svc 'svcutil.exe' is not recognized as an internal or external command, operable program or batch file. C:\> can u help me please

    Read the article

  • Rendering Linear Gradients using the HTML5 Canvas

    - by dwahlin
    Related HTML5 Canvas Posts: Getting Started with the HTML5 Canvas Rendering Text with the HTML5 Canvas Creating a Line Chart using the HTML5 Canvas New Pluralsight Course: HTML5 Canvas Fundamentals Gradients are everywhere. They’re used to enhance toolbars or buttons and help add additional flare to a web page when used appropriately. In the past we’ve always had to rely on images to render gradients which works well, but isn’t necessarily the most efficient (although 1 pixel wide images do work well). CSS3 provides a great way to render gradients in modern browsers (see http://www.colorzilla.com/gradient-editor for a nice online gradient generator tool) but it’s not the only option. If you’re working with charts, games, multimedia or other HTML5 Canvas applications you can also use gradients and render them on the client-side without relying on images. In this post I’ll introduce how to use linear gradients and discuss the different functions that can be used to create them.   Creating Linear Gradients Linear gradients can be created using the 2D context’s createLinearGradient function. The function takes the starting x,y coordinates and ending x,y coordinates of the gradient:   createLinearGradient(x1, y1, x2, y2);   By changing the start and end coordinates you can control the direction that the gradient renders. For example, adding the following coordinates causes the gradient to render from left to right since the y value stays at 0 for both points while the x value changes from 0 to 200. var lgrad = ctx.createLinearGradient(0, 0, 200, 0); Here’s an example of how changing the coordinates affects the gradient direction:   Once a linear gradient object has been created you can set color stops using the addColorStop() function. It takes the location where the color should appear in the gradient with 0 being the beginning and 1 being at the end (0.5 would be in the middle) as well as the color to display in the gradient. lgrad.addColorStop(0, 'white'); lgrad.addColorStop(1, 'gray');   An example of combining createLinearGradient() with addColorStop() is shown next:   Using createLinearGradient() var canvas = document.getElementById('myCanvas'); var ctx = canvas.getContext('2d'); var lgrad = ctx.createLinearGradient(0, 0, 200, 0); lgrad.addColorStop(0, 'white'); lgrad.addColorStop(1, 'gray'); ctx.fillStyle = lgrad; ctx.fillRect(0, 0, 200, 200); ctx.strokeRect(0, 0, 200, 200); This code renders a white to gray gradient as shown next: A live example of using createLinearGradient() is shown next. Click the Result tab to see the code in action.   In the next post on the HTML5 Canvas I’ll take a look at radial gradients and how they can be used. In the meantime, if you’re interested in learning more about the HTML5 Canvas and how it can be used in your Web or Windows 8 applications, check out my HTML5 Canvas Fundamentals course from Pluralsight. It has over 4 1/2 hours of canvas goodness packed in it.

    Read the article

  • Handling Trailing Delimiters in HL7 Messages

    - by Thomas Canter
    Applies to: BizTalk Server 2006 with the HL7 1.3 Accelerator Outline of the problem Trailing Delimiters are empty values at the end of an object in a HL7 ER7 formatted message. Examples: Empty Field NTE|P| NTE|P|| Empty component ORC|1|725^ Empty Subcomponent ORC|1|||||27& Empty repeat OBR|1||||||||027~ Trailing delimiters indicate the following object exists and is empty, which is quite different from null, null is an explicit value indicated by a pair of double quotes -> "". The BizTalk HL7 Accelerator by default does not allow trailing delimiters. There are three methods to allow trailing delimiters. NOTE: All Schemas always allow trailing delimiters in the MSH Segment Using party identifiers MSH3.1 – Receive/inbound processing, using this value as a party allows you to configure the system to allow inbound trailing delimiters. MSH5.1 – Send/outbound processing, using this value as a party allows you to configure the system to allow outbound trailing delimiters. Generally, if you allow inbound trailing delimiters, unless you are willing to programmatically remove all trailing delimiters, then you need to configure the send to allow trailing delimiters. Add the appropriate parties to the BizTalk Parties list from these two fields in your message stream. Open the BizTalk HL7 Configuration tool and for each party check the "Allow trailing delimiters (separators)" check box on the Validation tab. Disadvantage – Each MSH3.1 and MSH5.1 value must be represented in the parties list and configured. Advantage – granular control over system behavior for each inbound/outbound system. Using instance properties of a pipeline used in a send port or receive location. Open the BizTalk Server Administration console locate the send port or receive location that contains the BTAHL72XReceivePipeline or BTAHL72XSendPipeline pipeline. Open the properties To the right of the pipeline selected locate the […] ellipses button In the property list, locate the "TrailingDelimiterAllowed" property and set it to True. Advantage – All messages through a particular Send Port or Receive Location will allow trailing delimiters. Disadvantage – Must configure each Send Port or Receive Location. No granular control over which remote parties will send or receive messages with trailing delimiters. Using a custom pipeline that uses a pre-configured BTA HL7 Pipeline component. Use Visual Studio to construct a custom receive and send pipeline using the appropriate assembler or dissasembler. Set the component property to "TrailingDelimitersAllowed" to True Compile and deploy the custom pipeline Use the custom pipeline instead of the standard pipeline for all HL7 message processing Advantage – All messages using the custom pipeline will automatically allow trailing delimiters. Disadvantage – Requires custom coding and development to create and deploy the custom pipeline. No granular control over which remote parties will send or receive messages with trailing delimiters. What does a Trailing Delimiter do to the XML Schema? Allowing trailing delimiters does not have the impact often expected in the actual XML Schema.The Schema reproduces the message with no data loss.Thus, the message when represented in XML must contain the extra fields, in order to reproduce the outbound message.Thus, a trialing delimiter results in an empty XML field.Trailing Delmiters are not stripped from the inbound message. Example:<PID_21>44172</PID_21><PID_21>9257</PID_21> -> the original maximum number of repeats<PID_21></PID_21> -> The empty repeated field Allowing trailing delimiters not remove the trailing delimiters from the message, it simply suppresses the check that will cause the message to fail parse with trailing delimiters. When can you not fix the problem by enabling trailing delimiters Each object in a message must have a location in the target BTAHL7 schema for its content to reside.If you have more objects in the message than are contained at that location, then enabling trailing delimiters will not resolve the problem. The schema must be extended to accommodate the empty message content.Examples: Extra Field NTE|P||||Only 4 fields in NTE Segment, the 4th field exists, but is empty. Extra component PID|1|1523|47^^^^^^^Only 5 components in a CX data type, the 5th component exists, but is empty Extra subcomponent ORC|1|||||27&&Only 2 subcomponents in a CQ data type, the 3rd subcomponent is empty, but exists. Extra Repeat PID|1||||||||||||||||||||4419~5217~Only 2 repeats allowed for the field "Mother's identifier", the repeat is empty, but exists. In each of these cases, you must locate the failing object and extend the type to allow an additional object of that type. FieldAdd a field of ST to the end of the segment with a suitable name in the segments_nnn.xsd Component Create a new Custom CX data type (i.e. CX_XtraComp) in the datatypes_nnn.xsd and add a new component to the custom CX data type. Update the field in the segments_nnn.xsd file to use the custom data type instead of the standard datatype. Subcomponent Create a new Custom CQ data type that accepts an additional TS value at the end of the data type. Create a custom TQ data type that uses the new custom CQ data type as the first subcomponent. Modify the ORC segment to use the new CQ data type at ORC.7 instead of the standard CQ data type. RepeatModify the Field definition for PID.21 in the segments_nnn.xsd to allow more repeats in the field.

    Read the article

  • Excel cannot access the file with IIS7&Windows Serer 2008 R2(64bit)

    - by user838204
    I have a web project(.Net4) that needs to access Excel file, but it ends up with the following error message: Error occured during file generation.Microsoft Excel cannot access the file 'D:\xx\xx\abc.xls'. There are several possible reasons: • The file name or path does not exist. (Actually it's there) • The file is being used by another program.(It cant happen) • The workbook you are trying to save has the same name as a currently open workbook. In IIS7, I use DefaultAppPool with the Identity "myservice" who's under the Group of Administrators. In the Authentication Page of my website under IIS, Anonymous Authentication was enabled and set to "Application pool identity" and ASP.NET Impersonation was disabled. After searching the solution for hours, I found the following but NONE of them work Create folder in C:\Windows\SysWOW64\config\systemprofile\Desktop. Plz refer:this Grant rights of "myservice" in Component Services. Plz refer:this One thing strange, there is nothing in the Group of IIS_IUSRS. Is that normal? Cause I remember at least two users (DefaultAppPool & Classic .Net AppPool). Plz tell me how to fix the access problem. I assume that's permission problem of IIS but I cant solve it. Thank you.

    Read the article

  • Linux (Ubuntu 12.04) two gateways one nic

    - by David
    I have Ubuntu 12.04 Server edition Two gateways, both on 192.168.0. network, let's make them 192.168.0.1 and 192.168.0.2 I've read you should be able to add second gateway into /etc/network/interfaces, that it will build out all the routing automatically, but I get "duplicate option" error. So if I have one default gateway, let's say 0.1, and a connection comes through from the 0.2 gateway, my understanding is that it still tries to respond through 0.1 gateway. Can we change this behavior?

    Read the article

  • php-cgi cpu usage is super high

    - by Ryan Thompson
    I am getting constantly high and wildly fluctuating CPU usage % for php-cgi commands as seen via "top" on my Centos server.. I have a server density account and it seems that this is a common trend: User - PID - CPU % - MEM % - VSZ - RSS - TT - Stat - Started - Time - Command 500 - 6389 - 22.4 - 3 - 271136 - 32380 - ? - S - 20:26 - 0:40 - /usr/bin/php-cgi Seems there are about 6 or so of those records in my processes list at any given check-in. Any ideas what's causing this? I have fast_cgi installed and the module is loading.. Not sure why it isn't handling this though. Any help would be greatly appreciated! Ryan

    Read the article

  • I need to create a volume/symbolic link from a UNC Path

    - by Sebas
    I have a workstation with Windows XP and I need to make a symbolic link or mount a UNC Path like a local Drive. I need the same behavior that produces M-Daemon tools when you mount an .iso File but with a remote directory. This is because I have a software client that perform several task but only with local drives and directorys. The remote UNC path is a NAS server, thats the why I need to perform all the tasks from a workstations. Thanks a lot!

    Read the article

  • NATing IPv4 while routing IPv6

    - by Hugo
    I've the following setup: client(s) <---> (eth0) router (eth1) <---> wan I have a static IPv4 address and a /48 IPv6 address block. I need to connect all the clients to (wan). Each client will have it's own public IPv6. Meanwhile, I need to NAT those same clients over to (wan). Everything IPv4-related and the NAT are working fine. The IPv6 communication to/from (eth0)<-(clients) works fine, as does the IPv6 communication from (eth1)<-(wan) works fine. To provide IPv6 to all my clients, I've thought of too choices: Having the router as a gateway, which different IP on each interface. This sounds like I need to tell my ISP to route the entire block through that single IP, so it's not really an option. Transparently pass IPv6 packets to/from eth0<-eth1, so all clients can communicate with the upstream gateway (I would actually have a switch here if it weren't for the need to remain IPv4 compatible). So, since I've opted for the second choice, I'm in doubt: How can I pass all IPv6 traffic from eth0 to eth1 transparently? What I need is a level 3 bridge, but linux's bridgeutils create a level 2 bridge (which would bridge ipv4 as well, and I can't have that). This is a DD-WRT device, but it's pretty much an embeded linux, so most suggestions that would work on linux are welcome. Thanks.

    Read the article

  • Why does cpuinfo report that my frequency is slower?

    - by Avery Chan
    My machine is running off of a AMD Sempron(tm) X2 190 Processor. According the marketing copy, it should be running at around 2.5 Ghz. Why is the cpu speed being reported as something lower? Spec description (in Chinese) $ cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 16 model : 6 model name : AMD Sempron(tm) X2 190 Processor stepping : 3 microcode : 0x10000c8 cpu MHz : 800.000 cache size : 512 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 5 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt npt lbrv svm_lock nrip_save bogomips : 5022.89 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 48 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate processor : 1 vendor_id : AuthenticAMD cpu family : 16 model : 6 model name : AMD Sempron(tm) X2 190 Processor stepping : 3 microcode : 0x10000c8 cpu MHz : 800.000 cache size : 512 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 apicid : 1 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 5 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt npt lbrv svm_lock nrip_save bogomips : 5022.82 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 48 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate

    Read the article

  • Is there a test to see if hardware virtualization (vmx / xvm) are presently enabled within a Linux session?

    - by Dr. Edward Morbius
    I'm writing procedures for configuring VirtualBox support for 64-bit SMP guests, which requires hardware virtualization suppot (VTx/Intel, AMD-V/AMD). I have successfully configured this myself, however I'd like the procedure to be clear. sed -ne '/^flags/s/^.*: //p' /proc/cpuinfo | egrep -q '(vmx|svm)' && echo Has hardware virt || echo No HW virt ... shows if the CPU is capable. I've still got to go enable the feature in BIOS. Any way to test from within Linux to see that this is no or not? Thanks.

    Read the article

  • Better filesystem for ZODB and Plone.app.blob

    - by h2o
    I am interested to know which Linux file system is best for hosting Zope's Object Database (Data.fs) and Plone.app.blob (blobstorage). Various reviews from the Internet suggests that XFS is good for hosting both. XFS is fast and works well with large files. Anyone using XFS for Zope or Plone? What optimization flags, if any, do you use for XFS? Note that this is a repost. I originally asked this on StackOverflow and was given a suggestion to post on Severfault instead.

    Read the article

  • DNS configuration issues. Clients inside network unable to resolve DNS server's name

    - by hydroparadise
    Setup the DNS service on Ubuntu 12.04 64 and all apears to be well except that my dhcp clients do not recognize my DNS servers hostname. When doing a nslookup on one of my Windows clients, I get C:\Users\chad>nslookup Default Server: UnKnown Address: 192.168.1.2 Where I would expect the FQDN in the spot where UnKnown is seen. The DNS server know's itself pretty well, but I think only because I have an entry in the /etc/hosts file to resolve. There's so many places to look I don't even know where to begin. Are there any logs I can look at? Something. Places I've looked at and configured: /etc/bind/zones/domain.com.db /etc/bind/zones/rev.1.168.192.in-addr.arpa /etc/bind/named.conf.local EDIT: '/etc/bind/zones/rev.1.168.192.in-addr.arpa' @ IN SOA dns-serv1.mydomain.com [email protected]. ( 2006081401; 28800; 604800; 604800; 86400 ) IN NS dns-serv1.mydomain.com. 2 IN PTR dns-serv1 2 IN PTR mydomain.com EDIT 2: '/etc/bind/named.conf.local' zone "mydomain.com" { type master; file "/etc/bind/zones/mydomain.com.db"; }; zone "1.168.192.in-addr.arpa" { type master; file "/etc/bind/zones/rev.0.168.192.in-addr.arpa"; };

    Read the article

  • In MySQL 5.1 InnoDB, does the maximum length of a VARCHAR affect secondary index size?

    - by e_tothe_ipi
    Assuming the data is the same either way, does the maximum length of the VARCHAR affect the space usage of a secondary index? Does InnoDB use fixed length records for indexes? Assume that we're talking about MySQL 5.1, with the InnoDB COMPRESSED table format and that the field in question is defined as a VARCHAR with some length less than or equal to 255 (so that it uses only one byte for the offset). Here is the use case: I have a server with a very large table (several gigabytes). One of the fields is currently VARCHAR(7). We need it a little longer and we are thinking of making it VARCHAR(255), but we are worried that it bloat the index.

    Read the article

  • apache2 how to trace caller of SIGTERM

    - by art vanderlay
    I have a dex x64 on a virtualbox win7pro host. My apache2 will stop responding after a page request or other activity such as upload via ftp. The php.cgi becomes non responsive and a restart is required any help tracking down the culprit sending the SIGTERM would be much appreciated. thx Art my apache2.conf has <IfModule mpm_prefork_module> ServerLimit 1024 StartServers 10 MinSpareServers 10 MaxSpareServers 20 MaxClients 1024 MaxRequestsPerChild 0 </IfModule> ` From the apache2 log I have [Wed Jun 20 05:07:01 2012] [notice] caught SIGTERM, shutting down [Wed Jun 20 05:07:03 2012] [notice] FastCGI: process manager initialized (pid 4369) [Wed Jun 20 05:07:03 2012] [notice] Apache/2.2.16 (Debian) mod_fastcgi/2.4.6 PHP/5.3.3-7+squeeze13 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations and from the accounting output with lastcomm php.cgi www-data __ 0.13 secs Wed Jun 20 04:49 lastcomm root pts/2 0.10 secs Wed Jun 20 04:49 php.cgi www-data __ 0.18 secs Wed Jun 20 04:49 php.cgi www-data __ 0.18 secs Wed Jun 20 04:47 apache2 root pts/1 0.02 secs Wed Jun 20 04:46 tput root pts/1 0.00 secs Wed Jun 20 04:46 apache2 F root pts/1 0.00 secs Wed Jun 20 04:46 apache2ctl root pts/1 0.00 secs Wed Jun 20 04:46 apache2 S root pts/1 0.77 secs Wed Jun 20 04:46 rm root pts/1 0.01 secs Wed Jun 20 04:46 install root pts/1 0.01 secs Wed Jun 20 04:46 mkdir root pts/1 0.00 secs Wed Jun 20 04:46 apache2ctl F root pts/1 0.00 secs Wed Jun 20 04:46 sleep root pts/1 0.00 secs Wed Jun 20 04:46 apache2 SF root __ 0.54 secs Wed Jun 20 04:34 apache2 SF www-data __ 0.14 secs Wed Jun 20 04:34 apache2 SF www-data __ 0.07 secs Wed Jun 20 04:34 apache2 SF www-data __ 0.06 secs Wed Jun 20 04:36 apache2 SF www-data __ 0.07 secs Wed Jun 20 04:34 apache2 SF www-data __ 0.11 secs Wed Jun 20 04:34 apache2 SF www-data __ 0.02 secs Wed Jun 20 04:34 apache2 SF www-data __ 0.04 secs Wed Jun 20 04:34 apache2 SF www-data __ 0.06 secs Wed Jun 20 04:34 apache2 SF www-data __ 0.08 secs Wed Jun 20 04:34 apache2 SF www-data __ 0.03 secs Wed Jun 20 04:34 apache2 SF www-data __ 0.02 secs Wed Jun 20 04:34 apache2 SF www-data __ 0.01 secs Wed Jun 20 04:34 grep root pts/1 0.00 secs Wed Jun 20 04:46 apache2ctl root pts/1 0.02 secs Wed Jun 20 04:46 apache2 root pts/1 0.24 secs Wed Jun 20 04:46 apache2 SF www-data __ 0.00 secs Wed Jun 20 04:34 apache2ctl F root pts/1 0.00 secs Wed Jun 20 04:46 apache2ctl root pts/1 0.00 secs Wed Jun 20 04:46 apache2 root pts/1 0.22 secs Wed Jun 20 04:46 apache2ctl F root pts/1 0.01 secs Wed Jun 20 04:46 apache2 F root pts/1 0.00 secs Wed Jun 20 04:46 grep root pts/1 0.00 secs Wed Jun 20 04:46 tr root pts/1 0.00 secs Wed Jun 20 04:46 pidof S root pts/1 0.11 secs Wed Jun 20 04:46 cat root pts/1 0.00 secs Wed Jun 20 04:46 apache2 F root pts/1 0.00 secs Wed Jun 20 04:46 grep root pts/1 0.00 secs Wed Jun 20 04:46 tr root pts/1 0.00 secs Wed Jun 20 04:46 pidof S root pts/1 0.05 secs Wed Jun 20 04:46 cat root pts/1 0.01 secs Wed Jun 20 04:46 apache2 F root pts/1 0.00 secs Wed Jun 20 04:46 apache2ctl root pts/1 0.00 secs Wed Jun 20 04:46 apache2 root pts/1 0.34 secs Wed Jun 20 04:46 apache2ctl F root pts/1 0.00 secs Wed Jun 20 04:46 apache2 F root pts/1 0.00 secs Wed Jun 20 04:46 apache2 F root pts/1 0.00 secs Wed Jun 20 04:46 smbd SF root __ 0.25 secs Wed Jun 20 04:46 php.cgi www-data __ 0.14 secs Wed Jun 20 04:45 php.cgi www-data __ 0.19 secs Wed Jun 20 04:42 cron SF root __ 0.02 secs Wed Jun 20 04:39 sh S root __ 0.00 secs Wed Jun 20 04:39 find root __ 0.00 secs Wed Jun 20 04:39 maxlifetime root __ 0.02 secs Wed Jun 20 04:39 php5 root __ 0.13 secs Wed Jun 20 04:39 which root __ 0.00 secs Wed Jun 20 04:39 exim4 S root __ 0.01 secs Wed Jun 20 04:37 php.cgi www-data __ 0.04 secs Wed Jun 20 04:36 php.cgi www-data __ 0.12 secs Wed Jun 20 04:35 php.cgi www-data __ 0.11 secs Wed Jun 20 04:35 php.cgi www-data __ 0.14 secs Wed Jun 20 04:34 lastcomm root pts/2 0.09 secs Wed Jun 20 04:34 apache2 root pts/1 0.02 secs Wed Jun 20 04:34 tput root pts/1 0.00 secs Wed Jun 20 04:34 apache2 F root pts/1 0.00 secs Wed Jun 20 04:34 apache2ctl root pts/1 0.00 secs Wed Jun 20 04:34 apache2 S root pts/1 0.54 secs Wed Jun 20 04:34 rm root pts/1 0.00 secs Wed Jun 20 04:34 install root pts/1 0.00 secs Wed Jun 20 04:34 mkdir root pts/1 0.00 secs Wed Jun 20 04:34 apache2ctl F root pts/1 0.00 secs Wed Jun 20 04:34 sleep root pts/1 0.00 secs Wed Jun 20 04:34 apache2 SF root __ 0.80 secs Wed Jun 20 03:58 sleep root pts/1 0.00 secs Wed Jun 20 04:34 apache2 SF www-data __ 0.26 secs Wed Jun 20 03:58 apache2 SF www-data __ 0.12 secs Wed Jun 20 03:59 apache2 SF www-data __ 0.13 secs Wed Jun 20 03:58 apache2 SF www-data __ 0.13 secs Wed Jun 20 03:59 apache2 SF www-data __ 0.15 secs Wed Jun 20 03:58 apache2 SF www-data __ 0.18 secs Wed Jun 20 03:58 apache2 SF www-data __ 0.07 secs Wed Jun 20 04:21 apache2 SF www-data __ 0.18 secs Wed Jun 20 03:58 apache2 SF www-data __ 0.17 secs Wed Jun 20 03:58 apache2 SF www-data __ 0.30 secs Wed Jun 20 03:58 apache2 SF www-data __ 0.09 secs Wed Jun 20 03:58 apache2 SF www-data __ 0.02 secs Wed Jun 20 04:13

    Read the article

  • Network Restructure Method for Double-NAT network

    - by Adrian
    Due to a series of poor network design decisions (mostly) made many years ago in order to save a few bucks here and there, I have a network that is decidedly sub-optimally architected. I'm looking for suggestions to improve this less-than-pleasant situation. We're a non-profit with a Linux-based IT department and a limited budget. (Note: None of the Windows equipment we have runs does anything that talks to the Internet nor do we have any Windows admins on staff.) Key points: We have a main office and about 12 remote sites that essentially double NAT their subnets with physically-segregated switches. (No VLANing and limited ability to do so with current switches) These locations have a "DMZ" subnet that are NAT'd on an identically assigned 10.0.0/24 subnet at each site. These subnets cannot talk to DMZs at any other location because we don't route them anywhere except between server and adjacent "firewall". Some of these locations have multiple ISP connections (T1, Cable, and/or DSLs) that we manually route using IP Tools in Linux. These firewalls all run on the (10.0.0/24) network and are mostly "pro-sumer" grade firewalls (Linksys, Netgear, etc.) or ISP-provided DSL modems. Connecting these firewalls (via simple unmanaged switches) is one or more servers that must be publically-accessible. Connected to the main office's 10.0.0/24 subnet are servers for email, tele-commuter VPN, remote office VPN server, primary router to the internal 192.168/24 subnets. These have to be access from specific ISP connections based on traffic type and connection source. All our routing is done manually or with OpenVPN route statements Inter-office traffic goes through the OpenVPN service in the main 'Router' server which has it's own NAT'ing involved. Remote sites only have one server installed at each site and cannot afford multiple servers due to budget constraints. These servers are all LTSP servers several 5-20 terminals. The 192.168.2/24 and 192.168.3/24 subnets are mostly but NOT entirely on Cisco 2960 switches that can do VLAN. The remainder are DLink DGS-1248 switches that I am not sure I trust well enough to use with VLANs. There is also some remaining internal concern about VLANs since only the senior networking staff person understands how it works. All regular internet traffic goes through the CentOS 5 router server which in turns NATs the 192.168/24 subnets to the 10.0.0.0/24 subnets according to the manually-configured routing rules that we use to point outbound traffic to the proper internet connection based on '-host' routing statements. I want to simplify this and ready All Of The Things for ESXi virtualization, including these public-facing services. Is there a no- or low-cost solution that would get rid of the Double-NAT and restore a little sanity to this mess so that my future replacement doesn't hunt me down? Basic Diagram for the main office: These are my goals: Public-facing Servers with interfaces on that middle 10.0.0/24 network to be moved in to 192.168.2/24 subnet on ESXi servers. Get rid of the double NAT and get our entire network on one single subnet. My understanding is that this is something we'll need to do under IPv6 anyway, but I think this mess is standing in the way.

    Read the article

  • Not able to connect to a mac client from a windows machine

    - by Manish
    I have a Server.exe file which I use to connect to a mac.(I am fairly confident that server.exe is not buggy ).When i try to do this I get this often cited error "No connection could be made because the target machine actively refused it " I did search some existing questions about this on the forum and it looked like this might be a firewall issue.FWIW I dont have any firewall set on my mac (client) and on my server machine (Windows 7 64 bit ) under the firewall settings I have :- Incoming connections : Block all connections to programs that are not on the list of allowed programs. Active Domain Networks: Same domain as the one which my client is on. Windows Firewire State: Off. Do you think i need to change something here?Can someone help me with next steps?

    Read the article

  • How to use a custom .bashrc file on SSH login

    - by gsingh2011
    I've found that with the new company I'm working with I often have to access linux servers with relatively short lifetimes. On each of these servers I have an account, but whenever a new one is created, I have to go through the hassle of transferring over my .bashrc. It's possible however that in about a months time that server won't be around anymore. I also have to access many other servers for short periods of times (minutes) where it's just not worth it to transfer over my .bashrc but since I'm working on a lot of servers, this adds up to a lot of wasted time. I don't want to change anything on the servers, but I was wondering if there was a way to have a "per-connection" .bashrc, so whenever I would SSH to a server my settings would be used for that session. If this is possible, it would be nice if I could do the same thing with other configuration files, like gitconfig files.

    Read the article

  • Windows Server 2008 R2 DNS - One IP, multiple servers

    - by Blu Dragon
    I need opinions and examples on how to best to accomplish the setup I am looking for. I have a public-facing AD domain server with one public IP address. I have setup an external zone for example.com and I successfully have my own name servers pointing to it at ns0.example.com and ns1.example.com. I also have an internal zone for my private network at home.example.com. I am behind a router with the domain server in the DMZ. I want dev.example.com to be accessible from the outside world over https and to point to internal IP address 192.168.1.78. Likewise, I want www.example.com to be accessible from the outside world and point to internal IP address 192.168.1.79. Both dev and www servers are CentOS 5.6 VMs running inside of Hyper-V on the domain server (bad idea I know but I am limited on hardware atm). What is best way to achieve this? From what I have read and researched on Google, I may need to setup a reverse proxy but I am not sure how well that will work with SSL.

    Read the article

  • Single sign-on for intranet?

    - by Jason Swett
    I'm trying to set up a single sign-on for my intranet. I've found a couple solutions online but I'm not sure if they apply to my particular situation. I have several subdomains on the same server. One level of user should be able to access all subdomains and another level of user should only be able to access some subdomains. Signing into one subdomain should make it so you don't have to log into any others. Can anyone point me in the right direction? I'm on Ubuntu using Apache.

    Read the article

  • sendmail user unknown - debian lenny

    - by Rimian
    My php's mail() function just stopped working a short while ago. It's started returning FALSE. I am not much of a sysadmin so please forgive my ignorance. I set my php.ini send_path option to: "sendmail_path = /usr/sbin/sendmail -t -i" and restarted apache. Then, I learnt how to test sendmail like so: sudo /usr/sbin/sendmail -bv [email protected] [email protected]... deliverable: mailer esmtp, host example.com., user [email protected] The example email is a real mail box. I have also seen unknown user messages in the mail log. Can anyone please help me debug this? Cheers, Rim

    Read the article

  • How do I setup an FTP server on Windows 7?

    - by Matt Frear
    I'm having trouble getting an FTP server setup on Windows 7. I've added the service using Control Panel - Programs - Turn Windows features on and off. I can see the service has started in Control Panel - Services. But then when I fire up a Windows command-line window, cmd, I get Not connected., C:\Users\mattf>ftp localhost ftp> ls Not connected. ftp> open localhost ftp> ls Not connected. ftp> dir Not connected. ftp> quit C:\Users\mattf> And that's as far as I've got. I have no idea why this isn't working - could it be firewall settings?

    Read the article

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