Railgun failed to start

#1

Google throws only this topic, but nobody answered him.

I have the same error - “resource limit” - Cloudflare support refused to answer my multiple requests about the issue.

I upgraded my public cloud server - to double memory, CPU, disc – but still see the message:

“]# systemctl start railgun.service -l
Job for railgun.service failed because a configured resource limit was exceeded. See “systemctl status railgun.service” and “journalctl -xe” for details.”

]# systemctl status railgun.service -l
● railgun.service - LSB: Railgun listener
Loaded: loaded (/etc/rc.d/init.d/railgun; bad; vendor preset: disabled)
Active: failed (Result: resources) since Tue 2019-04-16 16:46:27 CEST; 8min a go
Docs: man:systemd-sysv-generator(8)
Process: 21181 ExecStart=/etc/rc.d/init.d/railgun start (code=exited, status=0 /SUCCESS)

Apr 16 16:46:26 xx.net railgun[21181]: Railgun successfully backgrounded, ensuring proper startup…
Apr 16 16:46:26 xx.net railgun[21181]: [FAILED]
Apr 16 16:46:26 xx.net railgun[21181]: Error starting Railgun as a daemon . Running in foreground…
Apr 16 16:46:26 xx.net su[21241]: (to railgun) root on none
Apr 16 16:46:27 xx.net railgun[21181]: Error activating: Activation bypas sed: Error making request: 400 Bad Request
Apr 16 16:46:27 xx.net railgun[21181]: [FAILED]
Apr 16 16:46:27 xx.net systemd[1]: PID 21243 read from file /var/run/rail gun/railgun.pid does not exist or is a zombie.
Apr 16 16:46:27 xx.net systemd[1]: Failed to start LSB: Railgun listener.
Apr 16 16:46:27 xx.net systemd[1]: Unit railgun.service entered failed st ate.
Apr 16 16:46:27 xx.net systemd[1]: railgun.service failed."

Anybody could point me a direction where I have to check those resource settings?

Thxs in advance.

Zoltan

#2

To continue to find the error, and mystical “resource limit” I doubled memcached and railgun -memcached settings also.

Still no luck to start railgun …

1 Like
#3

Looks quite different to the linked post. ‘ressources’ is a more or less generic error message.

Which distribution?

For ubuntu:

Supported Versions

  • Xenial (16.04)
  • Wily (15.10)
  • Vivid (15.04)
  • Utopic (14.10)
  • Trusty (14.04)
  • Precise (12.04)

Double check your setup with the documentation.

#4

Hi Mark,

Its a Cloudlinux 7 64 bit. -originally a Centos 7.

#5

Out of curiosity, do you have ca-certificates installed on your server?

#6

CA Bundles

Railgun includes its own certificate authority bundle for

common certificate providers. Comment ca.bundle out

to use the default openssl bundle provided with the OS

ca.bundle = /etc/pki/tls/certs/railgun-ca-certs.crt

This file exist. Otherwise cPanel comodo ssl installed

#7

I suspect your server cannot connect to memcached for some reason as you were too.

#8

It works.

]# systemctl status memcached
● memcached.service - Memcached
Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2019-04-16 20:12:53 CEST; 2h 40min ago
Main PID: 4291 (memcached)
CGroup: /system.slice/memcached.service
└─4291 /usr/bin/memcached -u memcached -p 11211 -m 1024 -I 128 -c 4008 -s /tmp/memcached.sock -a 0777

#9

So you have memcached on the same server? Does it listen on 127.0.0.1? (if yes change it to 0.0.0.0)

#10

/etc/sysconfig/memcached:

PORT=“11211”
USER=“memcached”
MAXCONN=“4008”
CACHESIZE=“1024”
MAXITEMSIZE=“128m”
OPTIONS="-l 0.0.0.0,::1"
#OPTIONS="-s /tmp/memcached.sock -a 0777"

Changed both in memcached and railgun as well to IP with 0.0.0.0

result - memcached works with IP active.

railgun message same “resource limited”

]# systemctl status memcached
● memcached.service - Memcached
Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2019-04-16 23:06:15 CEST; 5s ago
Main PID: 61046 (memcached)
CGroup: /system.slice/memcached.service
└─61046 /usr/bin/memcached -u memcached -p 11211 -m 1024 -I 128 -c 4008 -l 0.0.0.0,::1

gun.service failed because a configured resource limit was exceeded. See “systemctl status railgun.service” and “journalctl -xe” for details.
[[email protected] ~]# systemctl start railgun.service -l
Job for railgun.service failed because a configured resource limit was exceeded. See “systemctl status railgun.service” and “journalctl -xe” for details.

[[email protected]~]# sudo -u railgun /usr/bin/rg-listener -config=/etc/railgun/railgun.conf
Error activating: Activation bypassed: Error making request: 400 Bad Request

