aerobase / unifiedpush-server

UnifiedPush Server
https://github.com/aerobase/unifiedpush-server
Apache License 2.0
25 stars 9 forks source link

Error in reconfigure #9

Closed boberski666 closed 7 years ago

boberski666 commented 8 years ago

I installed unifiedpush from http://ups.c-b4.com/ups/packages/el/6/unifiedpush-server-1.1.0-Final.0.el6.x86_64.rpm when na try to reconfigure I get:

[root@torchwood ~]# sudo unifiedpush-ctl reconfigure WARN: Unresolved specs during Gem::Specification.reset: mixlib-shellout (< 3.0, >= 2.0.0.rc.0, ~> 2.0) WARN: Clearing out unresolved specs. Please report a bug if this causes problems. /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/Gemfile not found

yanivmn commented 8 years ago

Hi, Thanks for reporting this issue. As a work-around replace /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/bin/chef- client content to the following:

#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'chef-client' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
#ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
#  Pathname.new(__FILE__).realpath)

#require 'rubygems'
#require 'bundler/setup'

#load Gem.bin_path('chef', 'chef-client')

require 'rubygems'
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
require 'chef'
require 'chef/application/client'

Chef::Application::Client.new.run
boberski666 commented 8 years ago

After applaing fix you post I get:

Generated at 2016-02-04 09:13:57 +0100 Mixlib::ShellOut::ShellCommandFailed: execute[sysctl](unifiedpush::postgresql line 82) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '255' ---- Begin output of /sbin/sysctl -p /etc/sysctl.conf ---- STDOUT: net.ipv4.ip_forward = 0 net.ipv4.tcp_syncookies = 1 kernel.shmmax = 17179869184 kernel.shmall = 4194304 STDERR: error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key error: "net.bridge.bridge-nf-call-iptables" is an unknown key error: "net.bridge.bridge-nf-call-arptables" is an unknown key ---- End output of /sbin/sysctl -p /etc/sysctl.conf ---- Ran /sbin/sysctl -p /etc/sysctl.conf returned 255 /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/mixlib-shellout-2.2.3/lib/mixlib/shellout.rb:289:in invalid!' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/mixlib-shellout-2.2.3/lib/mixlib/shellout.rb:276:inerror!' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/mixin/shell_out.rb:56:in shell_out!' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/provider/execute.rb:61:inblock in action_run' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/mixin/why_run.rb:52:in call' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/mixin/why_run.rb:52:inadd_action' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/provider.rb:175:in converge_by' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/provider/execute.rb:60:inaction_run' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/provider.rb:140:in run_action' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/resource.rb:584:inrun_action' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/runner.rb:49:in run_action' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/runner.rb:57:inblock in run_action' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/runner.rb:55:in each' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/runner.rb:55:inrun_action' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/runner.rb:81:in block (2 levels) in converge' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/runner.rb:81:ineach' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/runner.rb:81:in block in converge' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/resource_collection/resource_list.rb:83:inblock in execute_each_resource' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/resource_collection/stepable_iterator.rb:116:in call' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/resource_collection/stepable_iterator.rb:116:incall_iterator_block' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/resource_collection/stepable_iterator.rb:85:in step' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/resource_collection/stepable_iterator.rb:104:initerate' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/resource_collection/stepable_iterator.rb:55:in each_with_index' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/resource_collection/resource_list.rb:81:inexecute_each_resource' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/runner.rb:80:in converge' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/client.rb:654:inblock in converge' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/client.rb:649:in catch' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/client.rb:649:inconverge' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/client.rb:688:in converge_and_save' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/client.rb:269:inrun' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/application.rb:270:in block in fork_chef_client' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/application.rb:258:infork' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/application.rb:258:in fork_chef_client' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/application.rb:224:inblock in run_chef_client' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/local_mode.rb:39:in with_server_connectivity' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/application.rb:212:inrun_chef_client' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/application/client.rb:402:in block in interval_run_chef_client' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/application/client.rb:392:inloop' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/application/client.rb:392:in interval_run_chef_client' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/application/client.rb:382:inrun_application' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/lib/chef/application.rb:60:in run' /opt/unifiedpush/embedded/lib/ruby/gems/2.2.0/gems/chef-12.4.1/bin/chef-client:23:in<top (required)>' /opt/unifiedpush/embedded/bin/chef-client:23:in load' /opt/unifiedpush/embedded/bin/chef-client:23:in

'

yanivmn commented 8 years ago

This is probable the cause: http://serverfault.com/questions/477718/sysctl-p-etc-sysctl-conf-returns-error

Can you try and add -e to to line 83 (Just next to -p option) /opt/unifiedpush/embedded/cookbooks/unifiedpush/recipes/postgresql.rb

boberski666 commented 8 years ago

Ot it helped, but how do I now lunch it from my browser?

I change nginx['listen_port'] = 81 # override only if you have a reverse proxy

reconfigured all and when I type: http://hell-yeah.pl:81/unifiedpush-server I get: 404 - Not Found

it I type only http://hell-yeah.pl:81/ I get only: Welcome to WildFly 8 Your WildFly 8 is running.

yanivmn commented 8 years ago

You can follow installation instruction from https://github.com/C-B4/unifiedpush-server/wiki/Unifiedpush-Installation.

Or just vi /etc/unifiedpush/unifiedpush.rb URL is logged to first configuration line, e.g http://YOUR-HOST/unifiedpush-server

Further more, SSL support and documentation is available at https://github.com/C-B4/omnibus-unifiedpush-server/blob/master/doc/settings/nginx.md#enable-https

boberski666 commented 8 years ago

I have:

external_url 'http://push.hell-yeah.pl'

also httpd virtual host:

<VirtualHost *:80> ServerName push.hell-yeah.pl ServerSignature Off

ProxyPreserveHost On AllowEncodedSlashes Off

ProxyVia On ProxyRequests Off ProxyPass / http://localhost:81/ ProxyPassReverse / http://localhost:81/ ProxyPreserveHost on

#Set up apache error documents, if back end goes down (i.e. 503 error) then a maintenance/deploy page is thrown up.
ErrorDocument 404 /404.html
ErrorDocument 422 /422.html
ErrorDocument 500 /500.html
ErrorDocument 503 /deploy.html

LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common_forwarded
ErrorLog  /var/log/httpd/push.com_error.log
CustomLog /var/log/httpd/push.com_forwarded.log common_forwarded
CustomLog /var/log/httpd/push.com_access.log combined env=!dontlog
CustomLog /var/log/httpd/push.com.log combined

Default port is changed:

nginx['listen_port'] = 81 # override only if you have a reverse proxy

All was reconfigured by:

sudo unifiedpush-ctl reconfigure

When I pass to my browser http://push.hell-yeah.pl/ I get wildfly landing page, when I pass http://push.hell-yeah.pl/unifiedpush-server I get 404. What em I doing wrong?

TIA

yanivmn commented 8 years ago

Try sudo unifiedpush-ctl restart and sudo unifiedpush-ctl tail to view logs

boberski666 commented 8 years ago

Still the same 404 or default landing page. Logs are:

127.0.0.1 - - [04/Feb/2016:10:58:46 +0100] "GET /unifiedpush-server HTTP/1.1" 404 90 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36"

boberski666 commented 8 years ago

http://img.hell-yeah.pl/pic/311454583901.PNG

yanivmn commented 8 years ago

can you post the entire log file /var/log/unifiedpush/unifiedpush-server/current

boberski666 commented 8 years ago

https://www.dropbox.com/s/xmyiykaik1dz43f/current?dl=0

yanivmn commented 8 years ago

