Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
atlasui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
INM-1
BDA
software
analysis
atlas
atlasui
Commits
1e47e709
Commit
1e47e709
authored
3 years ago
by
Schiffer, Christian
Browse files
Options
Downloads
Patches
Plain Diff
Updated atlas_controller scripts to loop until a connection can be established
parent
ad621144
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
atlas_controller/start_remote_server.sh
+12
-1
12 additions, 1 deletion
atlas_controller/start_remote_server.sh
atlas_controller/start_tunnel.sh
+14
-2
14 additions, 2 deletions
atlas_controller/start_tunnel.sh
with
26 additions
and
3 deletions
atlas_controller/start_remote_server.sh
+
12
−
1
View file @
1e47e709
...
...
@@ -4,4 +4,15 @@
USER
=
schiffer1
HOST
=
jureca11.fz-juelich.de
COMMAND
=
'cd /p/home/jusers/schiffer1/jureca/project_jinm16/atlasui/atlas_controller/; source load_modules.sh; source venv/bin/activate; export PYTHONPATH=`pwd`:$PYTHONPATH; python atlas_controller/app.py'
ssh
${
USER
}
@
${
HOST
}
-t
"bash -cl '
${
COMMAND
}
'"
while
true
do
echo
"Connecting"
ssh
${
USER
}
@
${
HOST
}
-t
"bash -cl '
${
COMMAND
}
'"
retval
=
$?
# Check for timeout
if
[[
${
retval
}
-ne
0
]]
;
then
echo
"Could not establish connection to
${
HOST
}
. Will try again in
${
RECONNECT
}
seconds..."
sleep
${
RECONNECT
}
fi
done
This diff is collapsed.
Click to expand it.
atlas_controller/start_tunnel.sh
+
14
−
2
View file @
1e47e709
...
...
@@ -3,7 +3,19 @@
USER
=
schiffer1
HOST
=
jureca11.fz-juelich.de
RECONNECT
=
60
echo
"Starting SSH tunnel..."
# Make sure tunnel is externally reachable (see https://superuser.com/questions/588591/how-to-make-ssh-tunnel-open-to-public)
ssh
${
USER
}
@
${
HOST
}
-N
-L
\*
:8000:localhost:8000
while
true
do
# Make sure tunnel is externally reachable (see https://superuser.com/questions/588591/how-to-make-ssh-tunnel-open-to-public)
echo
"Connecting"
ssh
${
USER
}
@
${
HOST
}
-N
-L
\*
:8000:localhost:8000
retval
=
$?
# Check for timeout
if
[[
${
retval
}
-ne
0
]]
;
then
echo
"Could not establish connection to
${
HOST
}
. Will try again in
${
RECONNECT
}
seconds..."
sleep
${
RECONNECT
}
fi
done
echo
"Stopped SSH tunnel"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment