hawk icon indicating copy to clipboard operation
hawk copied to clipboard

centos7.6 Unable to display login page

Open Jaycean opened this issue 5 years ago • 15 comments

Steps to reproduce

  1. I have carried out the installation steps correctly
  2. I run the following command to start the server and it doesn't seem to be a problem
[root@node190 bin]# ./hawk  start
[12841] Puma starting in cluster mode...
[12841] * Version 4.3.5 (ruby 2.5.5-p157), codename: Mysterious Traveller
[12841] * Min threads: 0, max threads: 1
[12841] * Environment: development
[12841] * Process workers: 1
[12841] * Preloading application
[12841] * Listening on unix:///usr/share/hawk/tmp/hawk.sock
[12841] ! WARNING: Detected 1 Thread(s) started in app boot:
[12841] ! #<Thread:0x00000000034a3aa0@/opt/rh/rh-ruby25/root/usr/share/gems/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/ruby_thread_local_var.rb:38 sleep_forever> - /opt/rh/rh-ruby25/root/usr/share/gems/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/ruby_thread_local_var.rb:40:in `pop'
[12841] Use Ctrl-C to stop
[12841] - Worker 0 (pid: 12876) booted, phase: 0
  1. But when I visit the web : https://:7630,Nothing image

  2. I made an error while testing the hawkapi-server project,It seems that there is no route. I need to write swagger.json?

[root@node190 bin]# curl --insecure -u hacluster:password https://<ip>:7630/api/v1/cib
[api/v1]: No route for /api/v1/cib

Jaycean avatar Jul 11 '20 08:07 Jaycean

@Jaycean hi thx for issue. the swagger.json isn't needed.

How do you install hawk? Via rpm or from source?

journalctl -u hawk and journalctl -u hawk-apiserver

MalloZup avatar Jul 15 '20 13:07 MalloZup

if you are running hawk with the hawkapi-server the best way is to use systemd services

MalloZup avatar Jul 15 '20 13:07 MalloZup

@MalloZup Thx you again for your patience. Obviously, I am a novice

I use source to install hawk,But it didn't work, so I tried to start it with docker

I'm sorry to mention the issue of the docker project here, but there seems to be no one to maintain that project Error invoking /usr/sbin/cibadmin -Ql: Signon to CIB failed: Transport endpoint is not connected Init failed, could not perform requested operations 2020-07-16 15-24-55

The pacemaker service inside docker failed to start ERROR: Failed to start pacemaker.service

2020-07-16 15-25-09

Do I need to mount or set relevant configuration after docker is started?

Jaycean avatar Jul 16 '20 07:07 Jaycean

@Jaycean nice thx! Your feedback is always welcome!

No worry for novices we are all, only in different things :grin:

Good question. So the dockerfile, where did you get it?

https://github.com/krig/docker-hawk ?

MalloZup avatar Jul 16 '20 07:07 MalloZup

@MalloZup Yes, I got dockerfile from there

Jaycean avatar Jul 16 '20 07:07 Jaycean

@MalloZup I took a look at the hawk log installed in source

[root@node190 ~]# journalctl -u hawk
7月 16 07:36:13 node190 systemd[1]: hawk.service: main process exited, code=exited, status=203/EXEC
7月 16 07:36:13 node190 systemd[1]: Unit hawk.service entered failed state.
7月 16 07:36:13 node190 systemd[1]: hawk.service failed.
7月 16 07:36:18 node190 systemd[1]: hawk.service holdoff time over, scheduling restart.
7月 16 07:36:18 node190 systemd[1]: Stopped HA Web Konsole.
7月 16 07:36:19 node190 systemd[1]: Starting HA Web Konsole...
7月 16 07:36:19 node190 systemd[1]: Started HA Web Konsole.
[root@node190 ~]# journalctl -u hawk-apiserver
-- No entries --

Now, there are problems with both installation methods. Moreover, I also require CentOS, which may be more convenient to use openSUSE

Jaycean avatar Jul 16 '20 07:07 Jaycean

@Jaycean yes no problem with CentOS. What I mean is that you can install RPM from opensuse to your centos vm. the same I do sometimes from centos to opensuse when there are no pkg avail

Regarding the docker Image, that repo is not maintained.

regarding your logs, can you show systemctl status hawk and systemctl status hawk-apiserver? and can you post the full logs with the journalctlcmd? TIA

There is no useful message there

MalloZup avatar Jul 16 '20 07:07 MalloZup

@MalloZup Does it look like the service isn't started?

[root@node190 hawk-apiserver]# systemctl status hawk
● hawk.service - HA Web Konsole
   Loaded: loaded (/usr/lib/systemd/system/hawk.service; disabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: exit-code) since 四 2020-07-16 08:00:53 UTC; 453ms ago
  Process: 26778 ExecStart=/usr/sbin/hawk-apiserver -key ${HAWK_KEY} -cert ${HAWK_CERT} -port ${HAWK_PORT} -config /etc/hawk/server.json (code=exited, status=203/EXEC)
  Process: 26772 ExecStartPre=/usr/share/hawk/bin/generate-ssl-cert (code=exited, status=0/SUCCESS)
 Main PID: 26778 (code=exited, status=203/EXEC)

7月 16 08:00:53 node190 systemd[1]: Unit hawk.service entered failed state.
7月 16 08:00:53 node190 systemd[1]: hawk.service failed.

API server I started with. / hawk apiserver - config

Jaycean avatar Jul 16 '20 08:07 Jaycean

@Jaycean yes it looks like this. But we need more log from journalctl.

do journalctl -r and check why the service failed. There should be an error

MalloZup avatar Jul 16 '20 08:07 MalloZup

@Jaycean I might try to setup a centos environment later on and maybe improving the doc. However if you can debug it more would be super helpfull

MalloZup avatar Jul 16 '20 08:07 MalloZup

@MalloZup No problem. I'll try it myself, and later I'll try it with CentOS 8

Jaycean avatar Jul 16 '20 08:07 Jaycean

@Jaycean with 7.6, just post the full logs from command journalctl -u hawk I can't find any error

tia :sunflower:

MalloZup avatar Jul 16 '20 08:07 MalloZup

@MalloZup I took a look at the log, and it was basically full of this error message

Scroll through the log and try to send the request:journalctl -u hawk -f

