|
From: Dan W. <dw...@ne...> - 2004-04-14 15:45:47
|
I've used the service wrapper to deploy the same java app on windows, linux, and solaris. I am now moving it over to Mac OS X. I'm having a problem with the startup script that resides in the bin directory of the service wrapper deployment hierarchy. From a terminal window in OS X (Panther 10.3.3) , trying to start the script gets an error: -bash: ./taskserver: cannot execute binary file This is the exact same script that I use on all the other platforms. The strange thing is that if I copy the contents of the script into a fresh text file and save it, then I can run the copied script just fine. So that makes me think that the contents of the script file are fine, but there is something missing or wrong about the metadata for the script file. Has anyone else run into this? thanks. Dan Weston |
|
From: Leif M. <le...@ta...> - 2004-04-14 16:19:46
|
Dan,
I have seen similar problems on Linux when the shell script is
transferred from a
Windows machine with incorrect line feeds. Are you sure that the line
feeds are
correct for the Mac OS X platform?
The Mac OS X distribution is currently shipping with standard LF (UNIX)
line feeds. Is this correct for OS X? I don't have any OSX systems to
play with
myself. I know that old Mac systems used CR line feeds??
Cheers
Leif
Dan Weston wrote:
> I've used the service wrapper to deploy the same java app on windows,
> linux, and solaris. I am now moving it over to Mac OS X. I'm having a
> problem with the startup script that resides in the bin directory of
> the service wrapper deployment hierarchy. From a terminal window in OS
> X (Panther 10.3.3) , trying to start the script gets an error:
>
> -bash: ./taskserver: cannot execute binary file
>
> This is the exact same script that I use on all the other platforms.
> The strange thing is that if I copy the contents of the script into a
> fresh text file and save it, then I can run the copied script just
> fine. So that makes me think that the contents of the script file are
> fine, but there is something missing or wrong about the metadata for
> the script file.
>
> Has anyone else run into this?
>
> thanks.
>
> Dan Weston
|
|
From: Andy B. <aba...@ca...> - 2004-04-14 16:28:39
|
I use the service wrapper on Linux, Solaris, and Mac OS X. My first thought is that it is a line-terminator issue. I use VIM for editing from the terminal. If I open a working shell script and issue the command ":set fileformat?" and it shows "unix", then I know the script will work. % ./test-unix.sh Hello World However, if the fileformat is reported as "dos", then executing the script produces this message: % ./test-dos.sh tcsh: ./test-dos.sh: Command not found. In bash I get a different error message: bash-2.05b$ ./test-dos.sh : bad interpreter: No such file or directory In the case of scripts with a fileformat of "dos", I just edit them with VIM and issue the command "set fileformat=unix" and then save the file. After that it works. --- Andy Barnett <aba...@ca...> Cantilever Technologies --- On Apr 14, 2004, at 10:45 AM, Dan Weston wrote: > I've used the service wrapper to deploy the same java app on windows, > linux, and solaris. I am now moving it over to Mac OS X. I'm having a > problem with the startup script that resides in the bin directory of > the service wrapper deployment hierarchy. From a terminal window in OS > X (Panther 10.3.3) , trying to start the script gets an error: > > -bash: ./taskserver: cannot execute binary file > > This is the exact same script that I use on all the other platforms. > The strange thing is that if I copy the contents of the script into a > fresh text file and save it, then I can run the copied script just > fine. So that makes me think that the contents of the script file are > fine, but there is something missing or wrong about the metadata for > the script file. > > Has anyone else run into this? > > thanks. > > Dan Weston > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |
|
From: Andy B. <aba...@ca...> - 2004-04-14 16:37:18
|
I just realized that if I try to execute the binary wrapper executable rather than the shell script I get the same message you saw: > bash-2.05b$ file * > wrapper-linux: ELF 32-bit LSB executable, Intel 80386, version 1 > (SYSV) > wrapper-macosx: Mach-O executable ppc > bash-2.05b$ ./wrapper-linux > bash: ./wrapper-linux: cannot execute binary file > bash-2.05b$ ./wrapper-macosx > Usage: ./wrapper-macosx <file> [configuration properties] [...] Is it possible you accidently copied the binary file instead of the shell script and you are now trying to execute the binary file rather than the shell script? --- Andy Barnett <aba...@ca...> Cantilever Technologies --- On Apr 14, 2004, at 10:45 AM, Dan Weston wrote: > I've used the service wrapper to deploy the same java app on windows, > linux, and solaris. I am now moving it over to Mac OS X. I'm having a > problem with the startup script that resides in the bin directory of > the service wrapper deployment hierarchy. From a terminal window in OS > X (Panther 10.3.3) , trying to start the script gets an error: > > -bash: ./taskserver: cannot execute binary file > > This is the exact same script that I use on all the other platforms. > The strange thing is that if I copy the contents of the script into a > fresh text file and save it, then I can run the copied script just > fine. So that makes me think that the contents of the script file are > fine, but there is something missing or wrong about the metadata for > the script file. > > Has anyone else run into this? > > thanks. > > Dan Weston |
|
From: Dan W. <dw...@ne...> - 2004-04-14 17:15:42
|
I double-checked the script file again on the Mac. It has unix line termination. It is not a binary file, I can open it with VIM or bbedit. I can also run the mac version of the wrapper executable, as you did below, and also the realpath executable. I'm stumped. I can get it to work by copying the contents of the file and pasting into a new file, but not by doing a save-as on the file that doesn't work. This is probably a weird problem with my particular script, maybe it has a bad byte in it or something... I was hoping to use the same script file for all my target platforms - windows, linux, solaris, and Mac. I guess I'll take the file that works on the mac now and see if it works on the other platforms. thanks. Dan Weston On Apr 14, 2004, at 9:37 AM, Andy Barnett wrote: > I just realized that if I try to execute the binary wrapper executable > rather than the shell script I get the same message you saw: > >> bash-2.05b$ file * >> wrapper-linux: ELF 32-bit LSB executable, Intel 80386, version 1 >> (SYSV) >> wrapper-macosx: Mach-O executable ppc > >> bash-2.05b$ ./wrapper-linux >> bash: ./wrapper-linux: cannot execute binary file > >> bash-2.05b$ ./wrapper-macosx >> Usage: ./wrapper-macosx <file> [configuration properties] [...] > > Is it possible you accidently copied the binary file instead of the > shell script and you are now trying to execute the binary file rather > than the shell script? > > --- > Andy Barnett <aba...@ca...> > Cantilever Technologies > --- > > On Apr 14, 2004, at 10:45 AM, Dan Weston wrote: > >> I've used the service wrapper to deploy the same java app on windows, >> linux, and solaris. I am now moving it over to Mac OS X. I'm having a >> problem with the startup script that resides in the bin directory of >> the service wrapper deployment hierarchy. From a terminal window in >> OS X (Panther 10.3.3) , trying to start the script gets an error: >> >> -bash: ./taskserver: cannot execute binary file >> >> This is the exact same script that I use on all the other platforms. >> The strange thing is that if I copy the contents of the script into a >> fresh text file and save it, then I can run the copied script just >> fine. So that makes me think that the contents of the script file are >> fine, but there is something missing or wrong about the metadata for >> the script file. >> >> Has anyone else run into this? >> >> thanks. >> >> Dan Weston > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |