Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to setup network ? #8

Closed
saberioon opened this issue Jan 29, 2021 · 15 comments
Closed

How to setup network ? #8

saberioon opened this issue Jan 29, 2021 · 15 comments

Comments

@saberioon
Copy link

Hi @corizzi ,

How to connect to the server for transmitting data automatically? I understand that the config file has the address and name of the folder for storing data but what about the password? Also How to force to upload data? Probably you write it somewhere but I couldn't find it. Your advice is appreciated

@javierconcha
Copy link
Member

javierconcha commented Jan 29, 2021

I also wonder about this. I remember from last week meeting that NPL or RBINS have to give us an account on the server. Is this related to that @clemgoyens @shunt16?

@clemgoyens
Copy link
Collaborator

Hi Javier, Hi Mehdi,

Yes indeed, NPL will provide GFZ an account on the NPL server and Alex should give you the instructions on how to transfer the data automatically from the rugged PC to the server (I have some notes on how to do it but these are incomplete). For the water sites I still need to check how I can manage the RBINS server (sorry it has been on my to-do list for so long now!!). I will make sure the RBINS server will be able to welcome data from the water sites in February! Once I have tested it I will make you an account Javier and let you know about how to implement it!!

@corizzi
Copy link
Member

corizzi commented Jan 29, 2021

Hi all !

@saberioon : yes, you well understood about the configuration file. For the password step and automatic mode at boot time, you can try this :

sudo ./install/08_setup_server_communication.sh

When it asks about ssh passphrase and file location, let it empty (just press enter)

@saberioon saberioon reopened this Feb 2, 2021
@saberioon
Copy link
Author

saberioon commented Feb 2, 2021

Still, I cannot push readings automatically to the server even after I set it up!

this is output of sudo ./install/08_setup_server_communication.sh

-- Journal begins at Wed 2020-10-07 14:12:00 CEST. --
Feb 02 15:15:04 gfz-pc1 hello_server.sh[933]: /home/gfz/Downloads/hypernets_tools/comm_server/hello_server.sh: line 32: LOGS/hypernets-sequence.log: Permission denied
Feb 02 15:15:04 gfz-pc1 systemd[1]: hypernets-hello.service: Main process exited, code=exited, status=1/FAILURE
Feb 02 15:15:04 gfz-pc1 systemd[1]: hypernets-hello.service: Failed with result 'exit-code'.
Feb 02 15:56:42 gfz-pc1 systemd[1]: Started Hypernets Sync Config Server and Send Data.
Feb 02 15:56:42 gfz-pc1 hello_server.sh[1446]: Sleep 30 sec
Feb 02 15:57:12 gfz-pc1 hello_server.sh[1454]: /home/gfz/Downloads/hypernets_tools/comm_server/hello_server.sh: line 35: LOGS/hypernets-sequence.log: Permission denied
Feb 02 15:57:12 gfz-pc1 systemd[1]: hypernets-hello.service: Main process exited, code=exited, status=1/FAILURE
Feb 02 15:57:12 gfz-pc1 systemd[1]: hypernets-hello.service: Failed with result 'exit-code'.
Feb 02 16:01:10 gfz-pc1 systemd[1]: Started Hypernets Sync Config Server and Send Data.
Feb 02 16:01:10 gfz-pc1 hello_server.sh[1558]: Sleep 30 sec
Feb 02 16:01:40 gfz-pc1 hello_server.sh[1566]: /home/gfz/Downloads/hypernets_tools/comm_server/hello_server.sh: line 35: LOGS/hypernets-sequence.log: Permission denied
Feb 02 16:01:40 gfz-pc1 systemd[1]: hypernets-hello.service: Main process exited, code=exited, status=1/FAILURE
Feb 02 16:01:40 gfz-pc1 systemd[1]: hypernets-hello.service: Failed with result 'exit-code'.

Any advise?

corizzi added a commit that referenced this issue Feb 3, 2021
@corizzi
Copy link
Member

corizzi commented Feb 3, 2021

Hello @saberioon ,

Can you test the following please :
cd hypernets_tools/
rm -rf LOGS/
sudo ./install/08_setup_server_communication.sh

@saberioon
Copy link
Author

saberioon commented Feb 3, 2021

sudo ./install/08_setup_server_communication.sh

I have this outputs:

-- Journal begins at Wed 2020-10-07 14:12:00 CEST. --
Feb 03 09:47:26 gfz-pc1 systemd[1]: Started Hypernets Sync Config Server and Send Data.
Feb 03 09:47:26 gfz-pc1 hello_server.sh[2708]: Sleep 30 sec
Feb 03 09:47:57 gfz-pc1 hello_server.sh[2708]: Sync files : gfz@139.143.5.63 :~/config_hypernets.ini.gfz
Feb 03 09:47:57 gfz-pc1 hello_server.sh[2708]:         <->  config_hypernets.ini
Feb 03 09:47:57 gfz-pc1 hello_server.sh[2708]: Sync from remote to local
Feb 03 09:47:57 gfz-pc1 hello_server.sh[2724]: ssh: Could not resolve hostname 139.143.5.63 : Name or service not known
Feb 03 09:47:57 gfz-pc1 hello_server.sh[2723]: rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
Feb 03 09:47:57 gfz-pc1 hello_server.sh[2723]: rsync error: unexplained error (code 255) at io.c(228) [Receiver=v3.2.3]
Feb 03 09:47:57 gfz-pc1 systemd[1]: hypernets-hello.service: Main process exited, code=exited, status=255/EXCEPTION
Feb 03 09:47:57 gfz-pc1 systemd[1]: hypernets-hello.service: Failed with result 'exit-code'.

@corizzi
Copy link
Member

corizzi commented Feb 3, 2021

I guess there is a trailing space in your config file after the IP address ?

corizzi added a commit that referenced this issue Feb 3, 2021
@corizzi
Copy link
Member

corizzi commented Feb 3, 2021

should be fixed now, thanks for the feedback

@saberioon
Copy link
Author

saberioon commented Feb 3, 2021

@corizzi
first I manually remove space after the IP and it successfully synced.

after your fix, I have tested it again and it successfully synced 👍🏼

Feb 03 11:53:48 gfz-pc1 hello_server.sh[5516]: Sleep 30 sec
Feb 03 11:54:19 gfz-pc1 hello_server.sh[5516]: Sync files : gfz@139.143.5.63:~/config_hypernets.ini.gfz
Feb 03 11:54:19 gfz-pc1 hello_server.sh[5516]:         <->  config_hypernets.ini
Feb 03 11:54:20 gfz-pc1 hello_server.sh[5516]: Files are synchronized.
Feb 03 11:54:23 gfz-pc1 systemd[1]: hypernets-hello.service: Succeeded.

@saberioon
Copy link
Author

saberioon commented Feb 24, 2021

Hi @corizzi ,

Somehow the communication between system and server interrupted and I cannot make the connection again!
this is the message in hello.log :

-- Boot 8880823bd45646b4883b740dc100b1f5 --
Feb 24 17:39:07 gfz-pc1 systemd[1]: Started Hypernets Sync Config Server and Send Data.
Feb 24 17:39:07 gfz-pc1 hello_server.sh[742]: Sleep 30 sec
Feb 24 17:39:39 gfz-pc1 systemd[1]: hypernets-hello.service: Main process exited, code=exited, status=255/EXCEPTION
Feb 24 17:39:39 gfz-pc1 systemd[1]: hypernets-hello.service: Failed with result 'exit-code'.

Any advice?

@saberioon
Copy link
Author

saberioon commented Mar 1, 2021

status of systemctl for hello service is show failing system:

● hypernets-hello.service - Hypernets Sync Config Server and Send Data
     Loaded: loaded (/etc/systemd/system/hypernets-hello.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Mon 2021-03-01 16:06:32 CET; 1min 43s ago
    Process: 1034 ExecStart=/home/gfz/Downloads/hypernets_tools/comm_server/hello_server.sh (code=exited, status=255/EXCEPTION)
   Main PID: 1034 (code=exited, status=255/EXCEPTION)

Mär 01 16:06:02 gfz-pc1 systemd[1]: Started Hypernets Sync Config Server and Send Data.
Mär 01 16:06:02 gfz-pc1 hello_server.sh[1034]: Sleep 30 sec
Mär 01 16:06:32 gfz-pc1 systemd[1]: hypernets-hello.service: Main process exited, code=exited, status=255/EXCEPTION
Mär 01 16:06:32 gfz-pc1 systemd[1]: hypernets-hello.service: Failed with result 'exit-code'.

@clemgoyens
Copy link
Collaborator

Hi Mehdi,

I had the same error at Blankaart. I thought it was an issue with my account but apparently not.
Can you check if you can sync

@saberioon
Copy link
Author

Hi Mehdi,

I had the same error at Blankaart. I thought it was an issue with my account but apparently not.
Can you check if you can sync

@clemgoyens
Nope, It is not syncing!

@clemgoyens
Copy link
Collaborator

Oops sorry Mehdi, I didn't realise my message left. I was looking for the command I used to sync (and which worked while I had the same error as yours). Ok maybe @corizzi can help with it...
Also can you connect from the rugged PC to the NPL server using your password and simple ssh command (ssh [account_name]@[npl server])?

@saberioon
Copy link
Author

Oops sorry Mehdi, I didn't realise my message left. I was looking for the command I used to sync (and which worked while I had the same error as yours). Ok maybe @corizzi can help with it...
Also can you connect from the rugged PC to the NPL server using your password and simple ssh command (ssh [account_name]@[npl server])?

Yes, I can connect , it seems authorized keys is active, but still is not syncing !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants