dumbo25 / uai_install_shinken_rpi

Unattended install of latest version of shinken on raspberry pi
1 stars 0 forks source link

Jessie support? #1

Open markjapearson opened 8 years ago

markjapearson commented 8 years ago

Hi!

I just tried to run this on Raspbian Jessie and got the message towards the end:

Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. ./shinken_uai.sh: line 278: unexpected EOF while looking for matching `"' ./shinken_uai.sh: line 281: syntax error: unexpected end of file

Any suggestions?

Thanks!

dumbo25 commented 8 years ago

I  am driving to work .  I think last email had wrong slash.  sry for typos I can test tonight when I  get home . you can also edit the script and comment out the check blocks for home dir (and user?) . however  I  haven't tried this. 

Sent via the Samsung Galaxy S® 5 mini, an AT&T 4G LTE smartphone

-------- Original message -------- From: markjapearson notifications@github.com Date: 10/25/2016 7:28 AM (GMT-06:00) To: dumbo25/uai_install_shinken_rpi uai_install_shinken_rpi@noreply.github.com Subject: [dumbo25/uai_install_shinken_rpi] Jessie support? (#1)

Hi!

I just tried to run this on Raspbian Jessie and got the message:

"Error: The unattended install runs on dietpi or raspbian and requires user: pi with home directory: /home/pi and not /root"

Can confirm that the home directory is /home/pi

Any suggestions?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/dumbo25/uai_install_shinken_rpi","title":"dumbo25/uai_install_shinken_rpi","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/dumbo25/uai_install_shinken_rpi"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Jessie support? (#1)"}],"action":{"name":"View Issue","url":"https://github.com/dumbo25/uai_install_shinken_rpi/issues/1"}}}

dumbo25 commented 8 years ago

at command prompt, type: ~. this shows home directory for your user login. don't run script as sudo

Sent via the Samsung Galaxy S® 5 mini, an AT&T 4G LTE smartphone

-------- Original message -------- From: markjapearson notifications@github.com Date: 10/25/2016 7:28 AM (GMT-06:00) To: dumbo25/uai_install_shinken_rpi uai_install_shinken_rpi@noreply.github.com Subject: [dumbo25/uai_install_shinken_rpi] Jessie support? (#1)

Hi!

I just tried to run this on Raspbian Jessie and got the message:

"Error: The unattended install runs on dietpi or raspbian and requires user: pi with home directory: /home/pi and not /root"

Can confirm that the home directory is /home/pi

Any suggestions?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/dumbo25/uai_install_shinken_rpi","title":"dumbo25/uai_install_shinken_rpi","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/dumbo25/uai_install_shinken_rpi"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Jessie support? (#1)"}],"action":{"name":"View Issue","url":"https://github.com/dumbo25/uai_install_shinken_rpi/issues/1"}}}

dumbo25 commented 8 years ago

From the message and looking at the script, it looks like when you ran the script you logged in as root and not as pi.

"Error: The unattended install runs on dietpi or raspbian and requires user: pi with home directory: /home/pi and not /root"

You can edit the script and change:

Edit to match your settings

username="pi"

homedir="/home/pi"

Or, you can adduser pi, and login as pi and try again.

I hope this helps. Jeff

On Tue, Oct 25, 2016 at 8:54 AM, cartwright25 cartwright25@gmail.com wrote:

at command prompt, type: ~. this shows home directory for your user login. don't run script as sudo

Sent via the Samsung Galaxy S® 5 mini, an AT&T 4G LTE smartphone

-------- Original message -------- From: markjapearson notifications@github.com Date: 10/25/2016 7:28 AM (GMT-06:00) To: dumbo25/uai_install_shinken_rpi <uai_install_shinken_rpi@ noreply.github.com> Subject: [dumbo25/uai_install_shinken_rpi] Jessie support? (#1)

Hi!

I just tried to run this on Raspbian Jessie and got the message:

"Error: The unattended install runs on dietpi or raspbian and requires user: pi with home directory: /home/pi and not /root"

Can confirm that the home directory is /home/pi

Any suggestions?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dumbo25/uai_install_shinken_rpi/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AMGZC5gcAsKeMX9apYAe7lloLXA3-2Vsks5q3fXkgaJpZM4Kf60c .

markjapearson commented 8 years ago

Hi,

Sorry, I changed the details of the original issue so I think you responded to that (I misread the new instructions).

This is the error message I get now (not running as root).

./shinken_uai.sh: line 278: unexpected EOF while looking for matching `"' ./shinken_uai.sh: line 281: syntax error: unexpected end of file

markjapearson commented 8 years ago

I don't get that error message anymore. When I log in as pi I get the following error message:

