Hi, I am sort of a newb to UnRAID but I do know Linux and I'm trying to figure out what happened here.. I just purchased my license yesterday and it asked me if I wanted to add my server to my account at unraid.net so I thought, sure. So I did. Then in settings, I clicked the button to create an SSL cert because I thought I would change my connectivity to https and then maybe try out the remote connectivity feature. I needed to move my server to its permanent home so I correctly powered it down, moved it, and powered it back up. Now I have no WebGUI. Going to http://192.168.1.23 gives me "connection refused". Going to https://192.168.1.23 gives me the self-signed cert warning, then I accept, and then I get an error page "ERR_HTTP2_PROTOCOL_ERROR". Shares and SSH etc. seem to be working fine. Checking the logs, I found Nginx throwing the following error. -
2022/09/12 09:18:13 [emerg] 3149#3149: invalid number of arguments in "server_name" directive in /etc/nginx/conf.d/servers.conf:59
When I look at the file on that line, it shows an empty server_name like below. But I cannot change this without it overwriting it to empty again.
server_name ;
It sounds like you have shell access, would you please run this to regenerate the nginx config files?
/etc/rc.d/rc.nginx reload
It sounds like you have shell access, would you please run this to regenerate the nginx config files?
/etc/rc.d/rc.nginx reload
Yeah, I have tried those. But since it sees the config file as invalid with the empty server_name, it won't start and throws the same error. If I add a server name and try to start it, it still throws the error and upon looking at servers.conf, the server_name variable is empty again.
root@unraid:~# /etc/rc.d/rc.nginx start
Starting Nginx server daemon...
nginx: [emerg] invalid number of arguments in "server_name" directive in /etc/nginx/conf.d/servers.conf:61
Yeah, I was looking at the rc.nginx file to see what it was trying to do. It looks like it can't come up with $LANFQDN. Here is my network.ini..
root@unraid:~# cat /var/local/emhttp/network.ini
[eth0]
DHCP_KEEPRESOLV="yes"
DNS_SERVER1="192.168.8.6"
DNS_SERVER2="192.168.8.7"
DNS_SERVER3=""
DHCP6_KEEPRESOLV="no"
BONDING="no"
BONDNAME=""
BONDNICS=""
BONDING_MODE="1"
BONDING_MIIMON="100"
BRIDGING="yes"
BRNAME="br0"
BRNICS="eth0"
BRSTP="no"
BRFD="0"
DESCRIPTION:0=""
PROTOCOL:0="ipv4"
USE_DHCP:0="yes"
IPADDR:0=""
NETMASK:0="0.0.0.0"
GATEWAY:0=""
METRIC:0=""
USE_DHCP6:0="yes"
IPADDR6:0=""
NETMASK6:0=""
GATEWAY6:0=""
METRIC6:0=""
PRIVACY6:0=""
MTU=""
TYPE="access"
[eth1]
BONDING="no"
BONDNAME=""
BONDNICS=""
BONDING_MODE="1"
BONDING_MIIMON="100"
BRIDGING="yes"
BRNAME="br1"
BRNICS="eth1"
BRSTP="no"
BRFD="0"
DESCRIPTION:0="LAN1"
PROTOCOL:0="ipv4"
USE_DHCP:0="no"
IPADDR:0="192.168.8.23"
NETMASK:0="255.255.255.0"
GATEWAY:0="192.168.8.1"
METRIC:0=""
USE_DHCP6:0=""
IPADDR6:0=""
NETMASK6:0=""
GATEWAY6:0=""
METRIC6:0=""
PRIVACY6:0=""
MTU=""
TYPE="trunk"
[eth2]
BONDING="no"
BONDNAME=""
BONDNICS=""
BONDING_MODE="1"
BONDING_MIIMON="100"
BRIDGING="yes"
BRNAME="br2"
BRNICS="eth2"
BRSTP="no"
BRFD="0"
DESCRIPTION:0=""
PROTOCOL:0="ipv4"
USE_DHCP:0="yes"
IPADDR:0=""
NETMASK:0="0.0.0.0"
GATEWAY:0=""
METRIC:0=""
USE_DHCP6:0=""
IPADDR6:0=""
NETMASK6:0=""
GATEWAY6:0=""
METRIC6:0=""
PRIVACY6:0=""
MTU=""
TYPE="trunk"
I was able to get into the WebGUI. Since rc.nginx checks for a cert called "certificate_bundle.pem" in the certs directory, I renamed that file. It then appears to start up OK since the script doesn't create those extra lines for a new server in the nginx config file. I have also been able to enable HTTPS in the "Use TLS/SSL" management setting and have it use port 4443 instead. It's working fine using the self-signed cert. However, the MyServers function appears broken now and I cannot log out of it either. If I put the "certificate_bundle.pem" back in place or use the "Provision" button to get a new cert, Nginx will no longer start and fails with the previous issues again.
Thank you, sir. That was it! It had to be on eth0. eth0 was the internal Realtek NIC I didn't want to use. I'm using an Intel PCIe NIC that gave me eth1 and eth2. I didn't even know I could rearrange the order. It's a good thing I had physical access to the box after reconfiguring them! That's an interesting quirk to the rc.nginx that could cause some other people problems if it's only checking for eth0. I'm no bash script expert so I couldn't tell how it was getting the $LANIP or $LANFQDN in there.
After I rearranged them and hit save, it said I needed to reboot to go into effect. I had a feeling this would be the case and I'd lose connectivity. It made my connected Intel interface eth0 and the second intel interface (disconnected) eth1 as I had rearranged it. After the reboot, the disconnected interface was assigned the static IP since it was now eth1. I had to move the cable to that second Intel interface, remove the static IP, move the cable to Intel primary interface, find its DHCP IP, log in, and re-assign it the static IP. Being a network engineer, it wasn't too much of a headache. Seems good to go though. Thx!
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.