Jump to content

Anyone running nodelink on synology in docker?


sorka

Recommended Posts

Posted

There's a sticky from io_guy that says if you don't know what docker is this isn't for your. I know what docker is and appreciate any how tos that anyone else who is running Nodelink in docker on a synology nas might impart.

 

Posted
There's a sticky from io_guy that says if you don't know what docker is this isn't for your. I know what docker is and appreciate any how tos that anyone else who is running Nodelink in docker on a synology nas might impart.
 

I am. Will look back at my notes and let you know. If I recall, the only issue I had was getting the correct time zone set. And that would probably only affect log time stamping.


Sent from my iPhone using Tapatalk
Posted
Thanks. FYI, it looks like this image on the docker registry:
 
https://hub.docker.com/r/apnar/nodelink
 
is kept up to date. Any reason why I can't just use the Registry docker tab on my Synology to load this image? It has 500K+ downloads. Are there really that many users of ISY and nodelink??


That is the image I used. There really wasn’t much to setting it up. It was my first docker use, so most of it was getting to understand the basic concept and procedure on Synology.


Sent from my iPhone using Tapatalk
Posted

So downloading the image and running it in a container was basically no effort at all, but it terminates immediately presumably because I haven't configured it properly. 

How do I configure it? Is that through startup.sh? Is there already such a file or do I need to create it and provide as an import? 

Posted

I've run it on a Synology many times.  I build it from the command line per the instructions I posted in my sticky.

  • Put the Dockerfile and startup.sh in the directory you want to run it from (within your docker share).
  • From SSH run the "docker build" I posted
  • From SSH run the "docker run" I posted

After it's complete you'll see it running under the Synology docker GUI.

I don't see why the version from the registry wouldn't work, it copied the same commands.  What error are you seeing under the container log?

 

 

Posted
14 hours ago, sorka said:

So downloading the image and running it in a container was basically no effort at all, but it terminates immediately presumably because I haven't configured it properly. 

How do I configure it? Is that through startup.sh? Is there already such a file or do I need to create it and provide as an import? 

I did not change the startup.sh script that came with the registry download.

The difficult part for me, was trying to figure out how to correlate the settings in the GUI to those specified in the Dockerfile(s).

Here is what I can piece together from my settings & playing around with Docker now.

1) Downloaded the image you mentioned above (apnar/nodelink) from the registry.

2) Select the downloaded image (under image tab) and launch.

3) Select advanced settings tab and configured as follows:

Enabled auto-restart under Advanced Settings tab.

(I had created a docker share called docker prior.)

Under Volume tab I added/created a folder '/docker/NodeLink' and specified mount path as '/NodeLink'

Under Network I left bridge connection as is.

Under Port Settings I added 8090 for both local and container ports as TCP.

Under Port Settings I added 2405 for both local and container ports as TCP. (for relay server, not sure if it was needed)

Left link settings blank.

Under Environment, I have a PATH (usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin) and MONO_VERSION (5.8.0.108) listed. 

My MONO version is from an older image download.  The current download I did shows 5.16.0.179.

I recall there being some issues with one of the later or latest MONO versions, so not sure if that will cause problems.

Entrypoint is setup as: /startup.sh

4) Apply the settings above and start the container.

I used a terminal session (through the GUI) once the container was running to login and perform the following command (to correct the timezone).

ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime

Obviously you would need to look in the /usr/share/zoneinfo directory and pick your correct timezone.

 

Posted
10 hours ago, io_guy said:

I've run it on a Synology many times.  I build it from the command line per the instructions I posted in my sticky.

  • Put the Dockerfile and startup.sh in the directory you want to run it from (within your docker share).
  • From SSH run the "docker build" I posted
  • From SSH run the "docker run" I posted

After it's complete you'll see it running under the Synology docker GUI.

I don't see why the version from the registry wouldn't work, it copied the same commands.  What error are you seeing under the container log?

I'll read through gzahar's notes next.

 

 

I had only gotten as far as starting it up last night without really trying to figure it all out. I assumed I'd have to modify some configuration file somewhere at the very least to point at the IP address of my EVL-4. 

Posted
30 minutes ago, sorka said:

 

I had only gotten as far as starting it up last night without really trying to figure it all out. I assumed I'd have to modify some configuration file somewhere at the very least to point at the IP address of my EVL-4. 

So all of that configuration is done through the Nodelink web interface.  [YOUR NAS IP]:8090 by default.

Posted

Oh that's cool. I had no idea nodelink had a web interface. Shows you how much I know :) 

Hoping to get some more time this evening. Family over for x-mas has kept me from spending more than just a minute or two before my wife starts bugging me.

Posted

Followed your steps almost.

MONO_VERSION is listed as 5.16.0.179. Should I change it? Is the MONO net framework part of the container I downloaded or is this part of the docker environment?

 

I didn't find any way to configure or even find the entry point /startup.sh.

 

But under "details", I see:

Capture.JPG.fe83306dbb2db2f12e1db8714c1c6458.JPG

 

Anything here look out of place?

 

