Smbclient works but mount_smbfs fails

I am running across a rather strange issue with a Zonet NAS I recently purchased.  The device shares files via FTP and SMB over the network.  I have an iMac running Lion and a Macbook Pro running Snow Leopard.  I can connect just fine from the iMac but not from the Macbook Pro using the Go -> Connect to Server menu in Finder.
From the Macbook I always receive an authentication error regardless of the account I use.  From the iMac the exact same parameters work fine.
I tried some commandline utilities from the Macbook Pro.  smbclient works fine.  So the command:
smbclient //10.0.0.50/photoshare -U alext
works fine, it prompts me for the password and gives me a command line session where I can transfer files.
However the command:
mount_smbfs //[email protected]/photoshare /Volumes/photoshare
always returns the error:
mount_smbfs: server rejected the connection: Authentication error
This is very puzzling.  There must be something strange with my SMB client on the Macbook but I have no idea what is going on.  Any ideas would be appreciated.

'VPN for pizza money' - it would be great, but I am afraid the /City/District is administrated on / level, which be a Country in this terminology.
'Ask him to look at your settings' - When I asked what settings should be he sent me the screen shots of his settings. So in fact I know as much as he does. He uses Windows, and Win2Win mount works on the LAN. NOTE AGAIN - smbclient works when I connet via VPN, so I have no rights to complain to the admin. Could it be that ether Finder or OS X does not understand that the only thing I can do with /City folder is to 'cd District'?
'mac's IP address...192.168.1...something' - yes, when connected via VPN I can either get automatically 192.168.100.something IP or select manually (works too, I took 192.168.200.something).
'SystemPreferences>Network. Click on the dot-in-the-list labeled VPN' - yes, ther is place for DNS. It works fine. I just think it is Network panel, network interface properties. Other network interfaces are Ethernet and AirPort, also with DNS settings on there own. No place for configurations in Internet Connect - VPN(PPTP) - Edit Configurations ...
'SMB/CIFS configuration in your mac's DirectoryAccess' - settings are correct - WORKGROUP and blank for WINS. It asked me for the WORKGROUP/User/Password on first attempt to mount smb from Finder 'Connect to Server'. However, it never asked again.