./shinken_uai.sh: line 278: unexpected EOF while looking for matching `"' ./shinken_uai.sh: line 281: syntax error: unexpected end of file

dumbo25 commented 8 years ago

STOPPED HERE = ABOVE SHOULD BE MOSTLY COMPLETE??? what else needs to be done ???# ADD MORE ABOVE - REMOVE THIS LINE WHEN DONEedit the script and delete the three lines above,  or put a # in front of the line that starts with ? ? ? 

Sorry about thatJeff

Sent via the Samsung Galaxy S® 5 mini, an AT&T 4G LTE smartphone

-------- Original message -------- From: markjapearson notifications@github.com Date: 10/26/2016 1:40 PM (GMT-06:00) To: dumbo25/uai_install_shinken_rpi uai_install_shinken_rpi@noreply.github.com Cc: dumbo25 cartwright25@gmail.com, Comment comment@noreply.github.com Subject: Re: [dumbo25/uai_install_shinken_rpi] Jessie support? (#1)

I don't get that error message anymore. When I log in as pi I get the following error message:

./shinken_uai.sh: line 278: unexpected EOF while looking for matching `"'

./shinken_uai.sh: line 281: syntax error: unexpected end of file

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/dumbo25/uai_install_shinken_rpi","title":"dumbo25/uai_install_shinken_rpi","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/dumbo25/uai_install_shinken_rpi"}},"updates":{"snippets":[{"icon":"PERSON","message":"@markjapearson in #1: I don't get that error message anymore. When I log in as pi I get the following error message:\r\n\r\n./shinken_uai.sh: line 278: unexpected EOF while looking for matching `\"'\r\n./shinken_uai.sh: line 281: syntax error: unexpected end of file"}],"action":{"name":"View Issue","url":"https://github.com/dumbo25/uai_install_shinken_rpi/issues/1#issuecomment-256439613"}}}

markjapearson commented 8 years ago

I added a # in front of the line that starts ??? but the same error appears.

dumbo25 commented 8 years ago

Line 61 had a missing " at the end. I checked in change to github. You can edit and add to the line:

echo "ShinkenUAI: Remove old packages that are no longer required"

I had few minutes between meetings.

THX Jeff

On Thu, Oct 27, 2016 at 1:31 PM, markjapearson notifications@github.com wrote:

I added a # in front of the line that starts ??? but the same error appears.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dumbo25/uai_install_shinken_rpi/issues/1#issuecomment-256730531, or mute the thread https://github.com/notifications/unsubscribe-auth/AMGZC2KFncDJMp-jcRzZgMWkOLgPyU2sks5q4O4YgaJpZM4Kf60c .

dumbo25 commented 8 years ago

I looked through the code,  but couldn't spot the missing ". I am on travel until Sunday, and won't be able to check on working system until then.  The only thing I can think is did you use wget or cut-and-paste? If cut-and-paste then it is possible a double quote got missed.  sry forvthe troublesJeff

Sent via the Samsung Galaxy S® 5 mini, an AT&T 4G LTE smartphone

-------- Original message -------- From: markjapearson notifications@github.com Date: 10/27/2016 12:31 PM (GMT-07:00) To: dumbo25/uai_install_shinken_rpi uai_install_shinken_rpi@noreply.github.com Cc: dumbo25 cartwright25@gmail.com, Comment comment@noreply.github.com Subject: Re: [dumbo25/uai_install_shinken_rpi] Jessie support? (#1)

I added a # in front of the line that starts ??? but the same error appears.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/dumbo25/uai_install_shinken_rpi","title":"dumbo25/uai_install_shinken_rpi","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/dumbo25/uai_install_shinken_rpi"}},"updates":{"snippets":[{"icon":"PERSON","message":"@markjapearson in #1: I added a # in front of the line that starts ??? but the same error appears."}],"action":{"name":"View Issue","url":"https://github.com/dumbo25/uai_install_shinken_rpi/issues/1#issuecomment-256730531"}}}

markjapearson commented 8 years ago

No worries, no rush. I just came across your instructables post and thought I'd try it out :)

I used wget.

Ok, so that change got the installer working and it said it installed correctly but looking at the output there were quite a few warnings and errors. Here's a snippet:

[1477652715] INFO: [Shinken] Processing object config file '/etc/shinken/resource.d/nmap.cfg' [1477652715] INFO: [Shinken] Processing object config file '/etc/shinken/resource.d/paths.cfg' [1477652715] ERROR: [Shinken] [module] unknown sqlitedb module from webui

1477652716] INFO: [Shinken] auto_rescheduling_window [1477652716] WARNING: [Shinken] Unmanaged configuration statement, do you really need it?Ask for it on the developer mailinglist https://lists.sourceforge.net/lists/listinfo/shinken-devel or submit a pull request on the Shinken github [1477652716] WARNING: [Shinken] The parameter status_update_interval is useless and can be removed from the configuration (Reason: This parameter is not longer take from the main file, but must be defined in the status_dat broker module instead. But Shinken will create you one if there are no present and use this parameter in it, so no worry.)