#11

Error making request: 400 Bad Request

So memcached recognizes railgun request as a bad request. One way is capturing the request and see what is wrong with it (in case you are using latest version of memcached which is recommended).

#12

Which way to capture that info?

]# service memcached restart
Redirecting to /bin/systemctl restart memcached.service
[[email protected]~]# systemctl status memcached
● memcached.service - Memcached
Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2019-04-16 23:33:43 CEST; 7s ago
Main PID: 68955 (memcached)
CGroup: /system.slice/memcached.service
└─68955 /usr/bin/memcached -u memcached -p 11211 -m 4096 -I 1 -c 20000 -l 127.0.0.1,::1

]# memcached-tool 0.0.0.0:11211 stats
Couldn’t connect to 0.0.0.0:11211
[[email protected]~]# memcached-tool 127.0.0.1:11211 stats

Apr 16 23:33:43 127.0.0.1 systemd[1]: Started Memcached.
[[email protected] ~]# memcached-tool 127.0.0.1:11211 stats
#127.0.0.1:11211 Field Value
accepting_conns 1
auth_cmds 0
auth_errors 0
bytes 0
bytes_read 7
bytes_written 0
cas_badval 0
cas_hits 0
cas_misses 0
cmd_flush 0
cmd_get 0
cmd_set 0
cmd_touch 0
conn_yields 0
connection_structures 5
curr_connections 4
curr_items 0
decr_hits 0
decr_misses 0
delete_hits 0
delete_misses 0
evicted_unfetched 0
evictions 0
expired_unfetched 0
get_hits 0
get_misses 0
hash_bytes 524288
hash_is_expanding 0
hash_power_level 16
incr_hits 0
incr_misses 0
libevent 2.0.21-stable
limit_maxbytes 4294967296
listen_disabled_num 0
pid 68955
pointer_size 64
reclaimed 0
reserved_fds 20
rusage_system 0.004375
rusage_user 0.005833
threads 4
time 1555450442
total_connections 5
total_items 0
touch_hits 0
touch_misses 0
uptime 21
version 1.4.15

#13

waoo… its a quite old…

current:

But yum wont update…

#14

My guess is railgun is talking to memcached in a protocol which it cannot understand (bad request error) and railgun doesn’t support protocol downgrading.

#15

That is common with software in repos (old software versions). You need to install the latest binary or compile from source.

#16

Yes, I do soon - just make a snapshot backup now…

but, I `m not sure the simple memcached update would solve the issue…

#17

hey - it works!

now all green!

]# systemctl start railgun.service
[[email protected] memcached-1.5.13]# systemctl status memcached
● memcached.service - Memcached
Loaded: loaded (/usr/lib/systemd/system/memcached.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2019-04-17 03:06:11 CEST; 33s ago
Main PID: 25591 (memcached)
CGroup: /system.slice/memcached.service
└─25591 /usr/bin/memcached -u memcached -p 11211 -m 64 -c 1024 -l 127.0.0.1 -U 0

Apr 17 03:06:11 .127.0.0.1 systemd[1]: Started Memcached.
[[email protected] memcached-1.5.13]# systemctl status railgun.service
● railgun.service - LSB: Railgun listener
Loaded: loaded (/etc/rc.d/init.d/railgun; bad; vendor preset: disabled)
Active: active (running) since Wed 2019-04-17 03:06:37 CEST; 12s ago
Docs: man:systemd-sysv-generator(8)
Process: 25674 ExecStart=/etc/rc.d/init.d/railgun start (code=exited, status=0/SUCCESS)
Main PID: 25683 (rg-listener)
CGroup: /system.slice/railgun.service
└─25683 /usr/bin/rg-listener -config /etc/railgun/railgun.conf

Apr 17 03:06:32 .127.0.0.1 systemd[1]: Starting LSB: Railgun listener…
Apr 17 03:06:32 .127.0.0.1 runuser[25680]: pam_unix(runuser:session): session opened for user railgun by (uid=0)
Apr 17 03:06:32 .127.0.0.1 railgun[25674]: Starting railgun: [ OK ]
Apr 17 03:06:37 .127.0.0.1 railgun[25674]: Railgun successfully backgrounded, ensuring proper startup…
Apr 17 03:06:37 .127.0.0.1 railgun[25674]: [ OK ]
Apr 17 03:06:37 .127.0.0.1 systemd[1]: Started LSB: Railgun listener.
[[email protected] memcached-1.5.13]#

#18

[[email protected]]# ./configure --prefix=/usr/local/memcached

the extra “–enable-sasl” wasnt worked for me…
[[email protected]]# make && make test && sudo make install

but the issue caused probably by the old repo centos 7 / cloudlinux 7 provided