A log snippet:

 

2018-12-26 22:25:29 stdout  
2018-12-26 22:25:29 stdout 2018-12-26 22:25:29 - No password specified for the ISY
2018-12-26 22:25:29 stdout 2018-12-26 22:25:29 - Web config server started (http://172.17.0.2:8090)
2018-12-26 22:25:28 stdout 2018-12-26 22:25:28 - Mono version: 5.16.0.179 (tarball Thu Oct  4 10:29:21 UTC 2018)
2018-12-26 22:25:28 stdout 2018-12-26 22:25:28 - OS: Linux apnar-nodelink1 3.10.105 #23824 SMP Fri Oct 12 18:30:00 CST 2018 x86_64 GNU/Linux
2018-12-26 22:25:28 stdout 2018-12-26 22:25:28 - ISY NodeLink Server v0.9.25 started
2018-12-26 22:25:26 stdout   at i.m () [0x00855] in <6e5af0f8441043e3a64bcd8ba1589e8f>:0 
2018-12-26 22:25:26 stdout   at NodeLink.RestISY..ctor (System.String user, System.String password, System.String address, System.Boolean SSL) [0x00687] in <6e5af0f8441043e3a64bcd8ba1589e8f>:0 
2018-12-26 22:25:26 stdout   at NodeLink.RestISY.GetDescription () [0x00000] in <6e5af0f8441043e3a64bcd8ba1589e8f>:0 
2018-12-26 22:25:26 stdout   at NodeLink.RestISY.b (System.String A_0, System.Boolean A_1) [0x0000e] in <6e5af0f8441043e3a64bcd8ba1589e8f>:0 
2018-12-26 22:25:26 stdout   at NodeLink.RestISY.a (System.String A_0, System.Boolean A_1) [0x0009a] in <6e5af0f8441043e3a64bcd8ba1589e8f>:0 
2018-12-26 22:25:26 stdout   at System.Uri..ctor (System.String uriString) [0x00014] in <9b672a45b19f4d52b5f28f32c0c91d97>:0 
2018-12-26 22:25:26 stdout   at System.Uri.CreateThis (System.String uri, System.Boolean dontEscape, System.UriKind uriKind) [0x0007b] in <9b672a45b19f4d52b5f28f32c0c91d97>:0 
2018-12-26 22:25:26 stdout [ERROR] FATAL UNHANDLED EXCEPTION: System.UriFormatException: Invalid URI: The hostname could not be parsed.
2018-12-26 22:25:26 stdout   at i.m () [0x00855] in <6e5af0f8441043e3a64bcd8ba1589e8f>:0 
2018-12-26 22:25:26 stdout   at NodeLink.RestISY..ctor (System.String user, System.String password, System.String address, System.Boolean SSL) [0x00687] in <6e5af0f8441043e3a64bcd8ba1589e8f>:0 
2018-12-26 22:25:26 stdout   at NodeLink.RestISY.GetDescription () [0x00000] in <6e5af0f8441043e3a64bcd8ba1589e8f>:0 
2018-12-26 22:25:26 stdout   at NodeLink.RestISY.b (System.String A_0, System.Boolean A_1) [0x0000e] in <6e5af0f8441043e3a64bcd8ba1589e8f>:0 
2018-12-26 22:25:26 stdout   at NodeLink.RestISY.a (System.String A_0, System.Boolean A_1) [0x0009a] in <6e5af0f8441043e3a64bcd8ba1589e8f>:0 
2018-12-26 22:25:26 stdout   at System.Uri..ctor (System.String uriString) [0x00014] in <9b672a45b19f4d52b5f28f32c0c91d97>:0 
2018-12-26 22:25:26 stdout   at System.Uri.CreateThis (System.String uri, System.Boolean dontEscape, System.UriKind uriKind) [0x0007b] in <9b672a45b19f4d52b5f28f32c0c91d97>:0 
2018-12-26 22:25:26 stdout System.UriFormatException: Invalid URI: The hostname could not be parsed.
2018-12-26 22:25:26 stdout Unhandled Exception:
2018-12-26 22:25:26 stdout  
2018-12-26 22:25:25 stdout 2018-12-26 22:25:25 - No password specified for the ISY
2018-12-26 22:25:25 stdout 2018-12-26 22:25:25 - Web config server started (http://172.17.0.2:8090)
2018-12-26 22:25:25 stdout 2018-12-26 22:25:25 - Mono version: 5.16.0.179 (tarball Thu Oct  4 10:29:21 UTC 2018)
2018-12-26 22:25:25 stdout 2018-12-26 22:25:25 - OS: Linux apnar-nodelink1 3.10.105 #23824 SMP Fri Oct 12 18:30:00 CST 2018 x86_64 GNU/Linux
2018-12-26 22:25:25 stdout 2018-12-26 22:25:25 - ISY NodeLink Server v0.9.25 started
Posted

Hmm, so I found this:

 

Does NodeLink need to communicate with the ISY before you can get to the NodeLink config page? I have not yet installed v5 on my ISY. I was kind of hoping to get to the point I could be sure I'd at least be able to get NodeLink up before I took the plunge to update my ISY to v5 given the only reason I need to goto v5 is if I want to ditch my IT100 attached to HomeSeer 2 on my PC and have my DSC communicate directly with the ISY via the EVL-4 via NodeLink.

 

Posted

The downloaded image has some connection to the Mono version.  Not sure if it includes that version of mono or is specifying which version to use.  I think the former?

 Nodelink does not need to communicate with the ISY before you get to the config page.

Can you open a terminal session through docker?  Go to terminal tab (under details)  and click create.

That should create a line that says 'bash'.  Click on that and you should see a prompt in the window.

cd to / and look for startup.sh

If you have/find this you might try to edit this file with the posted fix for mono 5.16.

replace

exec mono /NodeLink/NodeLink.exe

with

exec mono -O=-aot /NodeLink/NodeLink.exe

I'm really just guessing here.  Hopefully io_guy will have better answers.

Posted

I can't do a terminal session because the container restarts over and over every few seconds due to that parsing exception.

 

I can ssh into the nas and cd to volume1/docker/NodeLink but the only two files there are config.xml and NodeLink.exe

Posted

My last thoughts...

If you don't enable the automatic restart setting, would it let you start a terminal session after NodeLink crashes.

Looking at the post you linked to above, it appears to be the same error.

io_guy didn't know the cause, but the solution for that case was to add 'ISY' and it's IP address to the /etc/hosts file.

To me it looks like NodeLink is trying to resolve the hostname "ISY' ??? when it doesn't have an IP address entered for the ISY yet.

While I don't think it should need to talk to the ISY (to get the web interface up and running), you could try to add an invalid IP for "ISY' so at least it resolves to something.

You could also put the real IP address of your ISY and I don't think that would be a problem since it probably can't configure anything w/o the password.

If all else fails, use the Dockerfile and startup.sh files with the command line.  I wasn't sure of where the files needed to be located and what user level/permissions were required when executing the commands; so I went the GUI route.

Posted

Good thought on disabling auto restart. It didn't work but it I should have thought of that. As soon as the exception occurs, the terminal disappears.

 

Is the host file your talking about the one one on the nas itself or is this a file that's in the docker container somewhere? 

 

 

Posted

The aot is only for Raspberry Pis. 

Your URI issue is NodeLink not being able to resolve "ISY".  Go to the config and enter the actual IP.  

Posted
15 minutes ago, io_guy said:

The aot is only for Raspberry Pis. 

Your URI issue is NodeLink not being able to resolve "ISY".  Go to the config and enter the actual IP.  

The problem is they are not able to get to the config web page. (or any webpage)

Are you saying to edit the confg.xml file directly?

Posted
1 hour ago, io_guy said:

The aot is only for Raspberry Pis. 

Your URI issue is NodeLink not being able to resolve "ISY".  Go to the config and enter the actual IP.  

 

Do you mean a config file or the UI on the NodeLink web server? If the latter, that's not possible because the container shuts down after the unhandled exception from failing to parse the URI.

Posted

I went ahead and added ISY to my /etc/hosts file on the nas itself so that from an ssh shell in the nas I could ping ISY and it would resolve.

But that made no difference in trying to start the container. Still get the same error.

Posted

Edit Nodelink's config.xml file directly to replace the hostname ISY with the ISY's locally administered IP address eg 192.168.x.y 

Paul

Posted

Not sure if this is the same on Sygnology NAS devices but when I ran NodeLink on my QNAP I had to specify the directory for the config folder/user files to another location on my NAS. I had Root/Docker/ImageName (Nodelink) - then I had another folder Root/Docker Files/ImageName (Nodelink Files) - then I had to configure the NAS to look at that directory. The Docker image directory didn’t allow me to edit and save files. When the Docker images booted up it saw the other files in the other location. Check the Docker Image settings and see if that could be the case for you too.

 

Edit: TR;DL - Check your folders permissions

Posted
50 minutes ago, Scottmichaelj said:

Not sure if this is the same on Sygnology NAS devices but when I ran NodeLink on my QNAP I had to specify the directory for the config folder/user files to another location on my NAS. I had Root/Docker/ImageName (Nodelink) - then I had another folder Root/Docker Files/ImageName (Nodelink Files) - then I had to configure the NAS to look at that directory. The Docker image directory didn’t allow me to edit and save files. When the Docker images booted up it saw the other files in the other location. Check the Docker Image settings and see if that could be the case for you too.

 

Edit: TR;DL - Check your folders permissions

 

There's a "read only" checkbox on the volume tab in the container setup which is NOT checked in my case.

Posted
1 hour ago, paulbates said:

Edit Nodelink's config.xml file directly to replace the hostname ISY with the ISY's locally administered IP address eg 192.168.x.y 

Paul

 

You said replace. Do you mean add? There is no hostname section in that file:

 

<?xml version="1.0" encoding="UTF-8"?>
<sections>
  <section name="web config">
    <item key="port" value="8090" />
  </section>
</sections>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...