Quantcast

SASL problem

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

SASL problem

Carlo Bertoldi-2
Hello everybody,
  I'm trying to launch my application using heart. This is the script
I'm using:

#!/bin/bash

EBIN_PATH=/home/itadm/prototipo_mps/ebin
LOG_FILE=/home/itadm/erlang/log/sonda.log
ERL=/usr/bin/erl
NODE_NAME=sonda

$ERL -sname $NODE_NAME -heart -pa $EBIN_PATH -boot start_sasl -sasl
sasl_error_logger "{file,
\"/home/itadm/erlang/log/prototipo_mps_sasl.log\"}" -noshell -eval
"application:start(prototipo_mps)." 2>&1 > $LOG_FILE &


The application starts, but in the log I've got this error, and I can
see that the sasl keeps restarting.


=ERROR REPORT==== 30-Jun-2011::15:36:46 ===
application_controller: syntax error before: '/': {file,
/home/itadm/erlang/log/prototipo_mps_sasl.log}
{"init terminating in do_boot",{error,'Bad environment variable: "{file,
/home/itadm/erlang/log/prototipo_mps_sasl.log}"  Application: sasl'}}


=erl_crash_dump:0.1
Thu Jun 30 15:52:32 2011
Slogan: Kernel pid terminated (application_controller)
({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})
System version: Erlang R14A (erts-5.8) [source] [64-bit] [smp:4:4]
[rq:4] [async-threads:0] [kernel-poll:false]

If I launch the application using the shell, it works as expected. Any
suggestions?
Thanks,
  Carlo

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: SASL problem

Siri Hansen
Hi Carlo!

Your script works for me, but it seems from the error report that the double quotes around the log file path have disappeared in your case. You could try to increase the number of backslashes - e.g. to three:

... -sasl sasl_error_logger "{file, \\\"/home/itadm/erlang/log/prototipo_mps_sasl.log\\\"}" ...

Regards
/siri


2011/6/30 Carlo Bertoldi <[hidden email]>
Hello everybody,
 I'm trying to launch my application using heart. This is the script I'm using:

#!/bin/bash

EBIN_PATH=/home/itadm/prototipo_mps/ebin
LOG_FILE=/home/itadm/erlang/log/sonda.log
ERL=/usr/bin/erl
NODE_NAME=sonda

$ERL -sname $NODE_NAME -heart -pa $EBIN_PATH -boot start_sasl -sasl sasl_error_logger "{file, \"/home/itadm/erlang/log/prototipo_mps_sasl.log\"}" -noshell -eval "application:start(prototipo_mps)." 2>&1 > $LOG_FILE &


The application starts, but in the log I've got this error, and I can see that the sasl keeps restarting.


=ERROR REPORT==== 30-Jun-2011::15:36:46 ===
application_controller: syntax error before: '/': {file, /home/itadm/erlang/log/prototipo_mps_sasl.log}
{"init terminating in do_boot",{error,'Bad environment variable: "{file, /home/itadm/erlang/log/prototipo_mps_sasl.log}"  Application: sasl'}}


=erl_crash_dump:0.1
Thu Jun 30 15:52:32 2011
Slogan: Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})
System version: Erlang R14A (erts-5.8) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:0] [kernel-poll:false]

If I launch the application using the shell, it works as expected. Any suggestions?
Thanks,
 Carlo

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: SASL problem

Carlo Bertoldi-2
Thanks,
  but that didn't solved the problem, and the double quotes are still
missing in the log file, even with the 3 backslashes.

On 30/06/2011 16:26, Siri Hansen wrote:

> Hi Carlo!
>
> Your script works for me, but it seems from the error report that the
> double quotes around the log file path have disappeared in your case.
> You could try to increase the number of backslashes - e.g. to three:
>
> ... -sasl sasl_error_logger "{file,
> \\\"/home/itadm/erlang/log/prototipo_mps_sasl.log\\\"}" ...
>
> Regards
> /siri
>
>
> 2011/6/30 Carlo Bertoldi <[hidden email]
> <mailto:[hidden email]>>
>
>     Hello everybody,
>      I'm trying to launch my application using heart. This is the
>     script I'm using:
>
>     #!/bin/bash
>
>     EBIN_PATH=/home/itadm/prototipo_mps/ebin
>     LOG_FILE=/home/itadm/erlang/log/sonda.log
>     ERL=/usr/bin/erl
>     NODE_NAME=sonda
>
>     $ERL -sname $NODE_NAME -heart -pa $EBIN_PATH -boot start_sasl
>     -sasl sasl_error_logger "{file,
>     \"/home/itadm/erlang/log/prototipo_mps_sasl.log\"}" -noshell -eval
>     "application:start(prototipo_mps)." 2>&1 > $LOG_FILE &
>
>
>     The application starts, but in the log I've got this error, and I
>     can see that the sasl keeps restarting.
>
>
>     =ERROR REPORT==== 30-Jun-2011::15:36:46 ===
>     application_controller: syntax error before: '/': {file,
>     /home/itadm/erlang/log/prototipo_mps_sasl.log}
>     {"init terminating in do_boot",{error,'Bad environment variable:
>     "{file, /home/itadm/erlang/log/prototipo_mps_sasl.log}"
>      Application: sasl'}}
>
>
>     =erl_crash_dump:0.1
>     Thu Jun 30 15:52:32 2011
>     Slogan: Kernel pid terminated (application_controller)
>     ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})
>     System version: Erlang R14A (erts-5.8) [source] [64-bit] [smp:4:4]
>     [rq:4] [async-threads:0] [kernel-poll:false]
>
>     If I launch the application using the shell, it works as expected.
>     Any suggestions?
>     Thanks,
>      Carlo
>
>     _______________________________________________
>     erlang-questions mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://erlang.org/mailman/listinfo/erlang-questions
>
>


--
Ubiquity - A little bit forward
*Carlo Bertoldi*
Ubiquity
Via Teodosio 65 -20131, Milano
Fisso: +39 02 288584.32 - Fax: +39 02 2829795
Email: [hidden email] <mailto:[hidden email]>
Website: www.ubiquity.it <http://www.ubiquity.it>

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: SASL problem

Siri Hansen
Ok, one more shot then - this is pure guessing of course, since I can not reproduce the problem... You could try to use single quotes around the tuple and double quotes with no backslash around the string:

... -sasl sasl_error_logger '{file, "/home/itadm/erlang/log/prototipo_mps_sasl.log"}' ...

I'm not at all an expert on shell scripts and the secrets related to quotes - there are probably others on this list who are... I'm just giving some ideas since I have had similar problems myself... hope it helps 

/siri

2011/6/30 Carlo Bertoldi <[hidden email]>
Thanks,
 but that didn't solved the problem, and the double quotes are still missing in the log file, even with the 3 backslashes.


On 30/06/2011 16:26, Siri Hansen wrote:
Hi Carlo!

Your script works for me, but it seems from the error report that the double quotes around the log file path have disappeared in your case. You could try to increase the number of backslashes - e.g. to three:

... -sasl sasl_error_logger "{file, \\\"/home/itadm/erlang/log/prototipo_mps_sasl.log\\\"}" ...

Regards
/siri


2011/6/30 Carlo Bertoldi <[hidden email] <mailto:[hidden email]>>


   Hello everybody,
    I'm trying to launch my application using heart. This is the
   script I'm using:

   #!/bin/bash

   EBIN_PATH=/home/itadm/prototipo_mps/ebin
   LOG_FILE=/home/itadm/erlang/log/sonda.log
   ERL=/usr/bin/erl
   NODE_NAME=sonda

   $ERL -sname $NODE_NAME -heart -pa $EBIN_PATH -boot start_sasl
   -sasl sasl_error_logger "{file,
   \"/home/itadm/erlang/log/prototipo_mps_sasl.log\"}" -noshell -eval
   "application:start(prototipo_mps)." 2>&1 > $LOG_FILE &


   The application starts, but in the log I've got this error, and I
   can see that the sasl keeps restarting.


   =ERROR REPORT==== 30-Jun-2011::15:36:46 ===
   application_controller: syntax error before: '/': {file,
   /home/itadm/erlang/log/prototipo_mps_sasl.log}
   {"init terminating in do_boot",{error,'Bad environment variable:
   "{file, /home/itadm/erlang/log/prototipo_mps_sasl.log}"
    Application: sasl'}}


   =erl_crash_dump:0.1
   Thu Jun 30 15:52:32 2011
   Slogan: Kernel pid terminated (application_controller)
   ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})
   System version: Erlang R14A (erts-5.8) [source] [64-bit] [smp:4:4]
   [rq:4] [async-threads:0] [kernel-poll:false]

   If I launch the application using the shell, it works as expected.
   Any suggestions?
   Thanks,
    Carlo

   _______________________________________________
   erlang-questions mailing list
   [hidden email] <mailto:[hidden email]>


--
Ubiquity - A little bit forward
*Carlo Bertoldi*
Ubiquity
Via Teodosio 65 -20131, Milano
Fisso: +39 02 288584.32 - Fax: +39 02 2829795
Email: [hidden email] <mailto:[hidden email]>
Website: www.ubiquity.it <http://www.ubiquity.it>



_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: SASL problem

Carlo Bertoldi-2
I've just managed to resolve the problem: I changed -sname $NODE_NAME to
-sname sonda, and it's working.
Though I wonder why this can cause such a problem.
Thank you Siri for your support.

  Carlo


On 30/06/2011 16:54, Siri Hansen wrote:

> Ok, one more shot then - this is pure guessing of course, since I can
> not reproduce the problem... You could try to use single quotes around
> the tuple and double quotes with no backslash around the string:
>
> ... -sasl sasl_error_logger '{file,
> "/home/itadm/erlang/log/prototipo_mps_sasl.log"}' ...
>
> I'm not at all an expert on shell scripts and the secrets related to
> quotes - there are probably others on this list who are... I'm just
> giving some ideas since I have had similar problems myself... hope it
> helps
>
> /siri
>
> 2011/6/30 Carlo Bertoldi <[hidden email]
> <mailto:[hidden email]>>
>
>     Thanks,
>      but that didn't solved the problem, and the double quotes are
>     still missing in the log file, even with the 3 backslashes.
>
>
>     On 30/06/2011 16:26, Siri Hansen wrote:
>
>         Hi Carlo!
>
>         Your script works for me, but it seems from the error report
>         that the double quotes around the log file path have
>         disappeared in your case. You could try to increase the number
>         of backslashes - e.g. to three:
>
>         ... -sasl sasl_error_logger "{file,
>         \\\"/home/itadm/erlang/log/prototipo_mps_sasl.log\\\"}" ...
>
>         Regards
>         /siri
>
>
>         2011/6/30 Carlo Bertoldi <[hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>
>
>            Hello everybody,
>             I'm trying to launch my application using heart. This is the
>            script I'm using:
>
>            #!/bin/bash
>
>            EBIN_PATH=/home/itadm/prototipo_mps/ebin
>            LOG_FILE=/home/itadm/erlang/log/sonda.log
>            ERL=/usr/bin/erl
>            NODE_NAME=sonda
>
>            $ERL -sname $NODE_NAME -heart -pa $EBIN_PATH -boot start_sasl
>            -sasl sasl_error_logger "{file,
>            \"/home/itadm/erlang/log/prototipo_mps_sasl.log\"}"
>         -noshell -eval
>            "application:start(prototipo_mps)." 2>&1 > $LOG_FILE &
>
>
>            The application starts, but in the log I've got this error,
>         and I
>            can see that the sasl keeps restarting.
>
>
>            =ERROR REPORT==== 30-Jun-2011::15:36:46 ===
>            application_controller: syntax error before: '/': {file,
>            /home/itadm/erlang/log/prototipo_mps_sasl.log}
>            {"init terminating in do_boot",{error,'Bad environment
>         variable:
>            "{file, /home/itadm/erlang/log/prototipo_mps_sasl.log}"
>             Application: sasl'}}
>
>
>            =erl_crash_dump:0.1
>            Thu Jun 30 15:52:32 2011
>            Slogan: Kernel pid terminated (application_controller)
>          
>          ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})
>            System version: Erlang R14A (erts-5.8) [source] [64-bit]
>         [smp:4:4]
>            [rq:4] [async-threads:0] [kernel-poll:false]
>
>            If I launch the application using the shell, it works as
>         expected.
>            Any suggestions?
>            Thanks,
>             Carlo
>
>            _______________________________________________
>            erlang-questions mailing list
>         [hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>
>
>         http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
>
>     --
>     Ubiquity - A little bit forward
>     *Carlo Bertoldi*
>     Ubiquity
>     Via Teodosio 65 -20131, Milano
>     Fisso: +39 02 288584.32 - Fax: +39 02 2829795
>     Email: [hidden email]
>     <mailto:[hidden email]>
>     <mailto:[hidden email]
>     <mailto:[hidden email]>>
>     Website: www.ubiquity.it <http://www.ubiquity.it>
>     <http://www.ubiquity.it>
>
>


--
Ubiquity - A little bit forward
*Carlo Bertoldi*
Ubiquity
Via Teodosio 65 -20131, Milano
Fisso: +39 02 288584.32 - Fax: +39 02 2829795
Email: [hidden email] <mailto:[hidden email]>
Website: www.ubiquity.it <http://www.ubiquity.it>

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: SASL problem

Matti Oinas
One possible cause for these problems are characters in file that arent
visible but are there and they mess up the actual command. I have
experienced similar problems with shell scripts and usually there is
\r\n line change (someone edited the file using some windows edirot and
uploaded it into server) or some UTF-8 character that isn't visible in
editor. You can check if these are the problem by checking the file with
hexdump or similar tool.

Matti

On 06/30/2011 05:56 PM, Carlo Bertoldi wrote:

> I've just managed to resolve the problem: I changed -sname $NODE_NAME
> to -sname sonda, and it's working.
> Though I wonder why this can cause such a problem.
> Thank you Siri for your support.
>
>  Carlo
>
>
> On 30/06/2011 16:54, Siri Hansen wrote:
>> Ok, one more shot then - this is pure guessing of course, since I can
>> not reproduce the problem... You could try to use single quotes
>> around the tuple and double quotes with no backslash around the string:
>>
>> ... -sasl sasl_error_logger '{file,
>> "/home/itadm/erlang/log/prototipo_mps_sasl.log"}' ...
>>
>> I'm not at all an expert on shell scripts and the secrets related to
>> quotes - there are probably others on this list who are... I'm just
>> giving some ideas since I have had similar problems myself... hope it
>> helps
>>
>> /siri
>>
>> 2011/6/30 Carlo Bertoldi <[hidden email]
>> <mailto:[hidden email]>>
>>
>>     Thanks,
>>      but that didn't solved the problem, and the double quotes are
>>     still missing in the log file, even with the 3 backslashes.
>>
>>
>>     On 30/06/2011 16:26, Siri Hansen wrote:
>>
>>         Hi Carlo!
>>
>>         Your script works for me, but it seems from the error report
>>         that the double quotes around the log file path have
>>         disappeared in your case. You could try to increase the number
>>         of backslashes - e.g. to three:
>>
>>         ... -sasl sasl_error_logger "{file,
>>         \\\"/home/itadm/erlang/log/prototipo_mps_sasl.log\\\"}" ...
>>
>>         Regards
>>         /siri
>>
>>
>>         2011/6/30 Carlo Bertoldi <[hidden email]
>> <mailto:[hidden email]>
>> <mailto:[hidden email]
>> <mailto:[hidden email]>>>
>>
>>
>>            Hello everybody,
>>             I'm trying to launch my application using heart. This is the
>>            script I'm using:
>>
>>            #!/bin/bash
>>
>>            EBIN_PATH=/home/itadm/prototipo_mps/ebin
>>            LOG_FILE=/home/itadm/erlang/log/sonda.log
>>            ERL=/usr/bin/erl
>>            NODE_NAME=sonda
>>
>>            $ERL -sname $NODE_NAME -heart -pa $EBIN_PATH -boot start_sasl
>>            -sasl sasl_error_logger "{file,
>>            \"/home/itadm/erlang/log/prototipo_mps_sasl.log\"}"
>>         -noshell -eval
>>            "application:start(prototipo_mps)." 2>&1 > $LOG_FILE &
>>
>>
>>            The application starts, but in the log I've got this error,
>>         and I
>>            can see that the sasl keeps restarting.
>>
>>
>>            =ERROR REPORT==== 30-Jun-2011::15:36:46 ===
>>            application_controller: syntax error before: '/': {file,
>>            /home/itadm/erlang/log/prototipo_mps_sasl.log}
>>            {"init terminating in do_boot",{error,'Bad environment
>>         variable:
>>            "{file, /home/itadm/erlang/log/prototipo_mps_sasl.log}"
>>             Application: sasl'}}
>>
>>
>>            =erl_crash_dump:0.1
>>            Thu Jun 30 15:52:32 2011
>>            Slogan: Kernel pid terminated (application_controller)
>>                  
>> ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})
>>            System version: Erlang R14A (erts-5.8) [source] [64-bit]
>>         [smp:4:4]
>>            [rq:4] [async-threads:0] [kernel-poll:false]
>>
>>            If I launch the application using the shell, it works as
>>         expected.
>>            Any suggestions?
>>            Thanks,
>>             Carlo
>>
>>            _______________________________________________
>>            erlang-questions mailing list
>>         [hidden email]
>> <mailto:[hidden email]>
>> <mailto:[hidden email]
>> <mailto:[hidden email]>>
>>
>>         http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>>
>>
>>     --     Ubiquity - A little bit forward
>>     *Carlo Bertoldi*
>>     Ubiquity
>>     Via Teodosio 65 -20131, Milano
>>     Fisso: +39 02 288584.32 - Fax: +39 02 2829795
>>     Email: [hidden email]
>> <mailto:[hidden email]>
>> <mailto:[hidden email]
>> <mailto:[hidden email]>>
>>     Website: www.ubiquity.it <http://www.ubiquity.it>
>> <http://www.ubiquity.it>
>>
>>
>
>

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Loading...