Similar Messages

  • Smbclient works but mount fails in Finder and Terminal (VPN) - why?

    I have a Windows(2003SP2) file server within some LAN with IP 192.168.10.10 and with shared folder structure like
    /Sity/District/
    I am authorised to connect to this LAN over VPN (it works) and to connect to /Sity, but I am authorized only to see and modify files within /District folder.
    With the command
    'smbclient -U username //192.168.10.10/Sity'
    in Terminal I can connect to the server and e.g. cd to District or get all the files from /Sity/District/. However, neither mount_smbfs in Terminal nor Connect to Server in Finder can mount the share - error is
    mount_smbfs: negotiate phase failed: syserr = Connection refused,
    I also tried different options for mount_smbfs like '-I' with no result.
    Finder 'Connect to server' complain about the username and the password.
    'could not connect to the server because the name or password is not correct'
    The /etc/nsmb.conf has the following structure
    [default]
    minauth=none
    Is there a way to mount such share?

    'VPN for pizza money' - it would be great, but I am afraid the /City/District is administrated on / level, which be a Country in this terminology.
    'Ask him to look at your settings' - When I asked what settings should be he sent me the screen shots of his settings. So in fact I know as much as he does. He uses Windows, and Win2Win mount works on the LAN. NOTE AGAIN - smbclient works when I connet via VPN, so I have no rights to complain to the admin. Could it be that ether Finder or OS X does not understand that the only thing I can do with /City folder is to 'cd District'?
    'mac's IP address...192.168.1...something' - yes, when connected via VPN I can either get automatically 192.168.100.something IP or select manually (works too, I took 192.168.200.something).
    'SystemPreferences>Network. Click on the dot-in-the-list labeled VPN' - yes, ther is place for DNS. It works fine. I just think it is Network panel, network interface properties. Other network interfaces are Ethernet and AirPort, also with DNS settings on there own. No place for configurations in Internet Connect - VPN(PPTP) - Edit Configurations ...
    'SMB/CIFS configuration in your mac's DirectoryAccess' - settings are correct - WORKGROUP and blank for WINS. It asked me for the WORKGROUP/User/Password on first attempt to mount smb from Finder 'Connect to Server'. However, it never asked again.

  • SMTP works, but POP3 fails

    I've been a Thunderbird user for around 8-10 years now, and I use it with multiple email accounts. I've run into a configuration issue I've never seen before, and I cannot find a solution (so far).
    I changed my broadband ISP from Comcast to Frontier. With Frontier, of course, I get an email account. I can access and use the account just fine via webmail. However, when I manually configure in Thunderbird (autoconfigure produces the wrong settings), password authentication fails,
    When I try Advanced Configuration, SMTP works, but POP3 fails.
    I contacted Frontier support to verify the correct settings. They are as follow:
    POP3: pop3.frontier.com, SSL/TLS, Port 995
    SMTP: smtp.frontier.com, SSL/TLS, Port 465
    I'm using full email address for the user name. He double-checked the password on the POP3 server, and it's correct. I also disabled my firewall, but it didn't help.
    I'm perplexed as to why SMTP should work but not POP3.
    They do not support IMAP.
    Any ideas, anyone?

    SMTP works but pop fails:
    so you can send but not receive?
    Please provide info:
    Help > Troubleshooting Information
    click on 'Copy text to clipboard'
    paste info into this forum question
    you can edit/remove all info on fonts and printers but nothing else.
    When you try to Get Messages, do you get an error message?
    If yes, what does it say...word for word?

  • Almost got VPN to work, but Auth failing?

    Hi,
    I almost got VPN to work, but I have one last error. Here is, what I did so far:
    1.) Configured VPN via Server app
    2.) Enabled PPTP like described in Apple support doc
    3.) VPN Server is reachable within my home network
    4.) VPN Server is reachable from outside my home network
    I'd be more than happy if anyone could provide me with some hints on how to fix either of the following two errors
    When I try to connect via L2TP (From in- or outside the network), I get the following error:
    Aug 29 22:42:17 server racoon[164]: Connecting.
    Aug 29 22:42:17 server racoon[164]: IPSec Phase1 started (Initiated by peer).
    Aug 29 22:42:17 server racoon[164]: IKE Packet: receive success. (Responder, Main-Mode message 1).
    Aug 29 22:42:17 server racoon[164]: IKE Packet: transmit success. (Responder, Main-Mode message 2).
    Aug 29 22:42:17 server racoon[164]: IKE Packet: receive success. (Responder, Main-Mode message 3).
    Aug 29 22:42:17 server racoon[164]: IKE Packet: transmit success. (Responder, Main-Mode message 4).
    Aug 29 22:42:17 server racoon[164]: IKE Packet: receive failed. (Responder, Main-Mode Message 5).
    Aug 29 22:42:20 server racoon[164]: IKE Packet: transmit success. (Phase1 Retransmit).
    Aug 29 22:42:20 server racoon[164]: IKE Packet: receive failed. (Responder, Main-Mode Message 5).
    Aug 29 22:42:23: --- last message repeated 1 time ---
    Aug 29 22:42:23 server racoon[164]: IKE Packet: transmit success. (Phase1 Retransmit).
    Aug 29 22:42:23 server racoon[164]: IKE Packet: receive failed. (Responder, Main-Mode Message 5).
    Aug 29 22:42:26: --- last message repeated 1 time ---
    Aug 29 22:42:26 server racoon[164]: IKE Packet: transmit success. (Phase1 Retransmit).
    Aug 29 22:42:26 server racoon[164]: IKE Packet: receive failed. (Responder, Main-Mode Message 5).
    Aug 29 22:42:38: --- last message repeated 1 time ---
    Aug 29 22:42:38 server racoon[164]: IKE Packet: transmit success. (Phase1 Retransmit).
    Aug 29 22:42:38 server racoon[164]: IKE Packet: receive failed. (Responder, Main-Mode Message 5).
    However, when I try to connect via PPTP (no matter if from in- or outside my network), I see the following error:
    Aug 29 22:27:18 server pppd[16843]: The remote system is required to authenticate itself
    Aug 29 22:27:18 server pppd[16843]: but I couldn't find any suitable secret (password) for it to use to do so.
    Aug 29 22:27:18 server vpnd[16413]:    --> Client with address = 192.168.1.226 has hungup

    I have not yet tried the VPN server in Lion, but I would normally associate IKE traffic with L2TP style VPN connections and not PPTP connections. This might indicate the remote client is trying to make an L2TP connection and you have not yet setup that properly with the same shared secret password at both ends (this different the actual users login password).
    Or of course you can correct the remote client and set it to use PPTP.

  • Authentication with App Service Gateway worked, but now fails

    So I was trying to authenticate my app with the App Service gateway so that I can access my locked down Api App. I have set up identity providers for both Google and Microsoft, and all was working wonderfully. I was making some tweaks with how I was handling
    the authentication token, so I was hitting the authentication code 3-4 time a minute. Everything was great until suddenly the web page stopped opening up.
    I did some digging and it seems that the gateway simply cannot handle my requests anymore. I am now getting 500 responses and the streaming logs for the gateway host web app spat out an IIS error page that I've pasted at the end here... To me the
    error looks like it's coming from the gateway code. So what is going on? I've tried restarting both the gateway and the host for the gateway, I've tried changing the pricing tier to a non-shared plan in case something on the machine was crashing, and
    I've tried accessing the /signin-google page on both my mobile app and desktop browser (both fail with 500). I assume that recreating the entire resource group and associated gateway would solve the problem, but I don't know that this won't happen again. So
    any tips you have would be appreciated, thanks.
    IIS Error page:
    HTTP Error 500.0 - Internal Server Error
    The page cannot be displayed because an internal server error has occurred.
    Most likely causes:
    IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
    IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
    IIS was not able to process configuration for the Web site or application.
    The authenticated user does not have permission to use this DLL.
    The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.
    Things you can try:
    Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account.
    Check the event logs to see if any additional information was logged.
    Verify the permissions for the DLL.
    Install the .NET Extensibility feature if the request is mapped to a managed handler.
    Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click
    here.
    Detailed Error Information:
    Module
       __DynamicModule_Microsoft.Owin.Host.SystemWeb.OwinHttpModule, Microsoft.Owin.Host.SystemWeb, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_63ffbacd-0ee6-4727-806c-1c01b9b82249
    Notification
       MapRequestHandler
    Handler
       ExtensionlessUrlHandler-Integrated-4.0
    Error Code
       0x00000000
    Requested URL
       https://chipexchangeresources8ff2d21b21f84262ae5c1b3af4dc04ca:80/signin-microsoft
    Physical Path
       D:\Program Files (x86)\SiteExtensions\ApiAppsGateway\0.9.29\signin-microsoft
    Logon Method
       Anonymous
    Logon User
       Anonymous
    More Information:
    This error means that there was a problem while processing the request. The request was received by the Web server, but during processing a fatal error occurred, causing the 500 error.
    View more information »
    Microsoft Knowledge Base Articles:

    No, it wasn't anything to do with Insights. Actually coming back after a weekend cleared my mind enough for me to spot my foolish error. It turns out I had accidentally switched the login and redirect urls,
    From
    Login: <gatewayurl>/login/google
    Redirect: <gatewayurl>/signin-google
    To
    Login: <gatewayurl>/signin-google
    Redirect: <gatewayurl>/login/google
    I just didn't notice at the time because /signin-google looks like a signin url rather than a redirect one. As soon as I switched back to using the /login/google one everything is back to working smoothly. Sorry for the false alarm, but as a side note I
    don't think the gateway should be throwing an exception if there is no auth token.

  • DB link working but tnsping fails,how?

    Hi
    I have DB link defined in Oracle EBS DB 10.2.0.3. When i query the table using db link, it is working. But tnsping is failing with this error --TNS-12535: TNS:operation timed out. When the network is not established between our oracle server and SQL server database, how come the DB links works?
    Any help highly appreciated.
    Regards

    Hi
    We have 3 different servers for the DB links. When i was querying with one of our data center server (network ok), it is ok. But the other two servers it is failing. Sorry, mistaken.
    Regards

  • SocketConnection works, but HttpConnection fails?

    I have a MIDlet that connects to a website (via HttpConnection), retrieves an IP adress from a text file, and then connects to that IP adress via a SocketConnection.
    On the emulator everything works fine. The problem occurs when I test the MIDlet on my Motorola v3x.
    If I don't retrieve the IP from a HTTP location, but just hardcode it, everything works fine. The socket is established and the application works perfectly. However, when I do try to retrieve the text file, the execution gets stuck on httpconnection.openInputStream() .
    I tried to connect to the website via a socket on port 80, but it seems that this access method is restricted.
    Here is the code:
    public boolean connect (){
            try{
                String resp = "", ip, req;
                byte [] buf = new byte [1024];
                HttpConnection tmp;
                InputStream in;
                try{
                    //Connect to a website and retrieve the IP of the server
                    tmp = (HttpConnection)Connector.open("http://my-website.com/addr.txt");
                    in = tmp.openInputStream();  //GETS STUCK HERE
                    try{
                        while (in.read(buf,0,1023)>0){
                            resp += new String (buf);
                    }catch (Exception e){
                        //Connection closed?
                    in.close();
                    tmp.close();
                    if (resp.length() < 20){ //A good response has to be larger than that...
                        return false;
                    ip = resp.substring(resp.indexOf("<ip>")+4, resp.indexOf("</ip>")); //XML-like
                    if (ip.length()<8){
                        return false;
                }catch (Exception e){
                    return false; //Connection failed
                //sock, sIn, sOut - class members
                sock = (SocketConnection)Connector.open("socket://"+ip+":1333"); //Connect to server on port 1333
                sIn = sock.openInputStream();
                sOut = sock.openOutputStream();
                return true;
            }catch (Exception ex){
                return false; //Connection failed
        }Please help, I'm really lost here.
    P.S.
    The IP adress that I'm trying to retrieve is dynamic, so I can't actually hardcode it in to the application. I must get it from the web site.

    - Some operators use HTTP accelerators in their networks, and the application doesn't cope with those response codes. The HTTP accelerator intercepts all external HTTP requests and immediately responds with a Redirect response (Code 3xx). If the application regards any response code other than 200 OK as an error, then the application fails in this case. Developers needs to handle redirect response codes in their application.
    - Some other manufacturer implementations enable a "piggy back" approach to HTTP through a WAP connection rather than a pure HTTP connection. Some Motorola handsets may require you to use a pure HTTP connection and may not support HTTP over WAP. This is why HTTP may work on other devices but not some Motorola devices - in this instance often an IOException will be returned as the error condition.
    - The carrier must have a GPRS APN that allows HTTP traffic to connect through their network in order for the connection to be sucessful.
    Confirm from the service provider
    - Is the GPRS APN open for pure HTTP Protocol communication not just WAP?
    Check on the Motorola Device :
    - Do you have a menu item on the device that is called "Web Session"? Some carriers disable this feature. If enabled this will allow you to specify more than one web connectivity session.
    - If the "Web Session" menu item is present, do you have details of the HTTP APN from your carrier? If yes then please create a new Web Session called "Java Session" [case sensitive] as per the details available from carrier. Retry the MIDlet with this Web Session profile set.
    If the Web Session menu item is not present and the carrier states that pure HTTP protocol connectivity through their GPRS TCP/IP network is disabled then the problems will occur with connectivtiy.
    HttpConnection in motorola doesnt return -1 if the Stream size is unknown..
    try {
    c = (StreamConnection)Connector.open(url);
    if (c instanceof HttpConnection) {
    // open it nicely
    HttpConnection http = (HttpConnection)c;
    // cast it to get at the extra methods
    if (http.getResponseCode() != HttpConnection.HTTP_OK) {
    // err ...
    } else {
    int len = (int) http.getLength();
    s = c.openInputStream();
    if (len == -1) {
    // unknown length?
    // read until .read() returns -1
    int ch;
    while((ch = s.read()) ! = -1) {
    b.append((char) ch);
    } else {
    // known length
    for (int i=0; i <len; i++)="i++)" {
    b.append((char) s.read());
    } else {
    s = c.openInputStream();
    int ch;
    while((ch = s.read()) != -1)
    b.append((char) ch);
    myBuffer.insert(b.toString(), 0);
    } finally.....

  • Full load works, but delta fails - "Error in the Extractor"

    Good morning,
    We are using datasource 3FI_SL_ZZ_SI (Special Ledger line items) to load a cube, and are having trouble with the delta loads.  If I run a full load, everything runs fine.  If I run a delta load, it will initially fail with an error that simply states "Error in the Extractor" (no long text).  If I repeat the delta load, it completes successfully with 0 records returned.  If I then rerun the delta, I get the error again.
    I've run extractions using RSA3, but they work fine - as I would expect since the full loads work.  Unfortunately, I have not been able to find why the deltas aren't working.  After searching the Forums, I've tried replicating the datasource, checked the job log in R/3 (nothing), and run the program RS_TRANSTRU_ACTIVATE_ALL, all to no avail.
    Any ideas?
    Thanks
    We're running BW 3.5, R/3 4.71

    And it's just that easy....
    Yes, it appears this is what the problem was.  I'd been running the delta init without data transfer, and it was failing during the first true delta run.  Once I changed the delta init so that it transferred data, the deltas worked fine.  This was in our development system.  I took a look in our production system where deltas have been running for quite some time, and it turns out the delta initialization there was done with data transfer. 
    Thank you very much!

  • Directly printing works - but viewer fails with an error

    Hey,
    we are using: Crystal Reports 2011 and runtime for VS2010.
    I open and print my reports via c#. The directly printing works fine. But the viewer don't works. It's really crazy, because directly printing and viewing are using the same methods for database login etc.
    At preview a form with the crystalreportsviewer will be opened and the reportsource is being set. After that the viewer shows the progress box. After a short while the progress box disappears and the following error is shown:
    Crystal Report Windows Forms Viewer
    Die Abfragen zum Abrufen der für diesen Bericht erforderlichen Daten können nicht ermittelt werden.
    Daten konnten nicht aus Datenbank abgerufen werden.
    Fehler in der Datei CS_201001_u {5BF5FF1B-C662-4A1E-80CA-B4BEB0124295}.rpt:
    Daten konnten nicht aus Datenbank abgerufen werden.
    OK  
    Translated in english:
    Crystal Report Windows Forms Viewer
    The queries to retrieve the required data for this report can not be determined.
    Fehler in der Datei CS_201001_u {5BF5FF1B-C662-4A1E-80CA-B4BEB0124295}.rpt:
    Data could not be retrieved from database.
    OK  
    But the database logon methods etc. are all the same as at directly printing. What could it be?
                this.crystalReportViewer.ShowPrintButton = false;
                this.crystalReportViewer.ReportSource = pMainCRWReport;
                this.crystalReportViewer.ShowProgressAnimation(this._DruckOptionen.ShowDruckstatus);
                if (pPreviewOptions.Zoomlevel == 1 || pPreviewOptions.Zoomlevel == 2 ||
                    (pPreviewOptions.Zoomlevel >= 25 && pPreviewOptions.Zoomlevel <= 400))
                    this.crystalReportViewer.Zoom(pPreviewOptions.Zoomlevel);
                                pMainCRWReport.PrintToPrinter(pReport.Druckoptionen.AnzahlKopien,
                                                              pReport.Druckoptionen.KopieSeitenSortiert,
                                                              pReport.Druckoptionen.StartPage,
                                                              pReport.Druckoptionen.EndPage);
    pMainCRWReport is ReportDocument.

    Yes, it looks like that. I don't use postbacks or sessions.
    I have inserted the following code just before the ReportSource of the viewer will be set.
    ReportDocument doc = (ReportDocument)pMainCRWReport;
    foreach (Table table in doc.Database.Tables)
           MessageBox.Show(string.Format("{0}: {1}", table.Name, table.TestConnectivity().ToString()));
    All TestConnectivity returning true!
    CrystalDecisions.CrystalReports.Engine.InternalException: Daten konnten nicht aus Datenbank abgerufen werden.
    Details:  Datenbankanbietercode: -243
    Daten konnten nicht aus Datenbank abgerufen werden.
    Fehler in der Datei CS_201001_u {870C483C-D947-4FEA-A1C6-1AD0DC4A2805}.rpt:
    Daten konnten nicht aus Datenbank abgerufen werden.
    Details:  Datenbankanbietercode: -243 ---> System.Runtime.InteropServices.COMException (0x800002D3): Daten konnten nicht aus Datenbank abgerufen werden.
    Details:  Datenbankanbietercode: -243
    Daten konnten nicht aus Datenbank abgerufen werden.
    Fehler in der Datei CS_201001_u {870C483C-D947-4FEA-A1C6-1AD0DC4A2805}.rpt:
    Daten konnten nicht aus Datenbank abgerufen werden.
    Details:  Datenbankanbietercode: -243
       bei CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.GetPage(PageRequestContext pPageRequestContext)
       bei CrystalDecisions.ReportSource.EromReportSourceBase.GetPage(PageRequestContext pageReqContext)
       --- Ende der internen Ausnahmestapelüberwachung ---
       bei CrystalDecisions.Windows.Forms.ReportDocumentBase.GetPage(Int32 pageN)
       bei CrystalDecisions.Windows.Forms.DocumentControl.ShowNthPage(Int32 PageNumber)
       bei CrystalDecisions.Windows.Forms.DocumentControl.ShowFirstPage()
       bei CrystalDecisions.Windows.Forms.PageView.ShowFirstPageEx()/
    OK  
    The error -243 is an informix error:
    Could not position within a table table-name.
    The database server cannot set the file position to a particular row within the file that represents a table. Check the accompanying ISAM error code for more information. A hardware error might have occurred, or the table or index might have been corrupted (truncated). Unless the ISAM error code or an operating-system message points to another cause, run the oncheck utility (secheck with IBM Informix SE or tbcheck with IBM Informix OnLine) to check and repair table and index.
    It seems to be that the viewer can't read the records with are locked within a transaction. I don't understand why the direct printing works. Is it possible to set the ISOLATION LEVEL for the report database connections?
    I have tried this note but it don't works.

  • AirDrop sometimes works but mostly fails.

    AirDrop under 10.7.2 usually -- but NOT always -- failed, and now under 10.7.3 it has not succeeded even once.  The message is that the Apple ID of the receiver is wrong (but it's not) or that the receiver has failed to respond (but no opportunity to respond has arisen).  How can a plug-and-play feature be such a dud?
         -- Rob

    AirDrop under 10.7.2 usually -- but NOT always -- failed, and now under 10.7.3 it has not succeeded even once.  The message is that the Apple ID of the receiver is wrong (but it's not) or that the receiver has failed to respond (but no opportunity to respond has arisen).  How can a plug-and-play feature be such a dud?
         -- Rob

  • My upgrade to iphone software seemed to work but restore failed (1602)- now phone no longer recognised by itunes and itunes only offers restore to factory settings and warns that this will remove all data- also phone is in restore mode- unusable

    so I did the  itunes upgrade to 10.5.1 and then teh iphone 4 needed to b e upgraded to new ios5.1 - seemed to go all the way through, and the final restore seemed to fail. Now the phone is no longer recognised as personalised, just as iphone. Also  i cannot restore from backup, only restore factory settings and i am warned that I will lose all data. Can I force a restore from back up?  can I guaruntee that I can keep data from backups??

    Same with me. Anyone have an answer??

  • Can't use Quartz on phone, compile works but build fails..what am I missing

    Just simple lines like...
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextSetRGBStrokeColor(context, 1.0, 1.0, 1.0, 1.0);
    CGContextSetLineWidth(context, 2.0);
    fail when I try to run it.
    Linking....
    "_CGContextSetLineWidth", referenced from:

    Exactly.
    Just in case you're not sure how to do this.
    Expand "Targets" in Xcode and double click your app name.
    Click the '+' button at the bottom under Linked Libraries and add "QuartzCore.framework"

  • GetResource works but getResources fails??

    In the code below, I try to get the resource of a manifest. Using getResource (singular), I get a URL for rt.jar from the JDK. However, using getResources (plural), I get an empty enumeration. I'd think I should at least get an Enumeration with the same URL I get from getResource. And I know the .jar from which I executed the program has a manifest also.
    Any idea why this is happening?
    More generally, the problem I'm trying to solve is getting the manifest of the application .jar file used to run the program via "java -jar app.jar". Without specifying a parameter to the program, how can I find out which .jar was the application .jar file so that I can then get its manifest?
    Thanks,
    Donnie
        URL mf = MyClass.class.getResource(
            "/META-INF/MANIFEST.MF");
        System.out.println("Manifest URL: " + mf.toString());
        Enumeration manifests =
            MyClass.class.getClassLoader().getResources(
                "/META-INF/MANIFEST.MF");
        while (manifests.hasMoreElements())
            mf = (URL) manifests.nextElement();
            System.out.println("Manifest URL: " +
                mf.toString());

    (answering his own question :)
    The issue has to do with the fact that while Class has a "getResource" method, it does not have a "getResources" (plural) method. So I had to use Class.getClassLoader().getResources().
    It's hinted at in the docs for Class.getResource, but that method likes a "/" at the beginning of the String it gets; while ClassLoader.getResource and .getResources do not. In my example, if I use "META-INF/MANIFEST.MF" (note the lack of a preceding '/'), then getResources succeeds.
    I'd say either Class needs to add a getResources method that has the same semantics as Class.getResource so things are symmetric. A little more documentation on this in Class.getResource and ClassLoader.getResource(s) would be nice too.
    Donnie

  • Nslookup works but ping fails

    Hi,
    I am trying to ping one of my server using hostname it throws "unknown host" but i can do nslookup for the same server . Kindly rectify to solve this issue
    Regards
    Siva

    nslookup (i.e "name server lookup") uses DNS name servers in /etc/resolv.conf.
    ping is more general- it checks the "hosts" line in /etc/nsswitch.conf to see how it should resolve files- possible mechanisms include dns, nis, files and ldap. typically when you configure a solaris system as a NIS or LDAP client , that entry willl be missing the "hosts. ... dns" entry
    Sample filea are provided on the server
    # cd /etc
    ls | grep nsswitch
    nsswitch.conf
    nsswitch.dns
    nsswitch.files
    nsswitch.ldap
    nsswitch.nis
    nsswitch.nisplus
    My nsswitch.conf file includes
    # grep hosts /etc/nsswitch.conf
    # "hosts:" and "services:" in this file are used only if the
    #hosts: ldap [NOTFOUND=return] files
    hosts: dns files ldap
    # before searching the hosts databases.
    Most name server info is in DNS, a few things are in local hosts (mostly the names and ip's for the server itself as well as the a few key local servers that need to be accessible when the system is starting up) and I don't rely on LDAP for host info.
    You may want to have files before DNS....
    hosts: files dns

  • My IPhone all of a sudden pops up saying sim card failed. I turn it off and turn it back on and it works but the next day it happens again. what do you think is wrong with it?

    My IPhone all of a sudden pops up saying sim card failed. I turn it off and turn it back on and it works but the next day it happens again. what do you think is wrong with it?

    Hello brittbend
    Check out the article to further troubleshoot your SIM card issues with your iPhone.
    iPhone: Troubleshooting No SIM
    http://support.apple.com/kb/TS4148
    Regards,
    -Norm G.

Maybe you are looking for

  • Reimport image after modifying in Photoshop CC from Lightroom 5.3

    Tilla week ago I used to work on a PC. When modifying an image from Lightroom into Photoshop 6 the image was automatically reimported in the origin folder, I am now on a MacPro and when I modify an image in Photoshop CC from Lightroom 5.3 it reimport

  • Transfer of an exisisting windows liscence to new iMac

    I have bought an new Apple iMac and I would like to transfer my exisiting windows-liscence for Adobe Premiere elements to iMac.

  • PHP over ORACLE DATABASE

    i'm only new to ORACLE database How can I integrate the oracle database into my PHP Program?? Who one can help... i'm very thank s,,,

  • McAfee Security - Antivirus programme as supplied ...

    In Issue 415 (22nd Jan - 4th Feb 2014) of Computer Active, a test was made on a number of Antivirus programmes both paid-for and free. In their opinion Kaspersky Internet Security 2014 came top, 2nd place went to ESET Smart Security 7, 3rd was Norton

  • Business Objects Problems

    We've had a problem crop up in which Business Objects fails to function with increasing frequency. Stopping and restarting the service does no good, but rebooting the server gets in going again. A couple of months ago this was happening about every t