[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Reply: OpenShifrt Origin can not restart an app



Hi, Brenton
I just found the key of my problem.

In node host, I find "oo-ruby --version" output is ruby1.9.3.
But "ruby --version" is ruby1.8.7.
And when I ssh into my app, the "ruby --version" command output is ruby1.8.7.

So I try to set the default ruby version via rvm.
And now my node host default ruby version is 1.9.3 but my app is still 1.8.7.
I create new app and the version is still 1.8.7.
How can I solve the problem?

Thanks for help.

------------------ Original ------------------
Sender: "Brenton Leanhardt"<bleanhar redhat com>;
Send time: Saturday, Feb 22, 2014 0:09 AM
To: "????????????"<yuanzilu foxmail com>;
Cc: "users"<users lists openshift redhat com>;
Subject: Re: OpenShifrt Origin can not restart an app

+++ ???????????? [21/02/14 14:34 +0800]:
>Hi all.
>Have anybody suffer this problem, too?
>I can create app.
>But, when I want to restart the app, it occur some error.
>
>I modify some files like index.html in jbosseap app. When I visit the app website, nothing to be changed.
>So I restart the app through web-console.
>It show me it is restart successfully, but it still have no changes.
>
>Then I ssh login the app and use command "gear restart", some error occur:
>#################################################################################################
>[jbosseap-test.example.com 5306e5f56892df605b00009a]\> gear restart
>/usr/bin/gear:146: syntax error, unexpected ':', expecting ')'
>        @container.pre_receive(out: $stdout,
>                                   ^

When you ssh into your gear what does the following command return:

/usr/bin/env oo-ruby --version

I wonder if somehow in your environment ruby 1.8 is being used.  That
code is using ruby 1.9+ hash syntax.

>/usr/bin/gear:147: syntax error, unexpected ':', expecting '='
>                               err: $stderr,
>                                   ^
>/usr/bin/gear:148: syntax error, unexpected ':', expecting '='
>                               hot_deploy: hot_deploy,
>                                          ^
>/usr/bin/gear:149: syntax error, unexpected ':', expecting '='
>                               force_clean_build: force_clean_build,
>                                                 ^
>/usr/bin/gear:150: syntax error, unexpected ':', expecting '='
>                               ref: ref_to_deploy,
>                                   ^
>/usr/bin/gear:151: syntax error, unexpected ':', expecting '='
>                               init: options.init)
>                                    ^
>/usr/bin/gear:151: syntax error, unexpected ')', expecting kEND
>/usr/bin/gear:187: syntax error, unexpected ':', expecting ')'
>        result = @container.post_receive(out: $stdout,
>                                             ^
>/usr/bin/gear:188: syntax error, unexpected ':', expecting '='
>                                         err: $stderr,
>                                             ^
>/usr/bin/gear:189: syntax error, unexpected ':', expecting '='
>                                         ref: ref_to_deploy,
>                                             ^
>/usr/bin/gear:190: syntax error, unexpected ':', expecting '='
>                                         report_deployments: true,
>                                                            ^
>/usr/bin/gear:190: Can't assign to true
>/usr/bin/gear:191: syntax error, unexpected ':', expecting '='
>                                         all: true,
>                                             ^
>/usr/bin/gear:191: Can't assign to true
>/usr/bin/gear:192: syntax error, unexpected ':', expecting '='
>                                         init: options.init)
>                                              ^
>/usr/bin/gear:192: syntax error, unexpected ')', expecting kEND
>/usr/bin/gear:271: odd number list for Hash
>        out: $stdout,
>            ^
>/usr/bin/gear:271: syntax error, unexpected ':', expecting '}'
>        out: $stdout,
>            ^
>/usr/bin/gear:272: syntax error, unexpected ':', expecting '='
>        err: $stderr,
>            ^
>/usr/bin/gear:273: syntax error, unexpected ':', expecting '='
>        ref: git_ref,
>            ^
>/usr/bin/gear:274: syntax error, unexpected ':', expecting '='
>        hot_deploy: @repo.file_exists?(HOT_DEPLOY_MARKER, git_ref),
>                   ^
>/usr/bin/gear:274: syntax error, unexpected ',', expecting kEND
>/usr/bin/gear:275: syntax error, unexpected ',', expecting kEND
>/usr/bin/gear:292: syntax error, unexpected ':', expecting ')'
>      @container.prepare(out: $stdout, err: $stderr, deploy...
>                             ^
>/usr/bin/gear:292: syntax error, unexpected ':', expecting '='
>...ner.prepare(out: $stdout, err: $stderr, deployment_datetime:...
>                              ^
>/usr/bin/gear:292: syntax error, unexpected ':', expecting '='
>... $stderr, deployment_datetime: deployment_datetime, file: ar...
>                              ^
>/usr/bin/gear:292: syntax error, unexpected ':', expecting '='
>...me: deployment_datetime, file: args[0])
>                              ^
>/usr/bin/gear:292: syntax error, unexpected ')', expecting kEND
>/usr/bin/gear:304: syntax error, unexpected ':', expecting ')'
>...    @container.distribute(out: $stdout, err: $stderr, deploy...
>                              ^
>/usr/bin/gear:304: syntax error, unexpected ':', expecting '='
>....distribute(out: $stdout, err: $stderr, deployment_id: args[...
>                              ^
>/usr/bin/gear:304: syntax error, unexpected ':', expecting '='
>..., err: $stderr, deployment_id: args[0])
>                              ^
>/usr/bin/gear:304: syntax error, unexpected ')', expecting kEND
>/usr/bin/gear:334: syntax error, unexpected ':', expecting ')'
>      result = @container.activate(deployment_id: args[0],
>                                                 ^
>/usr/bin/gear:335: syntax error, unexpected ':', expecting '='
>...                 post_install: !!options.post_install,
>                              ^
>/usr/bin/gear:335: syntax error, unexpected ',', expecting kEND
>/usr/bin/gear:336: syntax error, unexpected ',', expecting kEND
>/usr/bin/gear:338: syntax error, unexpected ':', expecting '='
>                                   report_deployments: true,
>                                                      ^
>/usr/bin/gear:338: Can't assign to true
>/usr/bin/gear:339: syntax error, unexpected ':', expecting '='
>                                   out: out,
>                                       ^
>/usr/bin/gear:340: syntax error, unexpected ':', expecting '='
>                                   err: err)
>                                       ^
>/usr/bin/gear:378: syntax error, unexpected ':', expecting ')'
>      result = @container.remote_deploy(out: $stdout,
>                                            ^
>/usr/bin/gear:379: syntax error, unexpected ':', expecting '='
>                                        err: $stderr,
>                                            ^
>/usr/bin/gear:380: syntax error, unexpected ':', expecting '='
>...                   hot_deploy: hot_deploy_enabled,
>                              ^
>/usr/bin/gear:381: syntax error, unexpected ':', expecting '='
>...          deployment_datetime: options.deployment_datetime |...
>                              ^
>/usr/bin/gear:381: syntax error, unexpected ',', expecting kEND
>/usr/bin/gear:382: Can't assign to true
>/usr/bin/gear:383: syntax error, unexpected ':', expecting '='
>                                        all: true)
>                                            ^
>/usr/bin/gear:412: syntax error, unexpected ':', expecting ')'
>      @container.deploy(hot_deploy: hot_deploy_enabled,
>                                   ^
>/usr/bin/gear:413: syntax error, unexpected ':', expecting '='
>                        force_clean_build: force_clean_build_enabled
>                                          ^
>/usr/bin/gear:414: syntax error, unexpected ':', expecting '='
>                        ref: ref_to_deploy,
>                            ^
>/usr/bin/gear:415: syntax error, unexpected ':', expecting '='
>                        out: $stdout,
>                            ^
>/usr/bin/gear:416: syntax error, unexpected ':', expecting '='
>                        err: $stderr,
>                            ^
>/usr/bin/gear:417: syntax error, unexpected ':', expecting '='
>                        report_deployments: true,
>                                           ^
>/usr/bin/gear:417: Can't assign to true
>/usr/bin/gear:418: syntax error, unexpected ':', expecting '='
>                        all: true)
>                            ^
>/usr/bin/gear:433: odd number list for Hash
>      options = { out: $stdout, err: $stderr }
>                      ^
>/usr/bin/gear:433: syntax error, unexpected ':', expecting '}'
>      options = { out: $stdout, err: $stderr }
>                      ^
>/usr/bin/gear:433: syntax error, unexpected ':', expecting '='
>      options = { out: $stdout, err: $stderr }
>                                    ^
>/usr/bin/gear:464: syntax error, unexpected ':', expecting ')'
>        @container.start(options.cart, out: $stdout, err: $stderr)
>                                           ^
>/usr/bin/gear:464: syntax error, unexpected ':', expecting '='
>        @container.start(options.cart, out: $stdout, err: $stderr)
>                                                         ^
>/usr/bin/gear:467: syntax error, unexpected ':', expecting ')'
>        @container.start_gear(out: $stdout, err: $stderr)
>                                  ^
>/usr/bin/gear:467: syntax error, unexpected ':', expecting '='
>        @container.start_gear(out: $stdout, err: $stderr)
>                                                ^
>/usr/bin/gear:485: syntax error, unexpected ':', expecting ')'
>        @container.stop(options.cart, out: $stdout, err: $stderr)
>                                          ^
>/usr/bin/gear:485: syntax error, unexpected ':', expecting '='
>        @container.stop(options.cart, out: $stdout, err: $stderr)
>                                                        ^
>/usr/bin/gear:492: syntax error, unexpected ':', expecting ')'
>...r.stop_gear(exclude_web_proxy: !!options.exclude_web_proxy, ...
>                              ^
>/usr/bin/gear:492: syntax error, unexpected ',', expecting kEND
>...: !!options.exclude_web_proxy, out: $stdout, err: $stderr)
>                              ^
>/usr/bin/gear:492: syntax error, unexpected ':', expecting '='
>..._web_proxy, out: $stdout, err: $stderr)
>                              ^
>/usr/bin/gear:518: syntax error, unexpected ':', expecting ')'
>...ner.restart(options.cart, all: !!options.all, out: out, err:...
>                              ^
>/usr/bin/gear:518: syntax error, unexpected ',', expecting kEND
>...ions.cart, all: !!options.all, out: out, err: err)
>                              ^
>/usr/bin/gear:518: syntax error, unexpected ':', expecting '='
>... !!options.all, out: out, err: err)
>                              ^
>/usr/bin/gear:605: syntax error, unexpected ':', expecting ')'
>    result = @container.update_proxy_status(cartridge: options.cart,
>                                                      ^
>/usr/bin/gear:606: syntax error, unexpected ':', expecting '='
>                                            action: :disable,
>                                                   ^
>/usr/bin/gear:607: syntax error, unexpected ',', expecting kEND
>/usr/bin/gear:608: syntax error, unexpected ')', expecting kEND
>/usr/bin/gear:624: syntax error, unexpected ':', expecting ')'
>    result = @container.update_proxy_status(cartridge: options.cart,
>                                                      ^
>/usr/bin/gear:625: syntax error, unexpected ':', expecting '='
>                                            action: :enable,
>                                                   ^
>/usr/bin/gear:626: syntax error, unexpected ',', expecting kEND
>/usr/bin/gear:627: syntax error, unexpected ')', expecting kEND
>/usr/bin/gear:631: syntax error, unexpected $end, expecting kEND
>##############################################################################################
>
>How can I fix this problem?
>Every app use "gear start/stop/restart" will occur the same problem.
>It seems that java app must restart after change(php app can run the newest after change).
>I build OpenShift Origin by comprehension guide v2.
>OS: rhel 6

>_______________________________________________
>users mailing list
>users lists openshift redhat com
>http://lists.openshift.redhat.com/openshiftmm/listinfo/users

.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]