PostgreSQL is down, this can be wither a selinux issue or installation failed due to your previous errors. try the following: 1) Stop server - sudo unifiedpush-ctl stop 2) Delete all data - rm -rf /var/opt/unifiedpush/ /var/log/unifiedpush 3) reconfigure - sudo unifiedpush-ctl reconfigure 4) Restart - sudo unifiedpush-ctl restart

If /var/log/unifiedpush/unifiedpush-server/current still contain some errors - try to disable selinux

boberski666 commented 8 years ago

Even after disable linuxse: https://www.dropbox.com/s/9o603hrhg45icgq/current_2?dl=0

yanivmn commented 8 years ago

can you also post /var/log/unifiedpush/postgresql/current

boberski666 commented 8 years ago

https://www.dropbox.com/s/qbvbzlp5bq8y4xd/current_post?dl=0

Also.. is it working with java 8? I realized that I have one on the VPS that I try to run it.

yanivmn commented 8 years ago

Your Client IP address resolved to "localhost.localdomain", and not to localhost.

make sure your /etc/hosts looks like this: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

Restart unifiedpush-ctl after change.

boberski666 commented 8 years ago

I tryed with another VPS and: http://www.bankai.pl/ - still the same

etc/hosts/:

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

Auto-generated hostname. Please do not remove this comment.

91.196.49.201 bankai ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

yanivmn commented 8 years ago

try to add localhost.localdomain to trust_auth_cidr_addresses e.g: vi /etc/unifiedpush/unifiedpush.rb postgresql['trust_auth_cidr_addresses'] = ['localhost','localhost.localdomain','127.0.0.1/32']

boberski666 commented 8 years ago

No effect still have http://img.hell-yeah.pl/pic/311454583901.PNG when I type http://www.bankai.pl/

yanivmn commented 8 years ago

can you post your os version (uname -a), jre version (java -version), and virtualization type? I will try to reproduce.

boberski666 commented 8 years ago

HyperVM Linux bankai 2.6.32-042stab112.15 #1 SMP Tue Oct 20 17:22:56 MSK 2015 x86_64 x86_64 x86_64 GNU/Linux java version "1.7.0_95" OpenJDK Runtime Environment (rhel-2.6.4.0.el6_7-x86_64 u95-b00) OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

yanivmn commented 8 years ago

We have upload a new release version 1.1.1-Final. First two ruby issues are resolved. unfortunately we were unable to reproduce your latest issue.

Please try to download and reinstall latest release.

boberski666 commented 8 years ago

What shoult be the propper address for me to ender the unifiedpush server? http://www.bankai.pl/ or http://www.bankai.pl/unifiedpush-server?

yanivmn commented 8 years ago

http://www.bankai.pl/unifiedpush-server You can tail aggregated log files using unifiedpush-ctl tail, make sure no errors are logged during startup.

boberski666 commented 8 years ago

https://www.dropbox.com/s/xmyiykaik1dz43f/current?dl=0

jBoss errors :(

yanivmn commented 8 years ago

Please try the following:

1) Stop server - sudo unifiedpush-ctl stop 2) Delete all data - rm -rf /var/opt/unifiedpush/ /var/log/unifiedpush 3) reconfigure - sudo unifiedpush-ctl reconfigure 4) Restart - sudo unifiedpush-ctl restart

If an error occur during unifiedpush-ctl reconfigure, please post it.

boberski666 commented 8 years ago

Your package beat me :P I installed it manualy with mysql insted, and it is working now :)

jonasmferreira commented 8 years ago

Please try the following: 1) Stop server - sudo unifiedpush-ctl stop 2) Delete all data - rm -rf /var/opt/unifiedpush/ /var/log/unifiedpush 3) In /etc/hosts - 127.0.0.1 localhost 4) Uninstall - sudo dpkg -r unifiedpush-server 5) Reinstall - sudo dpkg -i unifiedpush-server.deb 6) reconfigure - sudo unifiedpush-ctl reconfigure 7) Restart - sudo unifiedpush-ctl restart