7月 16 09:10:27 node190 systemd[1]: Started HA Web Konsole.
7月 16 09:10:27 node190 systemd[1]: hawk.service: main process exited, code=exited, status=203/EXEC
7月 16 09:10:27 node190 systemd[1]: Unit hawk.service entered failed state.
7月 16 09:10:27 node190 systemd[1]: hawk.service failed.
7月 16 09:10:32 node190 systemd[1]: hawk.service holdoff time over, scheduling restart.
7月 16 09:10:32 node190 systemd[1]: Stopped HA Web Konsole.
7月 16 09:10:32 node190 systemd[1]: Starting HA Web Konsole...
7月 16 09:10:32 node190 systemd[1]: Started HA Web Konsole.
7月 16 09:10:32 node190 systemd[1]: hawk.service: main process exited, code=exited, status=203/EXEC
7月 16 09:10:32 node190 systemd[1]: Unit hawk.service entered failed state.
7月 16 09:10:32 node190 systemd[1]: hawk.service failed.
7月 16 09:10:37 node190 systemd[1]: hawk.service holdoff time over, scheduling restart.
7月 16 09:10:37 node190 systemd[1]: Stopped HA Web Konsole.
7月 16 09:10:37 node190 systemd[1]: Starting HA Web Konsole...
7月 16 09:10:37 node190 systemd[1]: Started HA Web Konsole.
7月 16 09:10:37 node190 systemd[1]: hawk.service: main process exited, code=exited, status=203/EXEC
7月 16 09:10:37 node190 systemd[1]: Unit hawk.service entered failed state.
7月 16 09:10:37 node190 systemd[1]: hawk.service failed.
7月 16 09:10:42 node190 systemd[1]: hawk.service holdoff time over, scheduling restart.
7月 16 09:10:42 node190 systemd[1]: Stopped HA Web Konsole.
7月 16 09:10:42 node190 systemd[1]: Starting HA Web Konsole...
7月 16 09:10:42 node190 systemd[1]: Started HA Web Konsole.
7月 16 09:10:42 node190 systemd[1]: hawk.service: main process exited, code=exited, status=203/EXEC
7月 16 09:10:42 node190 systemd[1]: Unit hawk.service entered failed state.
7月 16 09:10:42 node190 systemd[1]: hawk.service failed.
7月 16 09:10:47 node190 systemd[1]: hawk.service holdoff time over, scheduling restart.
7月 16 09:10:47 node190 systemd[1]: Stopped HA Web Konsole.
7月 16 09:10:48 node190 systemd[1]: Starting HA Web Konsole...
7月 16 09:10:48 node190 systemd[1]: Started HA Web Konsole.
7月 16 09:10:48 node190 systemd[1]: hawk.service: main process exited, code=exited, status=203/EXEC
7月 16 09:10:48 node190 systemd[1]: Unit hawk.service entered failed state.
7月 16 09:10:48 node190 systemd[1]: hawk.service failed.
7月 16 09:10:53 node190 systemd[1]: hawk.service holdoff time over, scheduling restart.
7月 16 09:10:53 node190 systemd[1]: Stopped HA Web Konsole.
7月 16 09:10:53 node190 systemd[1]: Starting HA Web Konsole...
7月 16 09:10:53 node190 systemd[1]: Started HA Web Konsole.
7月 16 09:10:53 node190 systemd[1]: hawk.service: main process exited, code=exited, status=203/EXEC
7月 16 09:10:53 node190 systemd[1]: Unit hawk.service entered failed state.
7月 16 09:10:53 node190 systemd[1]: hawk.service failed.
7月 16 09:10:58 node190 systemd[1]: hawk.service holdoff time over, scheduling restart.
7月 16 09:10:58 node190 systemd[1]: Stopped HA Web Konsole.
7月 16 09:10:58 node190 systemd[1]: Starting HA Web Konsole...
7月 16 09:10:58 node190 systemd[1]: Started HA Web Konsole.
7月 16 09:10:58 node190 systemd[1]: hawk.service: main process exited, code=exited, status=203/EXEC
7月 16 09:10:58 node190 systemd[1]: Unit hawk.service entered failed state.
7月 16 09:10:58 node190 systemd[1]: hawk.service failed.
7月 16 09:11:03 node190 systemd[1]: hawk.service holdoff time over, scheduling restart.
7月 16 09:11:03 node190 systemd[1]: Stopped HA Web Konsole.
7月 16 09:11:03 node190 systemd[1]: Starting HA Web Konsole...
7月 16 09:11:03 node190 systemd[1]: Started HA Web Konsole.
7月 16 09:11:03 node190 systemd[1]: hawk.service: main process exited, code=exited, status=203/EXEC
7月 16 09:11:03 node190 systemd[1]: Unit hawk.service entered failed state.
7月 16 09:11:03 node190 systemd[1]: hawk.service failed.

I am also very confused, there is no reference error information

Jaycean avatar Jul 16 '20 09:07 Jaycean

@Jaycean ok I see. I will use a centos VM. Can you describe me how did you install hawk?

MalloZup avatar Aug 01 '20 15:08 MalloZup

  • I use the command to install pcs pacemaker corosync:yum install pcs pacemaker corosync fence-agents-all resource-agents-all
  • hawk-apiserver: go build
  • hawk : Ruby gem installation related dependencies bundle install and make

Jaycean avatar Aug 03 '20 08:08 Jaycean