Web Server Failed to Start

#1

This is a bit of a long story, I’ll attempt to be pithy… my son installed Pi-hole (https://pi-hole.net) on my OSMC ATV1, without authorization (longer story). I have managed to remove Pi-hole and my OSMC installation works fine with one exception… The Web Server fails at startup and I am unable to remote control using the Kodi iOS app or a web browser, the only remote that works is the ATV remote. Also, under Services>Remote Control there are options missing that would normally be there.

I am on an older OSMC version (OSMC_TGT_appletv_20151118.img). I stopped there because my only use is music/audio and I believe this was the last version that had the visualizations enabled for music.

I have tried adding the following to my advancedsettings.xml but, it didn’t help:

<advancedsettings>
    <services>
        <esallinterfaces>true</esallinterfaces>
        <webserver>true</webserver>
        <zeroconf>true</zeroconf>
    </services>
</advancedsettings>

I’m very much a Linux novice. Please provide suggestions as to what I can do to recover the remote capability without reinstalling and losing all of my setup. Thanks.

Richie

0 Likes

#2

I fixed your post for you to show your advancedsetting. In the future, use the preformatted tag ( </> ) when posting xml

The settings you changed belong in guisettings.xml not advancedsettings.xml and can be set via the Kodi gui. While you could manually edit the file it’s best to just make your changes using Kodi. If you must change the file manually, make sure you stop Kodi first with

sudo systemctl stop mediacenter
0 Likes

#3

I looked at my guisettings.xml and all of the lines were already set to true. At the bottom of this page (https://kodi.wiki/view/Web_interface) is where I got the “idea” to put the lines in the advancedsettings.xml. Regardless, with the lines set to true in both xml files, I’m still experiencing my issue.

0 Likes

#4

We would need to see logs then:

To get a better understanding of the problem you are experiencing we need more information from you. The best way to get this information is for you to upload logs that demonstrate your problem. You can learn more about how to submit a useful support request here.

So, in summary:

  • activate the logging
  • reboot the OSMC device
  • reproduce the issue
  • upload the log set either using the Log Uploader method within the My OSMC menu in the GUI or the ssh method invoking command grab-logs -A
  • publish the provided URL from the log set upload, here

Thanks for your understanding. We hope that we can help you get up and running again shortly.

0 Likes

#6

Is there a way to enable debugging via SSH? I am not currently at home so, I don’t have access to the Kodi interface, I can only SSH right now and for the next 8-9 hours. Thanks.

0 Likes

#7

I’m not sure. I assume something in guisettings. Probably it’s best to just wait until you get home.

0 Likes

#8

I used 1.2.1 on this page: https://kodi.wiki/view/Log_file/Advanced

Just rebooted the ATV… returning to the How to submit logs page to see what’s next…

0 Likes

#9

Arr, I should have know that…

0 Likes

#10

No worries, I think this is what you want right here:

http://paste.osmc.io/otihivuluw

0 Likes

#11

Hi,

I suggest changing the webport to 8080, as log reports 80 is already in use, You should be able to find this in ~/.kodi/userdata/guisettings.xml

Change:

<webserverport default="true">80</webserverport>

to:

<webserverport>8080</webserverport>

Thanks Tom.

PS

Stop kodi before making the change.

0 Likes

#12

SSH’d in. Stopped mediacenter. Edited guisettings.xml and changed to 8080. Rebooted. Tried to use web browser to connect to IP.address:8080. Still refuses to connect.

Thanks for the suggestion, I’d hoped it’d be that easy but, not quite.

0 Likes

#13

Can you post another set of debug logs. First issue was port 80 was in use. Must be something some other issue now.

0 Likes

#14

Here’s the newest:

http://paste.osmc.io/uqogifuyax

0 Likes

#15

I just FTP’d in and opened the guisettings.xml and it still showed 80, not 8080. Let me try editing this xml file again.

0 Likes

#16

Still trying to bind to port 80.

CWebServer [MHD]: Failed to bind to port 80: Address already in use

Make sure you stop Kodi first otherwise 80 will be written back.

0 Likes

#17

OK, through SSH I sudo nano’d the guisettings.xml file and saved changes. Did sudo reboot. After reboot, the port was still 80 vice 8080. I FTP’d the gui.xml and opened it with a text editor and changed to 8080, uploaded and overwrote the file on the ATV. Ran sudo reboot and it still came back with 80 vice 8080 in the xml file.

I made sure to stop mediacenter each time.

Is there another way I should edit the xml file?

0 Likes

#18

Hi,

For a start I would remove:

<services>
    <esallinterfaces>true</esallinterfaces>
    <webserver>true</webserver>
    <zeroconf>true</zeroconf>
</services>

From advancedsettings.xml, which has bmillham has already advised. I would then reboot and then:

sudo systemctl stop mediacenter

Make the change to guisettings.xml

sudo systemctl start mediacenter

Then please upload fresh logs.

Thanks Tom.

0 Likes

#19

OK Tom, I did everything in the order you stated:

http://paste.osmc.io/mavawecoya

0 Likes

#20

guisettings.xml is still overwriting back to 80. Even after stopping, nano’ing the xml file and starting mediacenter. It’s right back to 80.

As soon as Kodi starts back up, it is overwriting 8080 with 80. I can refresh the FTP and watch the file size of guisettings.xml change just by hitting F5/refresh.

0 Likes

#21

Hi,

Please the following command:

cat ~/.kodi/userdata/guisettings.xml | paste-log

Then post the link here.

Thanks Tom.

0 Likes