Can't reach server via browser

So when I first boot my server on my rpi 4, I can reach the server from my desktop computer via the browser no problem. But after it's been running a while, I get "this site can't be reached" every time. On the touchscreen it's running just fine and I can control it there, but I can't do anything from my computer, or remotely if I needed to. This also applies to ssh. I can't reach it there either. It's like it's gone but the router shows it as connected.

 I'm using a static ip assigned in the router, and it's showing connected to the network every time in the router. But it will not load leaving me dead in the water unless I'm standing at the touchscreen controller. I've searched for solutions but nothing seems to match my situation. 

The reason I'm asking here, is because I also have a pi running octoprint on another machine, which I never have any problems reaching. This is why I'm led to believe it's something in the rep-server setup? I don't suspect a bug, but rather something I'm missing. Any idea what it is?

Comments

  • edited January 2021
    Now I forgot to mention, it seems to come back after about 10 minutes of waiting?? For example, when I posted this, it was unreachable. Now I hit reload again (for like the 18th time), and it's there. I don't understand this. And also, I have tried using both the static ip (192.168.1.20), and adding the :3344 at the end. That doesn't help.
  • Are you using wired or wifi? Also with static ip you must take one that is outside the reserved ip range of your routers dhcp server, which normally starts low, so 192.168.1.20 might be inside this and could be assigned to a different device as well! 

    If you are using wifi you should go on touch screen to wifi setup and see what it says. If it switches between AP mode and wifi then it is loosing wifi connection from time to time (or server thinks because it is not visible). In that case set AP to never enable. That should keep wifi active and reconnect as fast as possible. I think octoprint has no switch to AP so doe snot have that possible problem.
  • It's connected via wifi. As I mentioned, it's connected. But not reachable. Says connected on the touchscreen, and in the routers configuration. But it will not load.
    I didn't mention before, but I did try turning off the AP mode. That didn't help. In fact, it's still off right now. It's on never enable. 
     
    I'm guessing it is some problem between the server and the router because if I just go to the router settings, and hit save on anything so that it reloads, then it will come back up. Other times it just comes up after about 10 minutes or so. It's got me baffled.

    So I just changed the static ip to a number outside of the range as you've specified, so we'll see how that goes the very next time I try to load it! At first I thought it was a "sleeping" issue, but I"ve brought up the touchscreen to make sure the server was "awake," and it doesn't help. I'll report back later. Thanks!
  • > I'm guessing it is some problem between the server and the router because if I just go to the router settings, and hit save on anything so that it reloads, then it will come back up. Other times it just comes up after about 10 minutes or so. It's got me baffled.

    You mean your internet router? Yes it is strange also we have a similar problem with our fritzbox that the driver suddenly stops working. What router do you have? 

    At least last image has definitivly set power management to off for wifi since that is known to also cause problems.

    But lets see if a ip in range allowed from router makes already a difference.
  • edited January 2021
    It's an Asus RT-AC86U. And so today I woke up to 2 prints still going, one finished, and can't reach the server via my phone on the same network. Again, about 5 minutes later, it loaded. Now I'm waiting for it to be reachable from my desktop. But I can reach it on my phone, telling me it does work, and is connected (I started a print from my phone), but now it's unreachable from my desktop. I don't get it. It's very annoying as I can't monitor my prints from anywhere but standing in front of them, or wait until it finally loads in a browser.

    And for the record, I can't run an ethernet cable to the pi. I can for diagnostics or whatever, but it would be running across the entire room to reach it, so is not a permanent solution.

    So long story short, no progress here.
  • Ok, so desktop doe snot work but phone works same time. Means there is a connection pi - router. But the problem is that the routing between the devices is broken.  Are all devices in the same subnet? Do they use the same subnet mask - after all you defined ip statically so you had also to define gateway and netmask for it correctly. Normally /24 is the mask meaning the last byte can vary but the first 3 in ip v4 are fixed.
  • Should I not use a static ip and just try the hostname?
  • Best is to tell dhcp server on your router to always assign same ip address. Much easier then assigning a valid static ip and mask and gateway that does not get used by dhcp as well.

    The hostname.local also should work if it is unique (only one instance running or name made unique) and if os supports bonjour protocol.
  • Repetier said:
    Best is to tell dhcp server on your router to always assign same ip address. Much easier then assigning a valid static ip and mask and gateway that does not get used by dhcp as well.

    The hostname.local also should work if it is unique (only one instance running or name made unique) and if os supports bonjour protocol.
    Yes, this is what I'm doing. And using the .local address also doesn't work. It now connects straight away unlike the original issue stated above, but when I come back to it later in the day, it's not connected. AP mode is off, but it will not stay connected therefore defeating most of the reason for using it. Being able to connect to it from anywhere, at least on my local network but it's always gone after a while. Looking in my router, it's not even connected. Going to the touch screen I see it's "unconnected" but will not reconnect no matter how many times I try to connect it there. 

    Has to be something I'm missing, but I can't figure out what.
  • Correction: I can't even use this thing. Will not connect. When it does, it immediately goes away. But I'm using my octoprint pi on wifi no problems. This is what leads me to believe it's in the repetier server, and not my router configuration or otherwise. Is there  a refund option if I can't get this fixed??? It's aggravating. The reason I'm so late replying to this topic again is because I already gave up on it then tried again. But it's proving to be useless at this point. 
  • When the wifi configuration over repetier-server is not working (which actually just generates a wpa_supplicant file until wifi is not connected any more), you can disable this and do it manually so server can not interfere.
    Just install the deb package on your octopi image or an original Raspbian image or use our image when you are in wifi connected mode and rename /var/lib/Repetier-Sertup/manageWifiAccess - then server does not try to control wifi and will not interfere in any case.
  • Repetier said:
    When the wifi configuration over repetier-server is not working (which actually just generates a wpa_supplicant file until wifi is not connected any more), you can disable this and do it manually so server can not interfere.
    Just install the deb package on your octopi image or an original Raspbian image or use our image when you are in wifi connected mode and rename /var/lib/Repetier-Sertup/manageWifiAccess - then server does not try to control wifi and will not interfere in any case.
    This is only showing in a fresh image? Because I don't see it on my card. I have /var/lib/Repetier-Server/ but nothing with manageWifiAccess in there. I've found several in other locations though. 

    /usr/local/Repetier-Server/debian
    /usr/local/Repetier-Server/debeian/direct
    /usr/local/Repetier-Server/debian/nm
    /usr/local/Repetier-Setup/bin

    Is it any of these? Or do I have to reflash first? 

    For the record, my wifi access point show up in the touchscreen, but when I try to connect, it simply will not.
  • Please wait for next image. I'm just writing a manual mode where you put the wpa supplicant file in /boot and if you do so image will copy it to the right place and server will disable internal wifi management completely. As a last solution for those who think server is causing problems. That way network config will definitively not change any more so any unstable parts can not trigger unwanted actions. 
  • So, I went ahead and started from scratch. I downloaded the image, reflashed, and setup over again. Everything worked, except when I assigned the server a static ip via my router. That's when things went south. This seems to be the issue, although I don't know why?? I've assigned many things on my network static ip's so I can reach them without using a host name. They all function fine, including an octoprint rpi. So I'm just using a hostname with repetier, and so far I've had no problems connecting. I can live with that!
  • Not really a server issue if router fails to assign a static ip. How do you do it? Bind IP to the mac? That is what you should do. Do not try to assign it a static ip outside the dhcp system. That always gets ugly.
  • The asus router does it pretty easily. When I view a list of connected devices, if I choose one, and change the ip, then it binds the ip address to that device. I can also do it in the lan settings, under the dhcp server. As stated, I have 4 other items in there binded, but whenever I try to bind the repetier pi to a certain IP, I go back to having connection issues with it. So far so good with no binding, and just using the host name. 

    But the answer is yes, the ip is binding to the mac address in the router. It will show the address as binded in the router whenever I try it, but connecting to it is either impossible, or hit and miss. When doesn't make sense to me considering I can reach all the other items binded.
  • I wonder which ip then the working .local address has? It uses dhcp after all. Only thing I can think of is that it gets a ipv6 ip instead. Both is active on our image. You could try ping at the local address to see the ip that then gets used.
  • Repetier said:
    I wonder which ip then the working .local address has? It uses dhcp after all. Only thing I can think of is that it gets a ipv6 ip instead. Both is active on our image. You could try ping at the local address to see the ip that then gets used.
    It's showing  as 192.168.2.213 in the router. I can reach it from that ip, or the local address, which is what I use in the event the ip changes. This is why I typically bind the addresses of devices I require login to.

  • So if local also does not work, what does this solution mean:
    > So I'm just using a hostname with repetier, and so far I've had no problems connecting. I can live with that!

    and what ip does it then get. Actually I'm a bit confused about your situation and solution.
  • Repetier said:
    So if local also does not work, what does this solution mean:
    > So I'm just using a hostname with repetier, and so far I've had no problems connecting. I can live with that!

    and what ip does it then get. Actually I'm a bit confused about your situation and solution.
    Basically that local is working I guess. <span>:smile:</span> I use http://nwa.local and I can reach it. The router has been issuing 192.168.2.213 to it. But it seems whenever I try to bind 192.168.2.10 to it, I have problems. 
  • > But it seems whenever I try to bind 192.168.2.10 to it, I have problems. 
    Ok how do you do that? Do you add that ip manually in wifi or ethernet as manual ip address? Is this ethernet or wifi? Did you set netmask correctly in that case on pi? For latest image you can now provide a own wpa_supplicant file if the server version does not work as expected and you need special settings.
  • this makes no sense to me, why would you need to reach the server locally if you are in your house or shop? i am trying to reach the server externally and it just does not work, have external IP:2000 nat'd to local server IP:3344 and it is simply not reachable.  however i can reach it locally.
  • https://www.repetier-server.com/knowledgebase/access-server-from-internet/

    describes possible solutions. If your internet provider connects you with shared IPv4 address forwarding does not work on your router. Provider will then map port 2000 to something you can not predict. Happens e.g. with DSLight connections. You need a dedicated ipv4 that is only for you.
  • null
    Hmm, I'm on satellite internet sadly but I think I should at least be able to connect at least once with whatever is current on my router, the odd thing I did notice is my router admin portal shows me one IP address for the WAN that is completely different from what IP chicken or DynDns is reporting..
  • There are many services that offer showing your ip as well. Maybe dyndns is not being updated so it shows a past ip.

    You might want to try the ngrok solution. That works on all connections since it forwards to a public ip from wehre you access it. Only thing is with every restart the free version gets a different link.
  • Ok, I will give that a shot tonight, thank you for responding
  • edited May 2021
    Sonicboom said:
    this makes no sense to me, why would you need to reach the server locally if you are in your house or shop? i am trying to reach the server externally and it just does not work, have external IP:2000 nat'd to local server IP:3344 and it is simply not reachable.  however i can reach it locally.
    Seriously? How else would I use it?? My server is running on a rasp pi and in order to use it, I have to reach it. Which btw, I am still having this problem. I keep getting told to check this and that in the pi settings, but it has to be repetier since I'm running octoprint on another pi for another printer without ever having connection issues. Repetier simply will not remain connected. Period. In fact, it says now on my touchscreen that I have no wlan adapter installed. So, what? I removed it while it was running??? This is so aggravating.
  • Starting with image V25 you can provide the wpa supplicant file directly and server will stop checking wlan connection. See https://www.repetier-server.com/knowledgebase/wlan-configuration-on-sd-card/
    You can even use the wpa supplicant you hat for octoprint as long as it has the required name. Then it is just linux and it's packages (also same are used when server manages them, but on some answers we disconnect/switch to AP which might be the problem here). Linux is just the lasten RasbianOS. On every new image we update all packages.
Sign In or Register to comment.