[1477651205] INFO: [Shinken] Total number of hosts : 1 [1477651205] INFO: [Shinken] Things look okay - No serious problems were detected during the pre-flight check ShinkenUAI: Make shinken start on reboot insserv: can not remove(../rc0.d/K09umountroot): Permission denied insserv: can not symlink(../init.d/umountroot, ../rc0.d/K10umountroot): Permission denied insserv: can not remove(../rc0.d/K10halt): Permission denied insserv: can not symlink(../init.d/halt, ../rc0.d/K11halt): Permission denied insserv: can not remove(../rc0.d/K04rsyslog): Permission denied insserv: can not symlink(../init.d/rsyslog, ../rc0.d/K05rsyslog): Permission denied insserv: can not remove(../rc0.d/K08umountfs): Permission denied insserv: can not symlink(../init.d/umountfs, ../rc0.d/K09umountfs): Permission denied

The things that I noticed were:

  1. Shinken service did not autostart on reboot
  2. It was not possible to login to the webui with either admin raspberrypipassword or the shinken user account that I was prompted to create during the install.
dumbo25 commented 7 years ago

At one point, I was able to track down root cause of warnings and repair them. However, I don't think they are service impacting. So, I am going to ignore them until I learn more about shinken.

I checked the script running on my Raspberry Pi and compared to code in github. There were differences, including one related to permissions. I checked the updated version into github.

After the script runs:

If it doesn't start after boot, let me know. This is the command that should make it start on reboot:

-

sudo /etc/init.d/shinken restart

Thank you for bearing with me as I fix.

I appreciate your debugging this for me.

Thanks. Jeff

On Fri, Oct 28, 2016 at 6:10 AM, markjapearson notifications@github.com wrote:

No worries, no rush. I just came across your instructables post and thought I'd try it out :)

I used wget.

Ok, so that change got the installer working and it said it installed correctly but looking at the output there were quite a few warnings and errors. Here's a snippet:

[1477652715] INFO: [Shinken] Processing object config file '/etc/shinken/resource.d/nmap.cfg' [1477652715] INFO: [Shinken] Processing object config file '/etc/shinken/resource.d/paths.cfg' [1477652715] ERROR: [Shinken] [module] unknown sqlitedb module from webui

1477652716] INFO: [Shinken] auto_rescheduling_window [1477652716] WARNING: [Shinken] Unmanaged configuration statement, do you really need it?Ask for it on the developer mailinglist https://lists.sourceforge.net/lists/listinfo/shinken-devel or submit a pull request on the Shinken github [1477652716] WARNING: [Shinken] The parameter status_update_interval is useless and can be removed from the configuration (Reason: This parameter is not longer take from the main file, but must be defined in the status_dat broker module instead. But Shinken will create you one if there are no present and use this parameter in it, so no worry.)

[1477651205] INFO: [Shinken] Total number of hosts : 1 [1477651205] INFO: [Shinken] Things look okay - No serious problems were detected during the pre-flight check ShinkenUAI: Make shinken start on reboot insserv: can not remove(../rc0.d/K09umountroot): Permission denied insserv: can not symlink(../init.d/umountroot, ../rc0.d/K10umountroot): Permission denied insserv: can not remove(../rc0.d/K10halt): Permission denied insserv: can not symlink(../init.d/halt, ../rc0.d/K11halt): Permission denied insserv: can not remove(../rc0.d/K04rsyslog): Permission denied insserv: can not symlink(../init.d/rsyslog, ../rc0.d/K05rsyslog): Permission denied insserv: can not remove(../rc0.d/K08umountfs): Permission denied insserv: can not symlink(../init.d/umountfs, ../rc0.d/K09umountfs): Permission denied

The things that I noticed were:

  1. Shinken service did not autostart on reboot
  2. It was not possible to login to the webui with either admin raspberrypipassword or the shinken user account that I was prompted to create during the install.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dumbo25/uai_install_shinken_rpi/issues/1#issuecomment-256895081, or mute the thread https://github.com/notifications/unsubscribe-auth/AMGZC47d3E4CBQ4dJ1lcIX_JTi9FlNX0ks5q4dglgaJpZM4Kf60c .

markjapearson commented 7 years ago

No worries, happy to help.

  1. The service didn't restart on boot but I was able to start it manually.
  2. The login credentials are just admin/admin; it doesn't accept the rpi password.
  3. After logging in, the dashboard shows:

You didn't define a WebUI module for saving user preferences like the MongoDB one. You won't be able to use this page!

  1. Under IT Problems, it shows localhost with the down message of:

[Errno 2] No such file or directory

  1. Under Wall, the page just generates a 404.
  2. It's not possible to edit the admin profile (it's greyed out)
dumbo25 commented 7 years ago

Fixed start on reboot and the dashboard/mongoDB issue, but it isn't pretty.

I am not sure why admin/rpi doesn't work for you. It is working for me.

404 is not fixed, and localhost down is not fixed.

Changes are checked in.

dumbo25 commented 7 years ago

This fixes local host down issue: sudo nano sudo nano /etc/shinken/hosts/localhost.cfg define host{ use linux contact_groups admins host_name your-host-name address localhost } sudo nano /etc/hosts 127.0.0.1 localhost 127.0.1.1 your-host-name

sudo reboot